midl /prefix { client | server | switch | all }
midl /prefix client "c_" server "s_"
midl /prefix all "foo_"
midl /prefix client "bar_"
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. 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.
General MIDL Command-line Syntax