This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: DirectDrawCreate


On Mon, 11 Feb 2002, Harold Hunt wrote:

> The calls to DirectDrawCreate in Cygwin/XFree86 files are exactly as they
> would be if using Visual C++.

The parameters to the calls are ok. I'm just wondering if the change from
late to early binding might cause some trouble.

> What are you talking about?  I never got an address to DirectDrawCreate from
> GetProcAddress.  Is there something in the ddraw.h or objbase.h that causes
> this to happen?

in winengine.c, line 86. Via GetProcAddress you get the symbol from the dll

      /* Try to get the DirectDrawCreate address */
      fpDirectDrawCreate = GetProcAddress (hmodDirectDraw,
              "DirectDrawCreate");

and in line 110, you the call the function. 

      ddrval = (fpDirectDrawCreate*)(NULL, &lpdd, NULL);

I replace this call with

      ddrval = DirectDrawCreate(NULL, &lpdd, NULL);

which causes the symbol DirectDrawCreate to be linked explicitly into the
code at link-time instead of the first variant, where it is linked at run-
time.

bye
    ago
-- 
 Alexander.Gottwald@informatik.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723
 phone: +49 3725 349 80 80	mobile: +49 172 7854017
 4. Chemnitzer Linux-Tag http://www.tu-chemnitz.de/linux/tag/lt4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]