The information in this article applies to:
SUMMARY
STABLUPD is a sample that explains the internal format of string table
resource in a Win32 executable. It shows how to manipulate the string
resource.
MORE INFORMATIONThe following file is available for download from the Microsoft
Download Center. Click the file name below to download the file: Stablupd.exeFor more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address http://www.microsoft.com/downloads/search.aspand then click How to use the Microsoft Download Center. String resources are stored in a Win32 executable as blocks of strings. Each block can have up to sixteen strings and represents the smallest granularity of string resource that can be loaded/updated. Each block is identified by an identifier(ID), starting with one (1). We use this ID when calling FindResource(), LoadResource() and UpdateResource(). A string with ID, nStringID, is located in the block with ID, nBlockID, given by the following formula:
Each block has sixteen strings, each represented as an ordered pair
(LENGTH, TEXT). LENGTH is a WORD that specifies the size, in terms of
number of characters, in the TEXT that follows. TEXT follows LENGTH and
contains the string in UNICODE without the NULL terminating character.
There may be no characters in TEXT, in which case LENGTH is zero.
An executable does not have a string table block with ID, nBlockID, if it does not have any strings with Ids: ((nBlockID - 1) * 16) through ((nBlockID * 16) - 1). The format is the same in all platforms--Windows NT, Windows 95, and Windows 98. To modify the strings, the sample uses the UpdateResource() function. Because this function is not implemented on Windows 95 and Windows 98, modification of strings is not allowed on these platforms. Additional query words: kbDSupport
Keywords : kbfile kbsample kbNTOS400 kbResource kbSDKPlatform kbString kbGrpUser kbWinOS95 kbWinOS98 |
Last Reviewed: December 7, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |