RpcSsAllocate function (rpcndr.h)
The RpcSsAllocate function allocates memory within the RPC stub memory-management function, and returns a pointer to the allocated memory or NULL.
void * RpcSsAllocate( size_t Size );
Size of memory to allocate, in bytes.
||The system is out of memory.|
The RpcSsAllocate function allows an application to allocate memory within the RPC stub memory–management function. Prior to calling RpcSsAllocate, the memory-management environment must already be established. For memory management called within the stub, the stub itself usually establishes the necessary environment. For more information, see Memory Management. When using RpcSsAllocate to allocate memory not called from the stub, the application must call RpcSsEnableAllocate to establish the required memory-management environment.
The RpcSsAllocate routine returns a pointer to the allocated memory, if the call was successful. Otherwise, it raises an exception.
When the stub establishes the memory management, it frees any memory allocated by RpcSsAllocate. The application can free such memory before returning to the calling stub by calling RpcSsFree.
To manage the same memory within the stub memory–management environment, multiple threads can call RpcSsAllocate and RpcSsFree. In this case, the threads must share the same stub memory management–thread handle. Applications pass thread handles from thread-to-thread by calling RpcSsGetThreadHandle and RPCSsSetThreadHandle.
|Minimum supported client||Windows 2000 Professional [desktop apps | UWP apps]|
|Minimum supported server||Windows 2000 Server [desktop apps | UWP apps]|
|Header||rpcndr.h (include Rpc.h)|