RCDATA Resource

The RCDATA resource-definition statement specifies a raw data resource for an application. Raw data resources permit the inclusion of binary data directly in the executable file.

Syntax

nameID RCDATA  [[optional-statements]]  {       raw-data      . . .  }
 

Parameters

nameID
Specifies either a unique name or a 16-bit unsigned integer value that identifies the resource.
optional-statements
Zero or more of the following statements:
Statement Description
CHARACTERISTICS dword User-defined information about a resource that can be used by tools that read and write resource files.
LANGUAGE language, sublanguage Specifies the language for the resource. The parameters are constants from WINNT.H.
VERSION dword User-defined version number for the resource that can be used by tools that read and write resource files.

raw-data
Specifies raw data consisting of one or more integers or strings of characters. Integers can be specified in decimal, octal, or hexadecimal format. To be compatible with 16-bit Windows, integers are stored as WORD values. You can store an integer as a DWORD value by qualifying the integer with the L suffix.

Strings are enclosed in quotation marks. RC does not automatically append a terminating null character to a string. Each string is a sequence of the specified ANSI characters, unless you qualify it as a wide-character string with the L prefix.

The block of data begins on a DWORD boundary and RC performs no padding or alignment of data within the raw-data block. It is your responsibility to ensure the proper alignment of data within the block.

Example

The following example demonstrates the use of the RCDATA statement:

resname RCDATA
{
   "Here is an ANSI string\0",    // explicitly null-terminated 
   L"Here is a Unicode string\0", // explicitly null-terminated 
   1024,                          // integer, stored as WORD 
   7L,                            // integer, stored as DWORD 
   0x029a,                        // hex integer 
   0o733,                         // octal integer 
} 
 

See Also

ACCELERATORS, CHARACTERISTICS, DIALOG, LANGUAGE, MENU, STRINGTABLE, VERSION