RCDATA Resource

This 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

Specifies options for an RCDATA resource. It can be zero or more of the following statements:

Value Description
CHARACTERISTICS dword User-defined information about a resource that can be used by tools that read and write resource files. For more information, see CHARACTERISTICS.
LANGUAGE language, sublanguage Specifies the language for the resource. For more information, see LANGUAGE.
VERSION dword User-defined version number for the resource that can be used by tools that read and write resource files. For more information, see VERSION.

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. The Resource Compiler (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 the 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 code example shows how to use 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