Re: PIMAGE_IMPORT_DESCRIPTOR

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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.
>


.



Relevant Pages

  • RE: Separated DLLs for user controls
    ... Thanks for posting in the community! ... compoenent classes such as page class, usercontrol classes and other ... each dll. ... Then reference them in the main ASP.NET web application project. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: PE delayed import table - need a description.
    ... I did look at that page (well before posting my question ... implicit linking and explicit linking. ... When you delayload against a DLL, ...
    (microsoft.public.win32.programmer.kernel)
  • Re: wince and sqlce(sqlite3) database+httpd webserver
    ... when posting to multiple groups at the same time ... This posting is provided "AS IS" with no warranties, ... In registry i tried.But i couldn't. ... I put all dll required for sqlite3 in modules section of project.bib. ...
    (microsoft.public.windowsce.embedded)
  • RE: Newbie question
    ... Intermediate Language. ... If you want to use that DLL in your VB.NET ... just select Add Reference from the Project menu in IDE. ... "This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Does anyone else have this problem when trying to load a dll?
    ... Christopher has a problem loading a dll with loadlibrary: ... It sounds like some dependency of the dll you are trying to load is missing. ...
    (comp.soft-sys.matlab)