Click here to Skip to main content
15,867,488 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am testing a MFC demo and review the stdafx.h file. I see this statement as below:

#pragma comment(linker,"\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")


I know it is to instruct the linker to link a file, but what is the exact file name of this common controls by the version #='6.0.0.0'? where is this file located?

Thanks a million in advance...

What I have tried:

I understand the use of this instruction, but need to know more details about it.
Posted
Updated 17-Mar-21 21:31pm
v2

The best way to find out is to read documentation, see:
comment pragma[^] - Places a comment record into an object file or executable file.

and with linker: - Places a linker option in the object file. You can use this comment-type to specify a linker option instead of passing it to the command line or specifying it in the development environment. For example, you can specify the /include option to force the inclusion of a symbol

For further details about pragma directives, pleasee see: Pragma directives and the __pragma and _Pragma keywords | Microsoft Docs[^]
 
Share this answer
 
Comments
Southmountain 18-Mar-21 10:12am    
very good links! I will study them.
Maciej Los 18-Mar-21 10:29am    
You're very welcome.
Southmountain 18-Mar-21 13:04pm    
so this pragma comment statement is equivalent to setting link options in command line or Visual Studio project configuration page?
Maciej Los 19-Mar-21 3:30am    
Isn't that stated in MSDN documentation?
Southmountain 20-Mar-21 13:05pm    
yes, it is indeed...
That is a manifest statement. I recommend you do two things. First comment it off and see how things run and if they look different. Second, read up on what manifests do and are for. They seem to be of more limited useful these days with windows 10 but you read up on them and see what they are about.
 
Share this answer
 
Comments
Southmountain 18-Mar-21 10:11am    
I did it exactly as what you said before, it has no any impact...
Rick York 18-Mar-21 11:47am    
It usually doesn't in windows 10.
Southmountain 18-Mar-21 13:01pm    
this pragma statement specifies that windows common control version shall be 6.0.0.0+

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900