Re: LoadLibraryEx (as datafile) and MorIcons.dll - extracting icons



William DePalo [MVP VC++] <willd.no.spam@xxxxxxxx> schreef in berichtnieuws
O7zZBdHYFHA.252@xxxxxxxxxxxxxxxxxxxxxxx

Hello William,

> "R.Wieser" <address@xxxxxxxxxxxxx> wrote in message
> news:eVQqN14XFHA.2540@xxxxxxxxxxxxxxxxxxxxxxx
> > Cause : the "LoadLibraryEx" with the "LOAD_LIBRARY_AS_DATAFILE"
> > option set fails. (after the loading I'm using "EnumResourceNames" to
iterate
> > thru all icon-resources).
>
> Well, how does it fail?
>
> Immediately after the failing LoadLibraryEx() call, call GetLastError()
and
> look up the code in <winerror.h>. If it doesn't ring a bell with you, post
> the code here, and someone should be able to explain it to you.

Sorry, should have thought of that myself. Maybe that's because I allready
suspected what the cause is (but can't do anything about it) ...

The code that GetLastError returns is 000Bh, and is translated by
FormatMessage to "the program has got an illegal format". That could be
connected to the fact that MorIcons.dll is (and others are) of the NE style,
while the accepted DLL's are of the PE style.

Still, it's strange that I can't seem to access, with Windows own functions,
resources in files that Windows offers in a default install ...

Any idea what I can do to access resources in NE-style executables (DLL's,
EXE's) too ?

Regards,
Rudy Wieser



.



Relevant Pages

  • Re: LoadLibraryEx (as datafile) and MorIcons.dll - extracting icons
    ... >> Immediately after the failing LoadLibraryEx() call, call GetLastError() ... > resources in files that Windows offers in a default install ... ... > Any idea what I can do to access resources in NE-style executables (DLL's, ...
    (microsoft.public.win32.programmer.tools)
  • Re: DeviceIoControl W2K
    ... ich habe den Fehlercode mit GetLastError abgefragt. ... Hierbei wird die Variable C mit dem Fehlercode 50 belegt. ... > in der Device Input and Output Control Reference des Platform SDK befindet ... Requires Windows XP, Windows 2000 Professional, Windows NT ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: How to Validate User Credentials on Windows 2000 OS?
    ... GetLastError() return = %d", ... "Alex Fedotov" wrote: ... still I am unable to verify user Credentials on Windows 2000. ... Can some one provide me code snippets which uses LogonUserAPI on ...
    (microsoft.public.platformsdk.security)
  • Re: Impersonation
    ... they don't use user tokens) ... > I have a windows server that requires access to the file system at certain ... > machine plus win2k servers. ... > 'Call GetLastError to try to determine why logon failed if it did not ...
    (microsoft.public.dotnet.security)
  • Re: fopen - strange behavior
    ... you might try GetLastError() since fopen must call CreateFile under ... and CreateFile would call SetLastError on failure. ... I think I'll try to rewrite it for Windows CE ... Mateusz Łoskot ...
    (microsoft.public.pocketpc.developer)