MIDL Property Pages

The MIDL property pages are available as an item property on an .IDL file in a C++ project that uses COM. Use them to configure the MIDL Compiler. For information on how to programmatically access MIDL options for C++ projects, see VCMidlTool object. See also General MIDL Command-line Syntax.

General Property Page

Preprocessor Definitions

Specifies one or more defines, including MIDL macros (/D)[macros]).

Additional Include Directories

Specifies one or more directories to add to the include path (/I[path]).

Additional Metadata Directories

Specify the directory containing the Windows.Foundation.WinMD file (/metadata_dir [path]).

Enable Windows Runtime

Enable Windows Runtime semantics to create Windows metadata file (/winrt).

Ignore Standard Include Path

Ignore the current and the INCLUDE directories (/no_def_idir).

MkTypLib Compatible

Forces compatibility with mktyplib.exe version 2.03 (/mktyplib203).

Warning Level

Selects the strictness of the MIDL code errors (/W).

Choices

  • 1
  • 1
  • 2
  • 3
  • 4

Treat Warnings as Errors

Enables MIDL to treat all warnings as errors (/WX).

Suppress Startup Banner

Suppress the display of the startup banner and information message (/nologo).

C Compiler Char Type

Specifies the default character type of the C compiler that will be used to compile the generated code. (/char signed|unsigned|ascii7).

Choices

  • Signed - Signed
  • Unsigned - Unsigned
  • Ascii - Ascii

Target Environment

Specifies which environment to target (/env arm32|win32|ia64|x64).

Choices

  • Not Set - Win32
  • Microsoft Windows 32-bit - Win32
  • Microsoft Windows 64-bit on Itanium - IA64
  • Microsoft Windows ARM - ARM
  • Microsoft Windows ARM64 - ARM64
  • Microsoft Windows 64-bit on x64 - X64

Generate Stubless Proxies

Generate fully interpreted stubs with extensions and stubless proxies for object interfaces (/Oicf, /Oif ).

Suppress Compiler Warnings

Suppress compiler warning messages (/no_warn).

Application Configuration Mode

Allow selected ACF attributes in the IDL file (/app_config).

Locale ID

Specifies the LCID for input files, file names and directory paths (/lcid DECIMAL).

Multi-Processor Compilation

Run multiple instances at the same time.

Output Property Page

Output Directory

Specifies the output directory (/out [directory]).

Metadata File

Specifies the name of the generated metadata file (/winmd filename).

Header File

Specifies the name of the generated header file (/h filename).

DllData File

Specifies the name of the DLLDATA file (/dlldata filename).

IID File

Specifies the name for the Interface Identifier file (/iid filename).

Proxy File

Specifies the name of the proxy file (/proxy filename).

Generate Type Library

Specify not to generate a type library ([/notlb] for no).

Type Library

Specifies the name of the type library file (/tlb filename).

Generate Client Stub Files

Generate client stub file only (/client [stub|none]).

Choices

  • Stub - Stub
  • None - None

Generate Server Stub Files

Generate server stub file only (/server [stub|none]).

Choices

  • Stub - Stub
  • None - None

Client Stub File

Specify the client stub file (/cstub [file]).

Server Stub File

Specify the server stub file (/sstub [file]).

Type Library Format

Specifies the type library file format ([/oldtlb|/newtlb]).

Choices

  • NewFormat - New Format
  • OldFormat - Old Format

Advanced Property Page

C Preprocess Options

Specifies switches to pass to C compiler preprocessor (/cpp_opt switches).

Undefine Preprocessor Definitions

Specifies one or more undefines, including MIDL macros (/U [macros]).

Enable Error Checking

Select error checking option ([/error all|none]).

Choices

  • EnableCustom - All
  • All - All
  • None - None

Check Allocations

Check for out of memory errors (/error allocation).

Check Bounds

Check size vs transmission length specification (/error bounds_check).

Check Enum Range

Check enum values to be in allowable range (/error enum).

Check Reference Pointers

Check ref pointers to be non-null (/error ref).

Check Stub Data

Emit additional check for server side stub data validity (/error stub_data).

Prepend with 'ABI' namespace

Prepend the 'ABI' namespace to all types. (/ns_prefix).

Validate Parameters

Generate additional information to validate parameters (/robust | /no_robust).

Struct Member Alignment

Specifies the packing level of structures in the target system (/ZpN).

Choices

  • Not Set - Not Set
  • 1 Byte - Zp1
  • 2 Byte - Zp2
  • 4 Byte - Zp4
  • 8 Byte - Zp8

Redirect Output

Redirects output from screen to a file (/o file).

Minimum Target System

Set the minimum target system (/target STRING).