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 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 client | Windows 2000 Professional |
| Minimum supported server | Windows 2000 Server |
| Header | Ntsecpkg.h |
See Also
- AllocateSharedMemory
- DeleteSharedMemory
- FreeSharedMemory
- LSA_SECPKG_FUNCTION_TABLE
- SpInitialize
Send comments about this topic to Microsoft
Build date: 11/19/2009