Resource collisions

Posted on 2005-04-14
Last Modified: 2013-11-20
Hello folks.
Our product is developed in Visual Studio 6.
It consists from more then 30 workspaces, we have the main one that is .exe file and all other are dlls.
I saw 3 main problems with resouce.h files
1) Different projects can have same ID name.
2) Different projects can have different IDs that have same numeric value.
3) ID may have numeric value that used by MFC (defined in AFXRes.h file) .
Do you know about any utility for diagnostic and fixing these problem.
Question by:netformx
    LVL 16

    Accepted Solution

    If you do not build a large resource file by including all other resources and let every dll with its resources, you shouldn't have any problems.

    But if you have compile/runtime problems:

    1) You need to redefine them and recompile affected modules
    2) Otherwise you can try to assign a resource IDs range for each module
    3) That's not good, also redefine.

    Also you can try this addin for VC++
    LVL 43

    Assisted Solution

    Are the dll's extension dll's or regular dll's.  A regular dll 'should' keep the resource ID's it uses to itself.  A duplicate name or ID number shouldn't give a problem.

    I know this isn't a tool but have a look at AfxSetResourceHandle (in a dll it requires the handle to the dll - handle in InitInstance - DO NOT USE AfxGetResourceHandle).  That will put the dll as the first place to search for a resource.
    LVL 43

    Expert Comment


    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.

    Join & Write a Comment

    Suggested Solutions

    In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
    Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    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…

    746 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

    16 Experts available now in Live!

    Get 1:1 Help Now