Using .RES files with DLL projects?

R

Rich

I have seen DLL projects use .res files so that when you look at the
properties of the DLL file from Windows Explorer you can see things
like file version, description, copyright, etc.

My question is how do you do this? (specifically, using MS C++ 2005
Express).

I have found hints in MSDN that indicate that you must first create a
".rc" file then use the resource compiler to make this into a ".res"
file. I am completely ignorant about how resources are created and
used - any guidance or links to appropriate references are appreciated.
 
B

Bruno van Dooren [MVP VC++]

I have seen DLL projects use .res files so that when you look at the
properties of the DLL file from Windows Explorer you can see things
like file version, description, copyright, etc.

My question is how do you do this? (specifically, using MS C++ 2005
Express).

This is very easy.
Just add a version resource to the project.
The IDE will add all .rc and .h files for you.
The only thing you need to do is to fill in the correct information in the
version resource.
Build your DLL and it will have the version tab in the windows properties
box.

--

Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"
 
R

Rich

Bruno said:
This is very easy.
Just add a version resource to the project.
The IDE will add all .rc and .h files for you.
The only thing you need to do is to fill in the correct information in the
version resource.
Build your DLL and it will have the version tab in the windows properties
box.

Bruno,

OK, I am trying to add a version resource to the project (MSVC++ 2005
Express). In the Solution Explorer pane I right-click on the "Resource
Files" folder, and select "Add - New Item". The "Add New Item" dialog
gives me "Categories" on the left and "Templates" on the right. The
available categories under "Visual C++" are UI, code, data, and
property sheets. By selecting these I am given options for Templates
as follows:

UI Category -> "Windows Form" template
code Category -> "C++ File", "Header File", "Component Class" templates
data Category -> "DataSet" template
PropertySheets Category -> "Property Sheet (.vsprops)" template

Will any of these get me to a "version resource", or am I in the wrong
place? What should I be doing to add the version resource?

Thanks,
Rich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top