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
.
From the BUILD menu in Visual Studio, select Configuration Manager. From the Active solution platform drop-down list, select New. The New Solution Platform dialog displays. In the Type or select new platform combination box, select x64.
From the Visual Studio menu, choose Test, then choose Processor Architecture for AnyCPU projects. Choose x64 to run the tests as a 64-bit process.
DLL. COMCTL32. DLL implements a wide variety of standard Windows controls, such as File Open, Save, and Save As dialogs, progress bars, and list views.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With