On 15 Oct 2002, Alexandre Julliard wrote:
Greg Turner gmturner007@ameritech.net writes:
I like this theory, it has recently occured to me too. I will try compiling the sample using stdcall and see if that has an effect, after work. Also, in the winelib version, I changed main() to stdcall from cdecl (!) which I took to mean that winelib framework didn't want that calling convention.
It's not an stdcall/cdecl issue, Ove is right that it's a problem with returning a structure, gcc doesn't do it the same way as msvc. Just change NdrClientCall2 to return a LONG_PTR (it won't be 100% source compatible then, but we have no choice I'm afraid).
Hmm. Maybe it's possible to do something in the fashion of
LONG_PTR RPC_VAR_ENTRY NdrClientCall2( PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat, ... ); #ifndef __WINE__ #define NdrClientCall2 (CLIENT_CALL_RETURN)NdrClientCall2 #endif
to gain source compatibility.