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