AdvApi32SetKernelObjectSecurity Method

Sets the security of a kernel object. For example, this can be a process, thread, or event.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: 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
)

Parameters

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.

Return Value

Boolean
If the function succeeds, the return value is .

If the function fails, the return value is

To get extended error information, call GetLastWin32Error.

Remarks

See Also