NdrConformantStringUnmarshall 函数 (rpcndr.h)

NdrConformantStringUnmarshall 函数将一致性字符串从网络缓冲区解封到内存。

语法

unsigned char * NdrConformantStringUnmarshall(
  [in, out] PMIDL_STUB_MESSAGE pStubMsg,
  [out]     unsigned char      **ppMemory,
  [in]      PFORMAT_STRING     pFormat,
  [in]      unsigned char      fMustAlloc
);

参数

[in, out] pStubMsg

指向保持 RPC 存根当前状态 的MIDL_STUB_MESSAGE 结构的指针。 此结构仅供内部使用,不应修改。

[out] ppMemory

指向未封送的一致性字符串的指针的地址。 如果设置为 null,或者 fMustAlloc 设置为 TRUE,则存根将分配内存。

[in] pFormat

指向格式字符串说明的指针。

[in] fMustAlloc

指定存根是否必须分配一致性字符串封送的内存的标志。 如果 RPC 必须分配 ppMemory,则指定 TRUE

返回值

成功后返回 null。 如果发生错误,函数将引发以下异常代码之一。

错误 说明
RPC_BAD_STUB_DATA或RPC_X_INVALID_BOUND 网络不正确。
RPC_S_OUT_OF_MEMORY 内存不足。
STATUS_ACCESS_VIOLATION 发生访问冲突。
RPC_S_INTERNAL_ERROR RPC 中出错。

要求

要求
最低受支持的客户端 Windows 2000 专业版 [桌面应用 |UWP 应用]
最低受支持的服务器 Windows 2000 Server [桌面应用 |UWP 应用]
目标平台 Windows
标头 rpcndr.h (包括 Rpc.h)
Library Rpcrt4.lib
DLL Rpcrt4.dll