/prefix switch

The /prefix switch directs the MIDL compiler to add prefix strings to the client and/or server stub routine names. This can be used to allow a single program to be both a client and server of the same interface, without having the client- and server-side routine names conflict with each other.

midl /prefix { client | cstub | server | sstub | switch | all }

Switch Options

client

Affects only the client stub routine names.

cstub

Same as client. Affects only the client stub routine names.

server

Affects only the routine names called by the server stub routine.

sstub

Same as server. Affects only the routine names called by the server stub routine.

switch

Affects an extra prototype added to the header file.

all

Affects both the client and server stub routine names.

Remarks

If the prefix for the client-side routines is different from the prefix for the server-side routines, the generated header file will have both client-side routine prototypes and server-side routine prototypes.

The /prefix switch is useful when a single header file will be used with stubs from multiple runs of the MIDL compiler. This forces additional routine prototypes in the header file.

In all cases, the client, server, and switch prefixes will override an all prefix.

Examples

midl /prefix client "c_" server "s_"

midl /prefix all "moo_"

midl /prefix client "bark_"

See also

General MIDL Command-line Syntax