SAMPLE: RCData.exe Uses User-Defined Resources in Windows Apps

ID: Q37657

The information in this article applies to:

SUMMARY

RCData.exe is a sample that demonstrates how to use a user-defined resource in a Windows-based application.

The resource is declared in the resource (RC) file as follows:

   TEST RCDATA
   BEGIN
       <data goes here>
   END

An application accesses this resource with the following statements:

   hFound = FindResource(hInstance, "TEST", RT_RCDATA);
   hRes = LoadResource(hInstance, hFound);
   lpBuff = LockResource(hRes);

   // use lpBuff to access the resource contents

   bResult = UnlockResource(hRes);
   bResult = FreeResource(hRes);

MORE INFORMATION

The following file is available for download from the Microsoft Software Library:

 ~ RCData.exe (size: 18204 bytes) 

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from Online Services

Additional query words: Keywords : kbfile kbsample kbResource kbGrpUser kbWinOS310 kbWinOS300

Last Reviewed: December 26, 1998