AllocADsMem function (adshlp.h)
The AllocADsMem function allocates a block of memory of the specified size.
Syntax
LPVOID AllocADsMem(
[in] DWORD cb
);
Parameters
[in] cb
Type: DWORD
Contains the size, in bytes, to be allocated.
Return value
Type: LPVOID
When successful, the function returns a non-NULL pointer to the allocated memory. The caller must free this memory when it is no longer required by passing the returned pointer to FreeADsMem.
Returns NULL if not successful. Call ADsGetLastError to obtain extended error status. For more information about error code values, see ADSI Error Codes.
Remarks
The memory block returned by AllocADsMem is initialized to zero.
For more information and a code example that shows how to use the AllocADsMem function, see ReallocADsMem.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | adshlp.h |
Library | Activeds.lib |
DLL | Activeds.dll; AdsLdpc.dll |