LSA_CREATE_SHARED_MEMORY callback function

The CreateSharedMemory function creates a section of memory that is shared by client processes and the security package.

Syntax

LSA_CREATE_SHARED_MEMORY LsaCreateSharedMemory;

PVOID LsaCreateSharedMemory(
  ULONG MaxSize,
  ULONG InitialSize
)
{...}

Parameters

MaxSize

Specifies the maximum size of the shared memory.

InitialSize

Specifies the initial size of the shared memory.

Return Value

The function returns a pointer to the block of shared memory, or NULL if the block was not reserved.

Remarks

Creating a shared section for each client is not advisable because it is a resource-intensive operation and may exhaust system resources.

The package's clients can write to shared memory which makes it susceptible to attack. Data in the shared segment should not be trusted.

The pointer returned by the CreateSharedMemory function is required by the AllocateSharedMemory, DeleteSharedMemory, and FreeSharedMemory functions.

Use the DeleteSharedMemory function to release memory reserved by the CreateSharedMemory function.

Pointers to these functions are available in the LSA_SECPKG_FUNCTION_TABLE structure received by the SpInitialize function.

Requirements

   
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

AllocateSharedMemory

DeleteSharedMemory

FreeSharedMemory

LSA_SECPKG_FUNCTION_TABLE

SpInitialize