understanding resource files (ProjName.rc)

Posted on 2006-05-31
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

    >>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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
    Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
    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.…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now