RpcSsEnableAllocate

The RpcSsEnableAllocate function establishes the stub memory management environment.

#include <rpc.h>
void RPC_ENTRY RpcSsEnableAllocate (VOID);

Remarks

In cases where the stub memory management is not enabled by the stub itself, the RpcSsEnableAllocate routine is called by applications to establish the stub memory management environment. This environment must be established prior to making a call to RpcSsAllocate. For server manager code called from the stub, the memory management environment is usually established by the stub itself. Otherwise, call RpcSsEnableAllocate before calling RpcSsAllocate. See Memory Management for a complete discussion of the memory management conditions used by RPC. To learn how spawned threads use a stub memory management environment, see RpcSsGetThreadHandle and RpcSsSetThreadHandle later in this section.

Note  The RpcSsEnableAllocate routine raises exceptions, while the RpcSmEnableAllocate routine returns the error code.

Return Values

Value Meaning
RPC_S_OUT_OF_MEMORY Out of memory

QuickInfo

  Windows NT: Yes
  Windows CE: Unsupported.
  Header: Declared in rpcndr.h.
  Import Library: Link with rpcrt4.lib.

See Also

RpcSmEnableAllocate, RpcSsAllocate, RpcSsDisableAllocate