Expand Minimize

CreateSharedMemory function

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

Syntax


PVOID NTAPI CreateSharedMemory(
  _In_  ULONG MaxSize,
  _In_  ULONG InitialSize
);

Parameters

MaxSize [in]

Specifies the maximum size of the shared memory.

InitialSize [in]

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]

Header

Ntsecpkg.h

See also

AllocateSharedMemory
DeleteSharedMemory
FreeSharedMemory
LSA_SECPKG_FUNCTION_TABLE
SpInitialize

 

 

Community Additions

ADD
Show:
© 2014 Microsoft