Get the Right RPC SDK Files

The MIDL compiler, RPC header files, and RPC import libraries that are necessary to build interface marshalers might not be a part of your development environment. They are really part of Microsoft's RPC development kit. They can be found in the Win32 SDK but are not included with compilers such as Visual C++. Specifically, you need the following files from the Win32 SDK in order to work with MIDL:

MIDL.EXE

The MIDL compiler

RPCPROXY.H

The header file for interface marshalers

UNKWN.IDL

Contains the IDL description for IUnknown that you include in your own IDL files; pulls in WTYPES.IDL

WTYPES.IDL

Contains IDL descriptions of Windows types, structures, and so on

RPCRT4.LIB

A mixed static-link and import library that provides the rest of the interface proxy/stub implementation you'll need


In addition, the Win32 SDK contains full documentation for MIDL and the IDL language. This book doesn't document them beyond what is in the following section.