SAMPLE: Code Extracts and Displays Application Resources

Last reviewed: April 7, 1997
Article ID: Q81336
3.10 WINDOWS kbprg kbfile

The information in this article applies to:

  • Microsoft Windows Software Development Kit (SDK) for Windows version 3.1

SUMMARY

There are situations in which an application extracts information from another application's executable image file without loading the other application. The Microsoft Windows Program Manager does this when it extracts an icon from an .EXE file to represent the application.

.EXE (and DLL) files contain many resources and tables that may be useful in various circumstances. The EXEVIEW sample application demonstrates how to extract and decode these resources from application and library executable image files.

Download EXEVIEW.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:

  • Microsoft Download Service (MSDL)

          Dial (206) 936-6735 to connect to MSDL
          Download EXEVIEW.EXE (size: 48733 bytes) 
    
  • Internet (anonymous FTP)

          ftp ftp.microsoft.com
          Change to the \SOFTLIB\MSLFILES directory
          Get EXEVIEW.EXE (size: 48733 bytes) 
    

NOTE: Because EXEVIEW uses code from the common dialog boxes dynamic-link library (COMMDLG.DLL), version 3.1 of the Microsoft Windows SDK is required to build the sample. However, EXEVIEW will run under either Windows version 3.0 or 3.1 provided that the COMMDLG.DLL file is installed.

MORE INFORMATION

EXEVIEW uses the information in both the Old Executable Header and the New Executable Header, each of which are documented in "The MS-DOS Encyclopedia" (Microsoft Press). EXEVIEW loads both headers and all the tables to which they refer. These tables include: the entry table, the segment table, the resource table, the resident and nonresident name tables, and the imported name table. EXEVIEW loads the resources listed in the resource table and displays them. Windows resources (icons, cursors, bitmaps, menus, and so forth) are displayed graphically. String tables and resource directories (of icons, cursors, fonts, and so forth) are listed in text format.

For more information on the file formats and resource formats, see the Windows SDK "Programmer's Reference, Volume 4: Resources," "The MS-DOS Encyclopedia," the September, 1991, issue of the "Microsoft Systems Journal," or the Microsoft Open Tools documentation.


Additional reference words: 3.10 softlib EXEVIEW.EXE
KBCategory: kbprg kbfile
KBSubcategory: UsrRes
Keywords : UsrRes kbfile kbprg
Version : 3.10
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 7, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.