public void GetObjectInformation(IntPtr pObjectInfo)
        {
            SiObjectInfo object_info = new SiObjectInfo();

            object_info.dwFlags       = SiObjectInfoFlags.SI_READONLY | SiObjectInfoFlags.SI_ADVANCED;
            object_info.pszObjectName = _obj_name.DangerousGetHandle();
            Marshal.StructureToPtr(object_info, pObjectInfo, false);
        }
コード例 #2
0
        public void GetObjectInformation(IntPtr pObjectInfo)
        {
            SiObjectInfo      object_info = new SiObjectInfo();
            SiObjectInfoFlags flags       = SiObjectInfoFlags.SI_ADVANCED;

            if (_read_only || _handle.IsAccessMaskGranted(GenericAccessRights.WriteDac))
            {
                flags |= SiObjectInfoFlags.SI_READONLY;
            }

            object_info.dwFlags       = flags;
            object_info.pszObjectName = _obj_name.DangerousGetHandle();
            Marshal.StructureToPtr(object_info, pObjectInfo, false);
        }