MIDLRT and Windows Runtime components

Shows how to create metadata (.winmd) files that represent the API for custom Windows Runtime components.

Use the MIDLRT compiler to build metadata (.winmd) files for your custom Windows Runtime components.

When your metadata files are generated, you can compose them into a more efficient package by using the MDMERGE utility. For more info, see MDMERGE and metadata files.

Using MIDLRT is similar to using the MIDL compiler. Run MIDLRT from the command line using the following command:

midlrt <options> filename.idl

where <options> represents the command-line options you want to use, and Filename.idl is the name of the IDL file to compile.

The following list shows the command-line switches that MIDLRT.EXE uses.

/enum_class
/metadata_dir
/nomidl
/nomd
/ns_prefix
/winmd
/winrt

A complete listing of MIDLRT compiler switches and options is available when you use the MIDLRT compiler /help and /? switches. The switches are organized by categories. For more info, see the MIDL Command-Line Reference.

MDMERGE and metadata files