Issue with x64 and commctl32.dll

Bevan Thomas 20 Reputation points
2024-10-10T18:17:27.0866667+00:00

I am building a x64 project, i am using
#pragma comment(linker,"/manifestdependency:"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'"") for using InitCommonControlsEx(&InitCtrls)

After the build , when i check the exe using dependencies walker ,I see only commctl32 is loaded as 32- bit, which probably is causing the exe application to fail with error 0xC000007B.

User's image

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,739 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Olaf Helper 44,741 Reputation points
    2024-10-10T18:22:59.37+00:00

    ,I see only commctl32

    Guess, why it's named commctl32, because it is 32 bit and before you ask: No 64 bit avaible, even because the libary is more the 100 hundred years old.


  2. Bevan Thomas 20 Reputation points
    2024-10-10T18:38:00.88+00:00

    @Olaf Helper I got this error,
    "A component version required by the application conflicts with another component version already active. Conflicting components are:. Component 1: C:\Windows\WinSxS\manifests\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.4355_none_60b8b9eb71f62e16.manifest. Component 2: C:\Windows\WinSxS\manifests\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.4355_none_a865f0c28672571c.manifest."

    So, I am thinking there exist both versions.Also, I checked WinSxs folder. I found two folders containing the commctl32 one amd64 and other x86.


  3. RLWA32 45,571 Reputation points
    2024-10-10T20:21:00.7833333+00:00

    I suggest you use gflags.exe to show loader snaps for your application. This should be done on the "Image File" tab. See my answer to this question - https://zcusa.951200.xyz/en-us/answers/questions/1359836/using-gflags-show-loader-snaps-with-visual-studio

    After you have done this run your application under the Visual Studio debugger and examine the messages in the Output pane. I think they will help you identify the problem.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.