RpcSmEnableAllocate function (rpcndr.h)

The RpcSmEnableAllocate function establishes the stub memory–management environment.

Syntax

RPC_STATUS RpcSmEnableAllocate();

Return value

Value Meaning
RPC_S_OK
The call succeeded.
RPC_S_OUT_OF_MEMORY
The system is out of memory.
 
Note  For a list of valid error codes, see RPC Return Values.
 

Remarks

In cases where the stub memory management is not enabled by the server stub itself, applications call RpcSmEnableAllocate to establish the stub memory–management environment. This environment must be established prior to making a call to RpcSmAllocate. In OSF-compatibility (/osf) mode, for server manager code called from the stub, the memory-management environment may be established by the server stub itself by using pointer manipulation or the enable_allocate attribute. In default (Microsoft-extended) mode, the environment is established only upon request by using the enable_allocate attribute. Otherwise, call RpcSmEnableAllocate before calling RpcSmAllocate. For more information, see Memory Management, RpcSmGetThreadHandle, and RpcSmSetThreadHandle.

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

See also

RpcSmAllocate

RpcSmDisableAllocate