Re: PIMAGE_IMPORT_DESCRIPTOR
- From: "HasEx" <HasEx@xxxxxxxxxxxxxxxxx>
- Date: Sat, 24 Dec 2005 20:48:17 -0600
Hi Jeffrey,
It looks like, I lost my posting. I try again here.
I also have no problem loading gdiplus.dll. But Atl80.dll fails,
in the following console application.
#include "stdafx.h"
#include <windows.h>
int _tmain(int argc, _TCHAR* argv[])
{
HMODULE h = ::LoadLibraryEx(_T("ATL80.DLL"), NULL,
DONT_RESOLVE_DLL_REFERENCES|LOAD_WITH_ALTERED_SEARCH_PATH);
DWORD dw = GetLastError();
TCHAR name[MAX_PATH];
::GetModuleFileName(h, name, MAX_PATH);
return 0;
}
dw value is 126.
I have this dll in
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.ATL_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_6e805841
alsi in
C:\WINDOWS\WinSxS\amd64_Microsoft.VC80.ATL_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_a08a3e21
again gdiplus.dll gives no trouble, so can you please try atl80.dll?
Thanks.
Has
""Jeffrey Tan[MSFT]"" <v-jetan@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:bX0d6i5BGHA.832@xxxxxxxxxxxxxxxxxxxxxxxx
> Hi HasEx,
>
> Thanks for your feedback.
>
> With your further description, I understand your context much better now.
> In order to know which dll is missed from the loading process, you want to
> use DONT_RESOLVE_DLL_REFERENCES flag to LoadLibraryEx to manually load all
> the dlls referred by the application, yes?
>
> In
> ::LoadLibrary(lpLibFileName, NULL,
> DONT_RESOLVE_DLL_REFERENCES|LOAD_WITH_ALTERED_SEARCH_PATH);
>
> Can you show me do you use full path for lpLibFileName parameter or use
> only the dll name for the lpLibFileName parameter?
>
> Currently, I have done some test for this scenario:
> In my MFC dialog based application, I invoked the following statement to
> load the "gdiplus.dll":
> HINSTANCE hGDIP=::LoadLibraryEx("gdiplus.dll", NULL,
> DONT_RESOLVE_DLL_REFERENCES|LOAD_WITH_ALTERED_SEARCH_PATH);
>
> In the Modules window, I can see the gdiplus.dll is loaded from the path
> below:
> C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.3790.18
> 30_x-ww_24C40C58\gdiplus.dll
>
> So it seems that LoadLibraryEx will do all the things well for us. Also, I
> have tried to pass a full path for this parameter like this:
> HINSTANCE hGDIP=::LoadLibraryEx("c:\\windows\\system32\\gdiplus.dll",
> NULL,
> DONT_RESOLVE_DLL_REFERENCES|LOAD_WITH_ALTERED_SEARCH_PATH);
>
> I got the same result. LoadLibraryEx with
> DONT_RESOLVE_DLL_REFERENCES|LOAD_WITH_ALTERED_SEARCH_PATH will not fail.
> It
> seems that I got the different result as you.
>
> Thanks
>
> Best regards,
> Jeffrey Tan
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
>
.
- Follow-Ups:
- Re: PIMAGE_IMPORT_DESCRIPTOR
- From: "Jeffrey Tan[MSFT]"
- Re: PIMAGE_IMPORT_DESCRIPTOR
- References:
- RE: PIMAGE_IMPORT_DESCRIPTOR
- From: "Jeffrey Tan[MSFT]"
- RE: PIMAGE_IMPORT_DESCRIPTOR
- From: "Jeffrey Tan[MSFT]"
- RE: PIMAGE_IMPORT_DESCRIPTOR
- Prev by Date: Re: Create a serial connection with a modem
- Next by Date: Re: PIMAGE_IMPORT_DESCRIPTOR
- Previous by thread: RE: PIMAGE_IMPORT_DESCRIPTOR
- Next by thread: Re: PIMAGE_IMPORT_DESCRIPTOR
- Index(es):
Relevant Pages
|