A user-defined resource-definition statement specifies a resource that contains application-specific data. The data can have any format and can be defined either as the content of a given file (if the filename parameter is given) or as a series of numbers and strings (if the raw-data block is given).
nameID typeID filename
The filename specifies the name of a file containing the binary data of the resource. The contents of the file are included as the resource. RC does not interpret the binary data in any way. It is the programmer's responsibility to ensure that the data is properly aligned for the target computer architecture.
A user-defined resource can also be defined completely in the resource script using the following syntax:
nameID typeID { raw-data }
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 the programmer's responsibility to ensure the proper alignment of data within the block.
The following example shows several user-defined statements:
array MYRES data.res
14 300 custom.res
18 MYRES2
{
"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
}