_dll function VpeGetVersion( ) as int pascal:vpes3271.VpeGetVersion
// _DLL function VpeGetVersion( ) as shortint pascal:vpes3260.VpeGetVersion
In VO this works well, and I need the wrapper because the DLL is loaded with LoadLibrary() and the class is created with CreateInstance().
In X#, this code creates a StackOverFlow exception because the method calls itself in a loop instead of calling the function of the same name, but in another module.
The DLL is compiled in VO dialect.
Is there something I can do to change this behaviour other than to rewrite the entire interface to the DLL?
I cannot change the class because I use it in many VO applications.
This has been reported by someone else and is fixed in the next build. From the what's new from that build:
"Functions now Always take precedence over methods. If you want to call a method inside the same class you need to either prefix it with the typename (for static methods) or with the SELF: prefix. If there is no conflicting function name then you can still also call the method with just its name."
XSharp Development Team
I have the entire DLL interface in one file/module because this can change between new versions of the VPE dll.
All the other code is in separate modules.
But I had to apply so much changes that this code is not more compatible between VO and X#.
Finally, after more than two years (where I have started and suspended the migration many times), my report engine now works also in X# - but only with the VO GUI classes. But it will take only a few hours to make it work also with WinForms.