AdvApi32SetKernelObjectSecurity Method
Sets the security of a kernel object. For example, this can be a process, thread, or event.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("AdvApi32.dll", SetLastError = true)]
public static bool SetKernelObjectSecurity(
IntPtr handle,
SecurityInformation securityInformation,
byte[] securityDescriptor
)
<DllImportAttribute("AdvApi32.dll", SetLastError := true>]
Public Shared Function SetKernelObjectSecurity (
handle As IntPtr,
securityInformation As SecurityInformation,
securityDescriptor As Byte()
) As Boolean
Dim handle As IntPtr
Dim securityInformation As SecurityInformation
Dim securityDescriptor As Byte()
Dim returnValue As Boolean
returnValue = AdvApi32.SetKernelObjectSecurity(handle,
securityInformation, securityDescriptor)
public:
[DllImportAttribute(L"AdvApi32.dll", SetLastError = true)]
static bool SetKernelObjectSecurity(
IntPtr handle,
SecurityInformation securityInformation,
[InAttribute] array<unsigned char>^ securityDescriptor
)
[<DllImportAttribute("AdvApi32.dll", SetLastError = true)>]
static member SetKernelObjectSecurity :
handle : IntPtr *
securityInformation : SecurityInformation *
securityDescriptor : byte[] -> bool
No code example is currently available or this language may not be supported.
- handle IntPtr
-
A handle to a kernel object for which security information is set.
- securityInformation SecurityInformation
-
A set of flags that indicate the type of security information to set.
This parameter can be a combination of the SecurityInformation flags.
- securityDescriptor Byte
-
A pointer to a SECURITY_DESCRIPTOR structure that contains the new security information.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
To get extended error information, call
GetLastWin32Error.