MIDLRT is a command line tool used to create metadata (.winmd) files that represent the API of your own custom Windows Runtime component.
You can use this nice tool as easy as writing this command:
One option you can specify is the "metadata_dir" option, like in this example:
C:>midlrt MyRuntimeComponent.idl /metadata_dir "C:\windows\system32\WinMetaData"
When the tool MIDLRT has finished his job, you will have the following files in your current directory:
Another nice tool you can use with all this stuff is "WINMDIDL". This is also a command-line tool you can use to generate automatically IDL files from your metadata files (.winmd) like this: