Once the client side RPC run time has connected to the server endpoint, it marshalls the arguments and sends them to the server. The server RPC run time gives the marshalled arguments to the stub that unmarshalls them, and then passes them to the server routines. When the server routines return, the stub picks up the [out] and [in,out] parameters and the return value, marshalls them, and sends the marshalled data to the server RPC run time. The RPC run time sends the data back to the client, where the client RPC run time hands them off to the client side stub that unmarshalls them and returns them to the caller.
Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
