NdrConvert function (rpcndr.h)

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.

Syntax

void NdrConvert(
  [in] PMIDL_STUB_MESSAGE pStubMsg,
  [in] PFORMAT_STRING     pFormat
);

Parameters

[in] pStubMsg

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.

[in] pFormat

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.

Remarks

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

Requirements

Requirement Value
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