LSA_ALLOCATE_SHARED_MEMORY callback function (ntsecpkg.h)

The AllocateSharedMemory function allocates a block of shared memory from a section of memory previously reserved by a call to the CreateSharedMemory function.

Syntax

LSA_ALLOCATE_SHARED_MEMORY LsaAllocateSharedMemory;

PVOID LsaAllocateSharedMemory(
  [in] PVOID SharedMem,
  [in] ULONG Size
)
{...}

Parameters

[in] SharedMem

Pointer to a section of reserved shared memory.

[in] Size

Specifies the amount of shared memory to allocate, in bytes.

Return value

If the function succeeds, the return value is a pointer to the allocated memory.

If the function fails, the return value is NULL.

Remarks

Reserve a section of shared memory using the CreateSharedMemory function. Free a block of memory allocated by AllocateSharedMemory using the FreeSharedMemory function.

A pointer to the AllocateSharedMemory function is available in the LSA_SECPKG_FUNCTION_TABLE structure received by the SpInitialize function.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header ntsecpkg.h

See also

CreateSharedMemory

FreeSharedMemory

LSA_SECPKG_FUNCTION_TABLE

SpInitialize