1

I am using Visual Studio 2010 in x64-based processor.

I got error LoadLibrary(_T("xx.dll")) with 126.

I tried dependency Walker to find out all .dll and module, function dependencies. It shows everything is fine.

Actually old code was working fine in 32bit operating system and compiled. After I moved to 64bit operating system, There is an error.

I copied all the .dll libraries in same directory with .exe file.

Is there any conflict between compiled xx.dll in 32bit then after execute at 64bit?

Thank you so much for any suggestion and advice.

Haytem BrB
  • 1,528
  • 3
  • 16
  • 23
Tuvi
  • 63
  • 1
  • 10
  • You're using your old 32bit DLLs in your 64bit application now? – Youka Mar 07 '16 at 10:00
  • @Youka Thank you for your quick reply. Yes i have copied all the old DLLs in my my 64 bit application. – Tuvi Mar 07 '16 at 10:06
  • 1
    It is a simple "file not found" error, we can't find it for you. Enable loader snaps or use SysInternals' Process Monitor to know which DLL is the problem. – Hans Passant Mar 07 '16 at 10:16
  • @HansPassant Thank you. I used dependency walker and it showed every .dll and module found. That is why now i have no clue. – Tuvi Mar 07 '16 at 10:21
  • 1
    It is pretty useless, it hasn't been maintained in a very long time. And does little to help you diagnose LoadLibrary() failures, unless you use its Profile option. That's why I did not recommend it. – Hans Passant Mar 07 '16 at 10:34
  • @HansPassant any suggestion? thank you. – Tuvi Mar 07 '16 at 10:37
  • I gave you suggestions. Would you like me to delete them because they are not helpful? – Hans Passant Mar 07 '16 at 10:38
  • You are right. i have not tried them. i will. @HansPassant – Tuvi Mar 07 '16 at 10:42
  • Possible duplicate of http://stackoverflow.com/questions/128445/calling-32bit-code-from-64bit-process – Jabberwocky Mar 07 '16 at 16:27

1 Answers1

1

64bit applications can't load 32bit DLLs, WOW64 (windows 32bit emulation on 64bit) just works for spawning processes/executables, not what happens on runtime. Already answered multiple times on SO, like here.

You need to compile/get 64bit versions of your DLLs.

Community
  • 1
  • 1
Youka
  • 2,646
  • 21
  • 33