wow64kernel32.dll nt.dll unresolved imports

wow64kernel32.dll nt.dll unresolved imports


I generate 2 DLL l1.dll and l2.dll.
l2 depends on l1.

Running on vista64, with VS2005, Release/x64, I compile and link successfully those 2 dll (using the static runtime /MT /Machine:X64)

When I open l1.dll with dependency walker(VisualStudio8Common7ToolsBindepends.exe), there are errors

Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.

l1.dll(64bit) depends on libguide40.dll(64bit) and syswow64kernel32.dll (which depends shows as x86 lib, therefore the 2nd error)
libguide40.dll(64bit) then depends on syswow64kernel32.dll (it has 1 unresolved import, marked in red: RtlUnwindEx). syswow64kernel32.dll depends on ntdll.dll (at this level no unres imports)

Then, syswow64kernel32.dll depends on ntdll.dll . kernel32.dll here has 4unresolved imports (RtlLookupFunctionEntry, RtlPcToFileHeader, RtlUnwindEx, RtlVirtualUnwind)

Error: Modules with different CPU types were found.
cf above

All this matters because I try to run an exported __stdcall function from l2 in Excel2007, which fails with an error 48.


ps: I posted also on VS forums.

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

My understanding is that if all is native x64 binary, there shouldn't be dependency on syswow64 DLLs.

So are you sure both dll files are compiled with x64 compiler? Turn off "/nologo" for compiler, and also you can use the detail "show link progress" to see if all the .lib files are from x64 directory. When you register, make sure to use the correct x64 "regsvr32.exe".

And you should install the VS2005 SP1 too.

Excel exists only in 32bit version, MSFT has not released a 64bit office, that is the main error.

VS2005 SP1 in installed. All the .lib files come from EM64T under intel dir, or AMD64 in VS dir. However the default dependency walker provided by VS2005 is a 32bit depency walker which doesn't interpret well the kernel and ntdll depencies. I downloaded a 64bit version and that reads well the dependencies.

1 question, regsvr32.exe is, i suppose, the registry editor? That is to register the DLL in the system's list so that i don't have to:

  • make the DLL available in the current directory of the application
  • make directory of the DLL in the Path environment variable

right? Thanks,

About regsvr32.exe -- it's the tool to register your COM DLL files. There're two version of it on x64 OS. One is for 32-bit DLL under "C:WINDOWSSysWOW64", one is for x64 DLL under "C:WINDOWSsystem32".

For your problem, it's because of the Excel. You can not access the IA32 DLL from your x64 DLL. But You can access the IA32 exe program from your x64 DLL.There're some articals online about how to do this.

Leave a Comment

Please sign in to add a comment. Not a member? Join today