Reputation: 475
I have ported a project from Win32
to x64
platform. I changed all dependencies so I can build the project smoothly. However, as soon I start the executable I'm getting an error (0xc000007b)
.
Using the dependency walker I can see, that at a certain point the ComCTL32.dll
is loaded but the x86
and not the x64
as expected.
As soon I turn of the manifest generation (linker->Manifestfile
), it works. But that's not a solution.
So my question is: Where in Visual Studio 2010
can I set the path to the correct DLL ComCtl32.dll
.
Upvotes: 6
Views: 3707
Reputation: 941218
Well, the manifest matters. An example of a bad one that could cause this problem would look like this:
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="x86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
The processerArchitecture attribute value matters. A good one uses *
, which means compatible or amd64
, which means 64-bit.
Upvotes: 8
Reputation: 595320
You don't set the path anywhere. You specify a manifest to indicate which version of ComCtrl you want, and then it is up to the OS to find it, like any other DLL. The error you are seeing means a 64bit process is trying to load a 32bit DLL, or vice versa. That could be a search path issue, that could be a dependancy issue. Use a tool like DependancyWalker to find the culprit.
Upvotes: 1