UtilProcessSetProcessSecurityDescriptor(IntPtr, RawSecurityDescriptor) Method
Sets the security descriptor of the specified process.
Namespace: DevCase.Core.Diagnostics.ProcessesAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static void SetProcessSecurityDescriptor(
IntPtr processHandle,
RawSecurityDescriptor dacl
)
Public Shared Sub SetProcessSecurityDescriptor (
processHandle As IntPtr,
dacl As RawSecurityDescriptor
)
Dim processHandle As IntPtr
Dim dacl As RawSecurityDescriptor
UtilProcess.SetProcessSecurityDescriptor(processHandle,
dacl)
public:
static void SetProcessSecurityDescriptor(
IntPtr processHandle,
RawSecurityDescriptor^ dacl
)
static member SetProcessSecurityDescriptor :
processHandle : IntPtr *
dacl : RawSecurityDescriptor -> unit
No code example is currently available or this language may not be supported.
Parameters
- processHandle IntPtr
-
The process handle.
- dacl RawSecurityDescriptor
-
The security descriptor.
This is a code example.
No code example is currently available or this language may not be supported.
' Read the process DACL.
Dim processHandle As IntPtr = Process.GetCurrentProcess().Handle
Dim dacl As RawSecurityDescriptor = GetProcessSecurityDescriptor(processHandle)
' Insert the new ACE.
Dim ace As New CommonAce(AceFlags.None, AceQualifier.AccessDenied, DevCase.Interop.Unmanaged.Win32.ProcessAccessRights.AllAccess, New SecurityIdentifier(WellKnownSidType.WorldSid, Nothing), False, Nothing)
dacl.DiscretionaryAcl.InsertAce(0, ace)
' Save the process DACL.
SetProcessSecurityDescriptor(processHandle, dacl)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.