Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

/target switch

The /target switch enables the MIDL compiler to enable optimizations available only on recent versions of Windows. The /target switch automatically activates additional switches.


midl /target level

Switch Options

level

Specifies the target level, such as NT50, NT51, NT60, NT61, or NT62.

Remarks

The /target switch automatically activates additional switches, based on the operating system, as specified in the following table:

Operating system/target levelSwitches Activated
Windows 2000NT50/Oicf /error all /robust
Windows XPNT51/Oicf /error all /robust /protocol all
Windows VistaNT60/Oicf /error all /robust /protocol all
Windows 7NT61/Oicf /error all /robust /protocol all
Windows 8NT62/Oicf /error all /robust /protocol all

 

To ensure a stub runs on the system specified by the /target switch, MIDL issues an error when a feature available only on a more recent version of Windows is present. The following table specifies the minimum /target level required to enable the feature. Higher target levels include all features from lower target levels.

Minimum required /target levelFeatures
NT50

/robust

[message]

[async]

[async_uuid]

[notify] in /Oicf mode

[encode] or [decode] in /Oicf mode

NT51

/protocol 64-bit support

[partial_ignore]

[force_allocate]

NT60

Forced complex structure marshalling

Context handles in an array or structure

[range] support for unsized strings

[type_strict_context_handle]

NT61

Direct COM stub calls for interfaces with less than 32 methods requires linking COM stubs with OLE32.DLL.

NT62

ARM support

WinRT support

 

Examples

midl /target NT50

See also

General MIDL Command-line Syntax
/osf

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.