SaferCreateLevel function (winsafer.h)
The SaferCreateLevel function opens a SAFER_LEVEL_HANDLE.
Syntax
BOOL SaferCreateLevel(
[in] DWORD dwScopeId,
[in] DWORD dwLevelId,
[in] DWORD OpenFlags,
[out] SAFER_LEVEL_HANDLE *pLevelHandle,
LPVOID lpReserved
);
Parameters
[in] dwScopeId
The scope of the level to be created. The following table shows the possible values.
Value | Meaning |
---|---|
|
The scope of the created level is by computer. |
|
The scope of the created level is by user. |
[in] dwLevelId
The level of the handle to be opened. The following table shows the possible values.
[in] OpenFlags
This can be the following value.
Value | Meaning |
---|---|
|
[out] pLevelHandle
The returned SAFER_LEVEL_HANDLE. When you have finished using the handle, close it by calling the SaferCloseLevel function.
lpReserved
This parameter is reserved for future use. Set it to NULL.
Return value
Returns nonzero if successful or zero otherwise.
For extended error information, call GetLastError.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | winsafer.h |
Library | Advapi32.lib |
DLL | Advapi32.dll |
API set | ext-ms-win-advapi32-safer-l1-1-0 (introduced in Windows 8) |