UtilProcessSetProcessSecurityDescriptor(Process, 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(
Process process,
RawSecurityDescriptor dacl
)
Public Shared Sub SetProcessSecurityDescriptor (
process As Process,
dacl As RawSecurityDescriptor
)
Dim process As Process
Dim dacl As RawSecurityDescriptor
UtilProcess.SetProcessSecurityDescriptor(process,
dacl)
public:
static void SetProcessSecurityDescriptor(
Process^ process,
RawSecurityDescriptor^ dacl
)
static member SetProcessSecurityDescriptor :
process : Process *
dacl : RawSecurityDescriptor -> unit
No code example is currently available or this language may not be supported.
Parameters
- process Process
-
The Process.
- 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 process As Process = Process.GetCurrentProcess().Handle
Dim dacl As RawSecurityDescriptor = GetProcessSecurityDescriptor(process)
' 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(process, 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.