MQGetQueueSecurity

C# Signature:

[DllImport("mqrt.dll", CharSet = CharSet.Unicode)]
public static extern uint MQGetQueueSecurity (
      [MarshalAs(UnmanagedType.LPWStr)]
      string lpwcsFormatName
    , int SecurityInformation
    , IntPtr pSecurityDescriptor
    , int nLength
    , ref int lpnLengthNeeded
);

Sample Code:

class mqrt {

        public const int OWNER_SECURITY_INFORMATION = 0x1;
        public const int MQ_OK = 0x0;

        public const uint MQ_ERROR_SECURITY_DESCRIPTOR_TOO_SMALL = 0xC00E0023;

        //MQGetQueueSecurity
        //The MQGetQueueSecurity function retrieves the access control
        //security descriptor for the queue that you specify
        [DllImport("mqrt.dll", CharSet = CharSet.Unicode)]
        public static extern uint MQGetQueueSecurity (
                  [MarshalAs(UnmanagedType.LPWStr)]
                  string lpwcsFormatName
                , int SecurityInformation
                , IntPtr pSecurityDescriptor
                , int nLength
                , ref int lpnLengthNeeded
        );

    }

Sample Code:

Última actualización