The more I work with external libraries, the more question do I have. VASmalltalk under Windows does only support the calling convention stdcall.
Lots of libraries (on the market) are compiled using the cdecl calling convention.
stdcall means, that the function being called has to clear the stack. cdecl means, that the caller has to clear the stack. stdcall have both right-to-left parameter passing and they both preserve the same registers for internal usage and the same register for return values.
If now VASmalltalk calls a c-routine it expects, that the function corects the stack. If it calls a cdecl c-routine, the call should work and it means, that some bytes (for parameter ...) are not corrected and I expect, that for each call some bytes are lost on the stack.
The other way around should not work: cdecl expecting functions can not call stdcall compiled functions.
And here now my question (for which I do not have an answer yet - though this problem has been discussed in the internet news group this year): Does VASmalltalk loose some bytes when calling cdecl compiled functions ? Or does VASmalltalk creates a special stack for that external call and throw it away after that call (therefore the lost bytes are meaninfless).
Marten