kernel32.dll breakage (was Re: [ANNOUNCEMENT] Updated: cygwin-1.7.6-1)

Corinna Vinschen corinna-cygwin@cygwin.com
Sat Aug 21 19:17:00 GMT 2010


On Aug 21 18:04, Angelo Graziosi wrote:
> wget http://cygwin.com/snapshots/cygwin1-20100820.dll.bz2
> bunzip2 cygwin1-20100820.dll.bz2
> chmod +x cygwin1-20100820.dll
> [...]
> With 20100820 snapshot Cygwin.bat does not start and Windows says
> (literally):
> [...]
> "Can not find entry point CreateProcessAsUserW procedure in the
> dynamic link library KERNEL32.dll"
> 
> As you can see a mystery...

Not anymore.  I could reproduce the problem on XP, but not on W7.  This
reminded me of a checkin to w32api from yesterday.  The kernel32.def
file, which is used to create the kernel32.a inport library for
linking against kernel32.dll has been regenerated on a Windows 7 system.

The problem is that CreateProcessAsUserW was never available in
kernel32.dll, but in advapi32.dll(*).  However, with the new kernel32.def,
CreateProcessAsUserW is now exported by kernel32.a as well.

Apparently kernel32.dll *does* export CreateProcessAsUserW now under
Windows 7.  However, *officially*, the CreateProcessAsUserW symbol is
still provided by advapi32.dll.

Chris [Sutcliffe], can we please revert this change for now?  It breaks
building Win32 apps, if the link order prefers kernel32.a over advapi32.a.

In theory, shouldn't the gendef script drop symbols from kernel32.def
which are defined in advapi32.dll?  That would fix the problem, afaics.

As for Cygwin, apparently we can workaround this issue by simply changing
the link order in our Makefile.  I checked in a matching patch, which
fixes this issue for me on "old" systems like Windows XP.

Please test the next developers snapshot.


Corinna

(*) Yes, I talked nonsense in my previous reply.  advapi32, not kernel32.
    I should have seen the discrepancy immediately.  Sorry about that!

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list