May 19, 2024, 10:13:38 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


method arguments limitation?

Started by sapero, March 23, 2006, 01:44:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sapero

while porting MSWord typelibrary to include file, a method called Run with 29 arguments causes the parser to crash.#include "oleidl.inc"
#include "ocidl.inc"
interface IWordApplication/*_Application*/ : IDispatch {
/*cut*/
declare virtual Run(
BSTR *MacroName, VARIANT *varg1, VARIANT *varg2,
VARIANT *varg3, VARIANT *varg4, VARIANT *varg5,
VARIANT *varg6, VARIANT *varg7, VARIANT *varg8,
VARIANT *varg9, VARIANT *varg10, VARIANT *varg11,
VARIANT *varg12, VARIANT *varg13, VARIANT *varg14,
VARIANT *varg15, VARIANT *varg16, VARIANT *varg17,
VARIANT *varg18, VARIANT *varg19, VARIANT *varg20,
VARIANT *varg21, VARIANT *varg22, VARIANT *varg23,
VARIANT *varg24, VARIANT *varg25, VARIANT *varg26,
VARIANT *varg27, VARIANT *varg28, VARIANT *varg29,
VARIANT *varg30, /*out, retval*/ VARIANT *prop),HRESULT;
/*cut*/
}

removed three arguments ant it compiles fine.
I hope 354 methods is no problem for alpha ;D
// to try just remove base class IDispatch

Parker

There are actually lots of limits, most if not all of which cap off at 100. For example, the number of CASE statements in a SELECT block, the number of nested include files, and the number of subroutine parameters.

What would be nice is if the stacks used changed to a linked list implementation and then the limits would only be based on how much memory you have.

Edit - in this case though, I think the yacc parser has an overflow that's not handled.

Ionic Wind Support Team

Fixed for the next update.

Thanks,
Paul.
Ionic Wind Support Team

sapero

compilling a source with errors, named "IPicture.Render().src" I got some errors in build window.
Double clicked in build window and got messagebox:
"D:\Aurora\temp\IPicture.Rende was not found".

I know that problem with errors in include files. Re-saving include file using "save as" helps, but here this trick failed.
Starting Aurora in current directory in /include. Aurora changes currend firectory every time you open a project or use "save as", or something else...

And often including files from default /include folder on error - doubleclick in build window tries to open file from /projects folder :D

Parker

I've had the include problem before too, it should probably check
a) the project directory
b) the current source file's directory (could differ from project's)
c) the include directory

sapero

Found another limitation in method name length- max 32 (or 31) characters. File wmsserver.hinterface IWMSPublishingPointCurtrentCounters /* : IDispatch */
{
declare virtual get_OutgoingDistributionAllocatedBandwidth(long *pVal),HRESULT;
}

Parker

What is the error? The limit is 64 characters, more are allowed just chopped off.

sapero

I get a crash every time it is parsed. Not only this method/interface.
After cutting method name to 32 characters it compiles.
Here compilation is used to test the conversion from C :)

http://www.sendspace.com/file/yw20il
here are all currently converted includes. Find the wmsserver.inc file, append to it on top #include "com.inc" and try to compile

Parker

Aha, found it! The problem is not a limit of 32, it is because the class name + length of @ character + length of method name (stored internally as ClassName@MethodName) exceeds 64, and the length isn't checked for. Give me a minute and I'll see if my fix works.

Ionic Wind Support Team

Ionic Wind Support Team