Export (0) Print
Expand All

AllocADsMem function

The AllocADsMem function allocates a block of memory of the specified size.

Syntax


LPVOID AllocADsMem(
  _In_ DWORD cb
);

Parameters

cb [in]

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

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Header

Adshlp.h

Library

Activeds.lib

DLL

Activeds.dll;
AdsLdpc.dll

See also

FreeADsMem
ADsGetLastError
ReallocADsMem
ADSI Error Codes
ADSI Functions

 

 

Show:
© 2015 Microsoft