public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* cygwin DLLs and VC (again)
@ 2000-03-21 10:01 Manuel Sánchez
  0 siblings, 0 replies; only message in thread
From: Manuel Sánchez @ 2000-03-21 10:01 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]

    This message follows to the 
one I posted on March 16.
    Following the explanations Mumit Khan 
kindly gave, I managed to link dinamically a cygwin GCC compiled DLL from a VC 
compiled exe, and using __stdcall calling specifier, it worked fine with 
ordinary C methods. One of the methods returned an object whose class derived 
the ICommon interface... well, a correct instance was returned, but then I 
noticed that there are some differences between VC and GCC when dealing with 
method calling:
 
    First of 
all: VC stores the object pointer in ecx before it calls the method itself, and 
it seems that GCC do the same in ebx.
    VC uses the eax register as 
storage for the returning value... I think GCC uses the stack.
    Virtual tables differ in 
method pointer placement in VC and GCC: when calling to one method from VC using 
a certain offset from the vtable it jumps to another method whose assembly it's 
easily recognisable (the release method), but it'snt the one it was supossed to 
call!!!
 
    So I wonder if is there any 
way of forcing both compilers to work in the same way.
 
    Thanks 
for reading this.
 
        Tony Sanchez

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-03-21 10:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-21 10:01 cygwin DLLs and VC (again) Manuel Sánchez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).