NdrConformantStringUnmarshall function

The NdrConformantStringUnmarshall function unmarshals the conformant string from the network buffer to memory.


unsigned char * NdrConformantStringUnmarshall(
  unsigned char      **ppMemory,
  PFORMAT_STRING     pFormat,
  unsigned char      fMustAlloc



Pointer to a MIDL_STUB_MESSAGE structure that maintains the current status of the RPC stub. This structure is for internal use only and should not be modified.


Address to a pointer to the unmarshalled conformant string. If set to null, or if the fMustAlloc is set to TRUE, the stub will allocate the memory.


Pointer to the format string description.


Flag that specifies whether the stub must allocate the memory into which the conformant string is to be marshaled. Specify TRUE if RPC must allocate ppMemory.

Return Value

Returns null upon success. 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 is incorrect.
RPC_S_OUT_OF_MEMORY Out of memory.
STATUS_ACCESS_VIOLATION An access violation occurred.
RPC_S_INTERNAL_ERROR An error occurred in RPC.


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