How To Edit Resources in Executables with Visual C++ (139030)



The information in this article applies to:

  • The Resource Editor, when used with:
    • Microsoft Visual C++, 32-bit Editions 4.0
    • Microsoft Visual C++, 32-bit Enterprise Edition 5.0
    • Microsoft Visual C++, 32-bit Professional Edition 5.0
    • Microsoft Visual C++, 32-bit Enterprise Edition 6.0
    • Microsoft Visual C++, 32-bit Professional Edition 6.0
    • Microsoft Visual C++, 32-bit Learning Edition 6.0

This article was previously published under Q139030

SUMMARY

Windows NT and Windows 2000 provide APIs that allow you to modify resources in an executable or DLL. When the resource is opened, Developer Studio checks to ensure that it can write to the file. If not, you will be warned.

Windows 95, Windows 98, and Windows Millennium Edition (Me) do not support the APIs necessary to do this. When the resource is loaded, the following warning appears:
Microsoft Developer Studio cannot save the modified resources back to this executable. The executable may be in use, or this version of Windows may not support updating resources in executables.
In Visual C++, version 4.0, the executable can not be modified. Beginning with Visual C++, version 5.0, the resources within the executable can be modified and saved. To modify resources within Visual C++, version 5.0 or later, use the following steps:
  1. On the File menu, click Open.
  2. Locate an executable or Dll containing resources.
  3. In the Open dialog, select Resources in the Open As list.
  4. Click OK.
  5. The resources for the selected binary file should appear.
At this point, the resources can be modified as they would from the ResourceView in a Visual C++ project. Saving the binary file makes those changes permanent.

Modification Type:MinorLast Reviewed:7/1/2004
Keywords:kbhowto KB139030