The Server Stub

The server stub provides surrogate entry points on the server for each of the operations defined in the input IDL file.

When a server stub routine is invoked by the RPC run-time library, it performs the following functions:

  • Unmarshals input arguments (unpacks the arguments from their transmitted formats).
  • Calls the actual implementation of the procedure on the server.
  • Marshals output arguments (packages the arguments into the transmitted forms).

The MIDL compiler switches /server, /sstub, and /out affect the server stub file.