understanding resource files (ProjName.rc)

Posted on 2006-05-31
Medium Priority
Last Modified: 2013-12-03
I am still a newbie to raw windows programming. I was looking at the code generated by the wizard and could not understand when and where did the resources get loaded. let's look at a specific example.
when i trace back the #includes, i get to resource.h where it says no dependecies and then it lists a bunch of #defines

// Microsoft Visual C++ generated include file.
// Used by win00.rc

#define IDS_APP_TITLE                  103

#define IDR_MAINFRAME                  128
#define IDD_WIN00_DIALOG      102

I opened the ProjName.rc file in a text editor and see declarations for StringTables, Icons, etc.

Now we look at the _tWinMain function and the first thing that I see is LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);

my question is, where/when are the resources loaded to some place where they can be used by LoadString API call? I did some tracing in crt0.c but that didn't help either.
Question by:jhshukla
1 Comment
LVL 86

Accepted Solution

jkr earned 300 total points
ID: 16799399
>>my question is, where/when are the resources loaded to some place where they can be used by LoadString
>>API call?

These resources are an integral part of your binary image after the linking process. If you do a

dumpbin.exe ProjName.exe

you'll see a section named '.rsrc' which contains them.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question