[DllImport("advapi32.dll", SetLastError=true)]
static extern bool SetSecurityDescriptorDacl(ref SECURITY_DESCRIPTOR sd, bool daclPresent, IntPtr dacl, bool daclDefaulted);
<DllImportAttribute("advapi32.dll", EntryPoint:="SetSecurityDescriptorDacl")> _
Private Shared Function SetSecurityDescriptorDacl(ByRef pSecurityDescriptor As SECURITY_DESCRIPTOR, <MarshalAsAttribute(UnmanagedType.Bool)> ByVal bDaclPresent As Boolean, <InAttribute()> ByVal pDacl As System.IntPtr, <MarshalAsAttribute(UnmanagedType.Bool)> ByVal bDaclDefaulted As Boolean) As UInteger
End Function
Do you know one? Please contribute it!
None.
Please add some!
// Initialize the security descriptor structure
SECURITY_DESCRIPTOR securityDesc = new SECURITY_DESCRIPTOR();
InitializeSecurityDescriptor(out securityDesc, 1);
SetSecurityDescriptorDacl(ref securityDesc, true, IntPtr.Zero, false);