Desktop Functions: Smart Device Functions:
|
Search Results for "SECURITY_DESCRIPTOR" in [All]user32
pSIRequested, [MarshalAs(UnmanagedType.LPStruct)] SECURITY_DESCRIPTOR pSD); Structures
public IntPtr shi502_security_descriptor;
public IntPtr shi503_security_descriptor; Constants5: PROPERTYKEY
public static PropertyKey PKEY_Device_Security = new PropertyKey(0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 25); // DEVPROP_TYPE_SECURITY_DESCRIPTOR
public static PropertyKey PKEY_Device_SecuritySDS = new PropertyKey(0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 26); // DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING
public static PropertyKey PKEY_DeviceClass_Security = new PropertyKey(0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 25); // DEVPROP_TYPE_SECURITY_DESCRIPTOR
public static PropertyKey PKEY_DeviceClass_SecuritySDS = new PropertyKey(0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 26); // DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING Enumsmqrt
public const uint MQ_ERROR_SECURITY_DESCRIPTOR_TOO_SMALL = 0xC00E0023;
if (mqrt.MQ_ERROR_SECURITY_DESCRIPTOR_TOO_SMALL == result) {
public const uint MQ_ERROR_SECURITY_DESCRIPTOR_TOO_SMALL = 0xC00E0023;
advapi32.SECURITY_DESCRIPTOR sd = new advapi32.SECURITY_DESCRIPTOR(); advapi329: GetAce
public IntPtr shi502_security_descriptor;
GetSecurityDescriptorDacl(shareInfo.shi502_security_descriptor, out bDaclPresent, ref pAcl, out bDaclDefaulted);
static extern bool InitializeSecurityDescriptor(out SECURITY_DESCRIPTOR SecurityDescriptor, uint dwRevision);
Private Shared Function InitializeSecurityDescriptor(ByRef SecurityDescriptor As SECURITY_DESCRIPTOR, dwRevision As UInteger) As Boolean The dwRevision parameter must be SECURITY_DESCRIPTOR_REVISION (1). SECURITY_DESCRIPTOR securityDesc = new SECURITY_DESCRIPTOR();
static extern bool QueryServiceObjectSecurity(IntPtr serviceHandle, System.Security.AccessControl.SecurityInfos secInfo, ref SECURITY_DESCRIPTOR lpSecDesrBuf, uint bufSize, out uint bufSizeNeeded); New in .NET v2.0: Security.AccessControl namespace, including gems to manipulate DACLs in raw (binary) form. So rather than using a ref SECURITY_DESCRIPTOR I'd advocate using a byte[] and RawSecurityDescriptor(byte[], 0). See sample code below.
out SECURITY_DESCRIPTOR pSecurityDescriptor,
ref SECURITY_DESCRIPTOR pSecurityDescriptor);
static extern bool SetSecurityDescriptorDacl(ref SECURITY_DESCRIPTOR sd, bool daclPresent, IntPtr dacl, bool daclDefaulted); 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 SECURITY_DESCRIPTOR securityDesc = new SECURITY_DESCRIPTOR(); netapi3215: NetShareAdd
public IntPtr shi502_security_descriptor;
info.shi502_security_descriptor = IntPtr.Zero; 16: NetShareGetInfo
public IntPtr shi502_security_descriptor; kernel3217: CreateMutex
public static extern bool SetSecurityDescriptorDacl(ref SECURITY_DESCRIPTOR securityDescriptor, bool daclPresent, IntPtr dacl, bool daclDefaulted);
public static extern bool InitializeSecurityDescriptor(out SECURITY_DESCRIPTOR securityDescriptor, uint dwRevision);
public struct SECURITY_DESCRIPTOR
Native.SECURITY_DESCRIPTOR securityDesc; |