Error Code 1812

Hi !!
I am using LoadMenu Win32 Call but ,
it gices me Error Code 1812.
I similar application I don't have this problem. I looked at Help of VC++
it says :

1812 The specified image file did not contain a resource section.  ERROR_RESOURCE_DATA_NOT_FOUND

How would I resolve this error ?

Thanks

mab11Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mab11Author Commented:
Edited text of question.
0
arikkaCommented:
The LoadMenu function loads the specified menu resource from the executable (.EXE) file. The second parameter is lpMenuName -  null-terminated string that contains the name of the menu resource. Alternatively, this parameter can consist of the resource identifier (MAKEINTRESOURCE macro)

I.
=======================================
1. Make sure you eneter correct name;
2. Make sure you link your EXE with
   the resourse;
3. Check  the resource and make sure
   that menu resource exist there.
======================================

II.

See example:

Your C++ code :
m_hMenu = LoadMenu( m_hInst, MAKEINTRESOURCE(IDM_MENU) );

In your resource file : bla-bla.RC
should be something like
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//

IDM_MENU MENU DISCARDABLE
BEGIN
    POPUP "Root"
    BEGIN
        MENUITEM "CreateGroup",                 ID_ROOT_CREATEGROUP
        MENUITEM "EnumRootGroups",              ID_ROOT_ENUMROOTGROUPS
        MENUITEM "Refresh",                     ID_ROOT_ENUMRECURSIVE
    END
    POPUP "Group"
    BEGIN
        MENUITEM "CreateGroupInGroup",          ID_CREATEGROUPINGROUP
        MENUITEM "DestroyGroup",                ID_DESTROYGROUP
        MENUITEM "SetGroupName",                ID_GROUP_SETGROUPNAME
        MENUITEM SEPARATOR
        MENUITEM "StartSession",                ID_GROUP_STARTSESSION
        , GRAYED
        MENUITEM "ConnectionSettings",          ID_GROUP_CONNECTIONSETTINGS
        , GRAYED
    END
    POPUP "Player"
    BEGIN
        MENUITEM "DestroyPlayer",               ID_PLAYER_DESTROYPLAYER
        MENUITEM "GetPlayerName",               ID_PLAYER_GETPLAYERNAME
        MENUITEM "SetPlayerName",               ID_PLAYER_SETPLAYERNAME
    END
    POPUP "Shortcut"
    BEGIN
        MENUITEM "DeleteGroupFromGroup",        ID_SHORTCUT_DELETEGROUPFROMGROUP

        MENUITEM "SetGroupName",                ID_SHORTCUT_SETGROUPNAME
    END
    POPUP "PlayerInGroup"
    BEGIN
        MENUITEM "DeletePlayerFromGroup",       ID_PLAYERINGROUP_DELETEPLAYERFROMGROUP

        MENUITEM "SetPlayerName",               ID_PLAYERINGROUP_SETPLAYERNAME

    END
END
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mab11Author Commented:
I checked all of the above,
looks normal to me
0
arikkaCommented:
1. Pls give some code examples from
   RC file and CPP/C where you use
   LoadMenu
2. What configuration do you work with?
   WIN32DEBUG,WIN32UNICODE?
3. Make sure you have the same
   configuration in your two projects.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.