Click to Rate and Give Feedback
MSDN
MSDN Library
Security
Authentication
 CreateSharedMemory Function
CreateSharedMemory Function

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

Syntax

C++
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 very expensive 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 clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderNtsecpkg.h

See Also

AllocateSharedMemory
DeleteSharedMemory
FreeSharedMemory
LSA_SECPKG_FUNCTION_TABLE
SpInitialize

Send comments about this topic to Microsoft

Build date: 11/19/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker