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


Alexander,

> So we have a bigger problem. We already link to ddraw.dll.
> Cygcheck reported
> for the old version:

Then that is a mistake.  I just #if0'd the calls to DirectDrawCreate and
DirectDrawCreateClipper in winpfbdd.c, winshaddd.c, and winshadddnl.c with
the result that cygcheck now reports:

$ cygcheck XWin.exe
Found: .\XWin.exe
.\XWin.exe
  C:\cygwin\bin\cygwin1.dll
    C:\WINNT\System32\KERNEL32.dll
      C:\WINNT\System32\NTDLL.DLL
  C:\cygwin\bin\cygz.dll
  C:\WINNT\System32\GDI32.dll
    C:\WINNT\System32\USER32.DLL
  C:\WINNT\System32\SHELL32.DLL
    C:\WINNT\System32\ADVAPI32.DLL
      C:\WINNT\System32\RPCRT4.DLL
    C:\WINNT\System32\SHLWAPI.DLL
      C:\WINNT\System32\msvcrt.dll
    C:\WINNT\System32\COMCTL32.DLL

Notice that ddraw.dll is not linked.  That is the way it should be.  We need
to replace the direct calls to DirectDrawCreate and DirectDrawCreateClipper
with the method using GetProcAddress.  That way we'll be able to safely run
on machines that do not have a dummy version of ddraw.dll (on the off chance
that this would ever happen).

> The only difference between
>
>     proc = GetProcAddress
>     (proc*)(...)
>
> and
>
>     proc(...)
>
> is that the second does not need the dll with the symbol on
> startup. And even
> if the symbol is not found in the dll, we still have the
> null-check and can
> (have to) skip the call to DirectDrawCreate.

Did you mean to say that the first method does not need the dll with the
symbol on startup?

The intention was to prevent ddraw.dll from being linked, so the idea was to
use the first method.  I messed up.  Oops.

In any case, w32api shouldn't be doing something that breaks the
GetProcAddress method, as that is a perfectly valid method.

Harold


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