NdrConvert function

The NdrConvert function converts the network buffer from the data representation of the sender to the data representation of the receiver if they are different.


void NdrConvert(
  PFORMAT_STRING     pFormat



Pointer to a MIDL_STUB_MESSAGE structure that maintains the current status of the RPC stub. The pRpcMsg member points to a structure whose Buffer member contains the data to convert. This structure is for internal use only and should not be modified.


Pointer to type format of the data to convert.

Return Value

This function has no return values. If an error occurs, the function throws one of the following exception codes.

Error Description
RPC_BAD_STUB_DATA or RPC_X_INVALID_BOUND The network buffer is incorrect.
STATUS_ACCESS_VIOLATION An access violation occurred.
RPC_S_INTERNAL_ERROR An error occurred in RPC.


The NdrConvert function is used by all /Oi, /Oic, and /Os mode stubs.


Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header rpcndr.h (include Rpc.h)
Library RpcRT4.lib
DLL RpcRT4.dll