Resource Compiler (resourcecompiler.exe)

This resource compiler is used to generate platform-independent string resource files for use by the unmanaged portion of the Shared Source CLI 2.0 (SSCLI) and supporting unmanaged tools.  This tool is not intended for use with managed applications. 

Resourcecompiler.exe is functionally similar to the Microsoft® Win32 SDK resource compiler, Rc.exe but is considerably simplified. Resourcecompiler.exe parses Win32-formatted *.rc files and creates UTF8-encoded text files with the .satellite extension rather than producing Win32 binary *.res files like rc.exe.

This tool only handles STRINGTABLE resources, not Win32 icons, bitmaps, dialog boxes, or other non-string Microsoft® Windows® resource formats.

Usage

resourcecompiler [options] inputfile
Argument Description
inputfile Name of file to be compiled to a .satellite resource

Options

Option Description
/? Displays a list of command-line options.

When you use this tool on UNIX system-based platforms, /? might expand to a filename. Instead simply enter the command "resourcecompiler" with no options and the usage text will be sent to the console.

/d Defines a symbol for the preprocessor that you can test with the ifdef directive
/fo Renames the output file.
/h Displays a list of command-line options.
/i Searches the specified directory before searching the directories specified by the INCLUDE environment variable.
/c Specifies the codepage to be used for resource compilation.
/n Terminates all strings in the string table with nulls.
/r Ignored. Provided for compatibility with existing makefiles.
/l Ignored. Provided for compatibility with existing makefiles.
/z Ignored. Provided for compatibility with existing makefiles.
/u Undefines a symbol for the preprocessor.
/v Displays messages that report on the progress of the compiler.
/w Warns only if the codepage is invalid. The default is an error.
/x Prevents the resource compiler from checking the INCLUDE environment variable when searching for header files or resource files.

Resource Compiler Input

Resource files used by resourcecompiler.exe can contain:

Other resources encountered within resource files should produce an error message.

Resource Compiler Output

The output of the resource compiler is not a Win32 .res file. Instead, it is a text file (ending with the .satellite extension) containing stringID/string pairs, with the following constraints:

The satellite file is a UTF-8 encoded file containing a list of pairs of decimal numbers and quoted string pairs, with a space between. The maximum string length is 511 bytes, not including the required quotes.

For example, the following three entries are valid:

1 "This is a message"
2 "This is a message"
39 "This is
another message"

But the following entries are not valid:

A "This is a message"
1 2

Additional Information

On error (including exceptions from within the tool), the tool will exit with a nonzero exit code and delete the output file to ensure any partial output is not inadvertently left behind.

The *.satellite files can be read by calling APIs within the PALRT:

For more details on these APIs, see sscli20/palrt/inc/rotor_palrt.h.


Copyright (c) 2006 Microsoft Corporation. All rights reserved.