/protocol switch

The /protocol switch specifies which wire protocol is supported by the generated stub.

midl /protocol (dce | ndr64 | all)

Switch Options


The generated stub supports DCE protocol only.


The generated stub supports Microsoft NDR64 protocol only.


The generated stub supports all available protocols for a given environment.


RPC marshals and unmarshals data according to a strict wire protocol, also called transfer syntax, that defines data wire representation such as the order in which data members are marshaled, the alignment of data on the wire, additional information included with the data, among others. Microsoft RPC is compatible with OSF DCE's NDR (network data representation) protocol. In the 64-bit release of Windows XP, Microsoft introduces an experimental protocol NDR64 that is optimized for transferring 64-bit data. NDR64 is not backward compatible with the DCE protocol.

The dce protocol is compatible with OSF DCE's NDR transfer syntax. This protocol is optimized for transferring 32-bit data.

The ndr64 protocol is currently supported only when used in conjunction with the /win64 switch. If a ndr64 only client tries to connect to a dce-only server, or vice versa, the call is rejected with RPC_S_UNSUPPORTED_TRANS_SYN.

The all option creates a stub that may use any available protocol. For 32-bit stubs, the only protocol currently available is DCE. For 64-bit stubs, created using the /win64 switch, both DCE and NDR64 are available.


midl /protocol all /win64 filename.idl

See also