//! NOTE: this file is autogenerated, DO NOT MODIFY
//--------------------------------------------------------------------------------
// Section: Constants (27)
//--------------------------------------------------------------------------------
pub const SI_EDIT_PERMS = @as(i32, 0);
pub const SI_EDIT_OWNER = @as(i32, 1);
pub const SI_CONTAINER = @as(i32, 4);
pub const SI_READONLY = @as(i32, 8);
pub const SI_RESET = @as(i32, 32);
pub const SI_OWNER_READONLY = @as(i32, 64);
pub const SI_OWNER_RECURSE = @as(i32, 256);
pub const SI_NO_ACL_PROTECT = @as(i32, 512);
pub const SI_NO_TREE_APPLY = @as(i32, 1024);
pub const SI_PAGE_TITLE = @as(i32, 2048);
pub const SI_SERVER_IS_DC = @as(i32, 4096);
pub const SI_RESET_DACL_TREE = @as(i32, 16384);
pub const SI_RESET_SACL_TREE = @as(i32, 32768);
pub const SI_OBJECT_GUID = @as(i32, 65536);
pub const SI_ACCESS_SPECIFIC = @as(i32, 65536);
pub const SI_ACCESS_GENERAL = @as(i32, 131072);
pub const SI_ACCESS_CONTAINER = @as(i32, 262144);
pub const SI_ACCESS_PROPERTY = @as(i32, 524288);
pub const DOBJ_RES_CONT = @as(i32, 1);
pub const DOBJ_RES_ROOT = @as(i32, 2);
pub const DOBJ_VOL_NTACLS = @as(i32, 4);
pub const DOBJ_COND_NTACLS = @as(i32, 8);
pub const DOBJ_RIBBON_LAUNCH = @as(i32, 16);
pub const SECURITY_OBJECT_ID_OBJECT_SD = @as(u32, 1);
pub const SECURITY_OBJECT_ID_SHARE = @as(u32, 2);
pub const SECURITY_OBJECT_ID_CENTRAL_POLICY = @as(u32, 3);
pub const SECURITY_OBJECT_ID_CENTRAL_ACCESS_RULE = @as(u32, 4);

//--------------------------------------------------------------------------------
// Section: Types (18)
//--------------------------------------------------------------------------------
pub const SECURITY_INFO_PAGE_FLAGS = enum(u32) {
    ADVANCED = 16,
    EDIT_AUDITS = 2,
    EDIT_PROPERTIES = 128,
    _,
    pub fn initFlags(o: struct {
        ADVANCED: u1 = 0,
        EDIT_AUDITS: u1 = 0,
        EDIT_PROPERTIES: u1 = 0,
    }) SECURITY_INFO_PAGE_FLAGS {
        return @as(SECURITY_INFO_PAGE_FLAGS, @enumFromInt((if (o.ADVANCED == 1) @intFromEnum(SECURITY_INFO_PAGE_FLAGS.ADVANCED) else 0) | (if (o.EDIT_AUDITS == 1) @intFromEnum(SECURITY_INFO_PAGE_FLAGS.EDIT_AUDITS) else 0) | (if (o.EDIT_PROPERTIES == 1) @intFromEnum(SECURITY_INFO_PAGE_FLAGS.EDIT_PROPERTIES) else 0)));
    }
};
pub const SI_ADVANCED = SECURITY_INFO_PAGE_FLAGS.ADVANCED;
pub const SI_EDIT_AUDITS = SECURITY_INFO_PAGE_FLAGS.EDIT_AUDITS;
pub const SI_EDIT_PROPERTIES = SECURITY_INFO_PAGE_FLAGS.EDIT_PROPERTIES;

pub const SI_OBJECT_INFO_FLAGS = enum(u32) {
    AUDITS_ELEVATION_REQUIRED = 33554432,
    DISABLE_DENY_ACE = 2147483648,
    EDIT_EFFECTIVE = 131072,
    ENABLE_CENTRAL_POLICY = 1073741824,
    ENABLE_EDIT_ATTRIBUTE_CONDITION = 536870912,
    MAY_WRITE = 268435456,
    NO_ADDITIONAL_PERMISSION = 2097152,
    OWNER_ELEVATION_REQUIRED = 67108864,
    PERMS_ELEVATION_REQUIRED = 16777216,
    RESET_DACL = 262144,
    RESET_OWNER = 1048576,
    RESET_SACL = 524288,
    SCOPE_ELEVATION_REQUIRED = 134217728,
    VIEW_ONLY = 4194304,
    _,
    pub fn initFlags(o: struct {
        AUDITS_ELEVATION_REQUIRED: u1 = 0,
        DISABLE_DENY_ACE: u1 = 0,
        EDIT_EFFECTIVE: u1 = 0,
        ENABLE_CENTRAL_POLICY: u1 = 0,
        ENABLE_EDIT_ATTRIBUTE_CONDITION: u1 = 0,
        MAY_WRITE: u1 = 0,
        NO_ADDITIONAL_PERMISSION: u1 = 0,
        OWNER_ELEVATION_REQUIRED: u1 = 0,
        PERMS_ELEVATION_REQUIRED: u1 = 0,
        RESET_DACL: u1 = 0,
        RESET_OWNER: u1 = 0,
        RESET_SACL: u1 = 0,
        SCOPE_ELEVATION_REQUIRED: u1 = 0,
        VIEW_ONLY: u1 = 0,
    }) SI_OBJECT_INFO_FLAGS {
        return @as(SI_OBJECT_INFO_FLAGS, @enumFromInt((if (o.AUDITS_ELEVATION_REQUIRED == 1) @intFromEnum(SI_OBJECT_INFO_FLAGS.AUDITS_ELEVATION_REQUIRED) else 0) | (if (o.DISABLE_DENY_ACE == 1) @intFromEnum(SI_OBJECT_INFO_FLAGS.DISABLE_DENY_ACE) else 0) | (if (o.EDIT_EFFECTIVE == 1) @intFromEnum(SI_OBJECT_INFO_FLAGS.EDIT_EFFECTIVE) else 0) | (if (o.ENABLE_CENTRAL_POLICY == 1) @intFromEnum(SI_OBJECT_INFO_FLAGS.ENABLE_CENTRAL_POLICY) else 0) | (if (o.ENABLE_EDIT_ATTRIBUTE_CONDITION == 1) @intFromEnum(SI_OBJECT_INFO_FLAGS.ENABLE_EDIT_ATTRIBUTE_CONDITION) else 0) | (if (o.MAY_WRITE == 1) @intFromEnum(SI_OBJECT_INFO_FLAGS.MAY_WRITE) else 0) | (if (o.NO_ADDITIONAL_PERMISSION == 1) @intFromEnum(SI_OBJECT_INFO_FLAGS.NO_ADDITIONAL_PERMISSION) else 0) | (if (o.OWNER_ELEVATION_REQUIRED == 1) @intFromEnum(SI_OBJECT_INFO_FLAGS.OWNER_ELEVATION_REQUIRED) else 0) | (if (o.PERMS_ELEVATION_REQUIRED == 1) @intFromEnum(SI_OBJECT_INFO_FLAGS.PERMS_ELEVATION_REQUIRED) else 0) | (if (o.RESET_DACL == 1) @intFromEnum(SI_OBJECT_INFO_FLAGS.RESET_DACL) else 0) | (if (o.RESET_OWNER == 1) @intFromEnum(SI_OBJECT_INFO_FLAGS.RESET_OWNER) else 0) | (if (o.RESET_SACL == 1) @intFromEnum(SI_OBJECT_INFO_FLAGS.RESET_SACL) else 0) | (if (o.SCOPE_ELEVATION_REQUIRED == 1) @intFromEnum(SI_OBJECT_INFO_FLAGS.SCOPE_ELEVATION_REQUIRED) else 0) | (if (o.VIEW_ONLY == 1) @intFromEnum(SI_OBJECT_INFO_FLAGS.VIEW_ONLY) else 0)));
    }
};
pub const SI_AUDITS_ELEVATION_REQUIRED = SI_OBJECT_INFO_FLAGS.AUDITS_ELEVATION_REQUIRED;
pub const SI_DISABLE_DENY_ACE = SI_OBJECT_INFO_FLAGS.DISABLE_DENY_ACE;
pub const SI_EDIT_EFFECTIVE = SI_OBJECT_INFO_FLAGS.EDIT_EFFECTIVE;
pub const SI_ENABLE_CENTRAL_POLICY = SI_OBJECT_INFO_FLAGS.ENABLE_CENTRAL_POLICY;
pub const SI_ENABLE_EDIT_ATTRIBUTE_CONDITION = SI_OBJECT_INFO_FLAGS.ENABLE_EDIT_ATTRIBUTE_CONDITION;
pub const SI_MAY_WRITE = SI_OBJECT_INFO_FLAGS.MAY_WRITE;
pub const SI_NO_ADDITIONAL_PERMISSION = SI_OBJECT_INFO_FLAGS.NO_ADDITIONAL_PERMISSION;
pub const SI_OWNER_ELEVATION_REQUIRED = SI_OBJECT_INFO_FLAGS.OWNER_ELEVATION_REQUIRED;
pub const SI_PERMS_ELEVATION_REQUIRED = SI_OBJECT_INFO_FLAGS.PERMS_ELEVATION_REQUIRED;
pub const SI_RESET_DACL = SI_OBJECT_INFO_FLAGS.RESET_DACL;
pub const SI_RESET_OWNER = SI_OBJECT_INFO_FLAGS.RESET_OWNER;
pub const SI_RESET_SACL = SI_OBJECT_INFO_FLAGS.RESET_SACL;
pub const SI_SCOPE_ELEVATION_REQUIRED = SI_OBJECT_INFO_FLAGS.SCOPE_ELEVATION_REQUIRED;
pub const SI_VIEW_ONLY = SI_OBJECT_INFO_FLAGS.VIEW_ONLY;

pub const SI_OBJECT_INFO = extern struct {
    dwFlags: SI_OBJECT_INFO_FLAGS,
    hInstance: ?HINSTANCE,
    pszServerName: ?PWSTR,
    pszObjectName: ?PWSTR,
    pszPageTitle: ?PWSTR,
    guidObjectType: Guid,
};

pub const SI_ACCESS = extern struct {
    pguid: ?*const Guid,
    mask: u32,
    pszName: ?[*:0]const u16,
    dwFlags: u32,
};

pub const SI_INHERIT_TYPE = extern struct {
    pguid: ?*const Guid,
    dwFlags: ACE_FLAGS,
    pszName: ?[*:0]const u16,
};

pub const SI_PAGE_TYPE = enum(i32) {
    PERM = 0,
    ADVPERM = 1,
    AUDIT = 2,
    OWNER = 3,
    EFFECTIVE = 4,
    TAKEOWNERSHIP = 5,
    SHARE = 6,
};
pub const SI_PAGE_PERM = SI_PAGE_TYPE.PERM;
pub const SI_PAGE_ADVPERM = SI_PAGE_TYPE.ADVPERM;
pub const SI_PAGE_AUDIT = SI_PAGE_TYPE.AUDIT;
pub const SI_PAGE_OWNER = SI_PAGE_TYPE.OWNER;
pub const SI_PAGE_EFFECTIVE = SI_PAGE_TYPE.EFFECTIVE;
pub const SI_PAGE_TAKEOWNERSHIP = SI_PAGE_TYPE.TAKEOWNERSHIP;
pub const SI_PAGE_SHARE = SI_PAGE_TYPE.SHARE;

pub const SI_PAGE_ACTIVATED = enum(i32) {
    DEFAULT = 0,
    PERM_ACTIVATED = 1,
    AUDIT_ACTIVATED = 2,
    OWNER_ACTIVATED = 3,
    EFFECTIVE_ACTIVATED = 4,
    SHARE_ACTIVATED = 5,
    CENTRAL_POLICY_ACTIVATED = 6,
};
pub const SI_SHOW_DEFAULT = SI_PAGE_ACTIVATED.DEFAULT;
pub const SI_SHOW_PERM_ACTIVATED = SI_PAGE_ACTIVATED.PERM_ACTIVATED;
pub const SI_SHOW_AUDIT_ACTIVATED = SI_PAGE_ACTIVATED.AUDIT_ACTIVATED;
pub const SI_SHOW_OWNER_ACTIVATED = SI_PAGE_ACTIVATED.OWNER_ACTIVATED;
pub const SI_SHOW_EFFECTIVE_ACTIVATED = SI_PAGE_ACTIVATED.EFFECTIVE_ACTIVATED;
pub const SI_SHOW_SHARE_ACTIVATED = SI_PAGE_ACTIVATED.SHARE_ACTIVATED;
pub const SI_SHOW_CENTRAL_POLICY_ACTIVATED = SI_PAGE_ACTIVATED.CENTRAL_POLICY_ACTIVATED;

// TODO: this type is limited to platform 'windows5.1.2600'
const IID_ISecurityInformation_Value = Guid.initString("965fc360-16ff-11d0-91cb-00aa00bbb723");
pub const IID_ISecurityInformation = &IID_ISecurityInformation_Value;
pub const ISecurityInformation = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        GetObjectInformation: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const ISecurityInformation,
                pObjectInfo: ?*SI_OBJECT_INFO,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const ISecurityInformation,
                pObjectInfo: ?*SI_OBJECT_INFO,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetSecurity: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const ISecurityInformation,
                RequestedInformation: OBJECT_SECURITY_INFORMATION,
                ppSecurityDescriptor: ?*?*SECURITY_DESCRIPTOR,
                fDefault: BOOL,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const ISecurityInformation,
                RequestedInformation: OBJECT_SECURITY_INFORMATION,
                ppSecurityDescriptor: ?*?*SECURITY_DESCRIPTOR,
                fDefault: BOOL,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetSecurity: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const ISecurityInformation,
                SecurityInformation: OBJECT_SECURITY_INFORMATION,
                pSecurityDescriptor: ?*SECURITY_DESCRIPTOR,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const ISecurityInformation,
                SecurityInformation: OBJECT_SECURITY_INFORMATION,
                pSecurityDescriptor: ?*SECURITY_DESCRIPTOR,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetAccessRights: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const ISecurityInformation,
                pguidObjectType: ?*const Guid,
                dwFlags: SECURITY_INFO_PAGE_FLAGS,
                ppAccess: ?*?*SI_ACCESS,
                pcAccesses: ?*u32,
                piDefaultAccess: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const ISecurityInformation,
                pguidObjectType: ?*const Guid,
                dwFlags: SECURITY_INFO_PAGE_FLAGS,
                ppAccess: ?*?*SI_ACCESS,
                pcAccesses: ?*u32,
                piDefaultAccess: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        MapGeneric: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const ISecurityInformation,
                pguidObjectType: ?*const Guid,
                pAceFlags: ?*u8,
                pMask: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const ISecurityInformation,
                pguidObjectType: ?*const Guid,
                pAceFlags: ?*u8,
                pMask: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetInheritTypes: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const ISecurityInformation,
                ppInheritTypes: ?*?*SI_INHERIT_TYPE,
                pcInheritTypes: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const ISecurityInformation,
                ppInheritTypes: ?*?*SI_INHERIT_TYPE,
                pcInheritTypes: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        PropertySheetPageCallback: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const ISecurityInformation,
                hwnd: ?HWND,
                uMsg: PSPCB_MESSAGE,
                uPage: SI_PAGE_TYPE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const ISecurityInformation,
                hwnd: ?HWND,
                uMsg: PSPCB_MESSAGE,
                uPage: SI_PAGE_TYPE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn ISecurityInformation_GetObjectInformation(self: *const T, pObjectInfo: ?*SI_OBJECT_INFO) HRESULT {
                return @as(*const ISecurityInformation.VTable, @ptrCast(self.vtable)).GetObjectInformation(@as(*const ISecurityInformation, @ptrCast(self)), pObjectInfo);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn ISecurityInformation_GetSecurity(self: *const T, RequestedInformation: OBJECT_SECURITY_INFORMATION, ppSecurityDescriptor: ?*?*SECURITY_DESCRIPTOR, fDefault: BOOL) HRESULT {
                return @as(*const ISecurityInformation.VTable, @ptrCast(self.vtable)).GetSecurity(@as(*const ISecurityInformation, @ptrCast(self)), RequestedInformation, ppSecurityDescriptor, fDefault);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn ISecurityInformation_SetSecurity(self: *const T, SecurityInformation: OBJECT_SECURITY_INFORMATION, pSecurityDescriptor: ?*SECURITY_DESCRIPTOR) HRESULT {
                return @as(*const ISecurityInformation.VTable, @ptrCast(self.vtable)).SetSecurity(@as(*const ISecurityInformation, @ptrCast(self)), SecurityInformation, pSecurityDescriptor);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn ISecurityInformation_GetAccessRights(self: *const T, pguidObjectType: ?*const Guid, dwFlags: SECURITY_INFO_PAGE_FLAGS, ppAccess: ?*?*SI_ACCESS, pcAccesses: ?*u32, piDefaultAccess: ?*u32) HRESULT {
                return @as(*const ISecurityInformation.VTable, @ptrCast(self.vtable)).GetAccessRights(@as(*const ISecurityInformation, @ptrCast(self)), pguidObjectType, dwFlags, ppAccess, pcAccesses, piDefaultAccess);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn ISecurityInformation_MapGeneric(self: *const T, pguidObjectType: ?*const Guid, pAceFlags: ?*u8, pMask: ?*u32) HRESULT {
                return @as(*const ISecurityInformation.VTable, @ptrCast(self.vtable)).MapGeneric(@as(*const ISecurityInformation, @ptrCast(self)), pguidObjectType, pAceFlags, pMask);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn ISecurityInformation_GetInheritTypes(self: *const T, ppInheritTypes: ?*?*SI_INHERIT_TYPE, pcInheritTypes: ?*u32) HRESULT {
                return @as(*const ISecurityInformation.VTable, @ptrCast(self.vtable)).GetInheritTypes(@as(*const ISecurityInformation, @ptrCast(self)), ppInheritTypes, pcInheritTypes);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn ISecurityInformation_PropertySheetPageCallback(self: *const T, hwnd: ?HWND, uMsg: PSPCB_MESSAGE, uPage: SI_PAGE_TYPE) HRESULT {
                return @as(*const ISecurityInformation.VTable, @ptrCast(self.vtable)).PropertySheetPageCallback(@as(*const ISecurityInformation, @ptrCast(self)), hwnd, uMsg, uPage);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

// TODO: this type is limited to platform 'windows5.1.2600'
const IID_ISecurityInformation2_Value = Guid.initString("c3ccfdb4-6f88-11d2-a3ce-00c04fb1782a");
pub const IID_ISecurityInformation2 = &IID_ISecurityInformation2_Value;
pub const ISecurityInformation2 = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        IsDaclCanonical: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const ISecurityInformation2,
                pDacl: ?*ACL,
            ) callconv(@import("std").os.windows.WINAPI) BOOL,
            else => *const fn (
                self: *const ISecurityInformation2,
                pDacl: ?*ACL,
            ) callconv(@import("std").os.windows.WINAPI) BOOL,
        },
        LookupSids: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const ISecurityInformation2,
                cSids: u32,
                rgpSids: ?*?PSID,
                ppdo: ?*?*IDataObject,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const ISecurityInformation2,
                cSids: u32,
                rgpSids: ?*?PSID,
                ppdo: ?*?*IDataObject,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn ISecurityInformation2_IsDaclCanonical(self: *const T, pDacl: ?*ACL) BOOL {
                return @as(*const ISecurityInformation2.VTable, @ptrCast(self.vtable)).IsDaclCanonical(@as(*const ISecurityInformation2, @ptrCast(self)), pDacl);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn ISecurityInformation2_LookupSids(self: *const T, cSids: u32, rgpSids: ?*?PSID, ppdo: ?*?*IDataObject) HRESULT {
                return @as(*const ISecurityInformation2.VTable, @ptrCast(self.vtable)).LookupSids(@as(*const ISecurityInformation2, @ptrCast(self)), cSids, rgpSids, ppdo);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

pub const SID_INFO = extern struct {
    pSid: ?PSID,
    pwzCommonName: ?PWSTR,
    pwzClass: ?PWSTR,
    pwzUPN: ?PWSTR,
};

pub const SID_INFO_LIST = extern struct {
    cItems: u32,
    aSidInfo: [1]SID_INFO,
};

// TODO: this type is limited to platform 'windows5.1.2600'
const IID_IEffectivePermission_Value = Guid.initString("3853dc76-9f35-407c-88a1-d19344365fbc");
pub const IID_IEffectivePermission = &IID_IEffectivePermission_Value;
pub const IEffectivePermission = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        GetEffectivePermission: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IEffectivePermission,
                pguidObjectType: ?*const Guid,
                pUserSid: ?PSID,
                pszServerName: ?[*:0]const u16,
                pSD: ?*SECURITY_DESCRIPTOR,
                ppObjectTypeList: ?*?*OBJECT_TYPE_LIST,
                pcObjectTypeListLength: ?*u32,
                ppGrantedAccessList: ?*?*u32,
                pcGrantedAccessListLength: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IEffectivePermission,
                pguidObjectType: ?*const Guid,
                pUserSid: ?PSID,
                pszServerName: ?[*:0]const u16,
                pSD: ?*SECURITY_DESCRIPTOR,
                ppObjectTypeList: ?*?*OBJECT_TYPE_LIST,
                pcObjectTypeListLength: ?*u32,
                ppGrantedAccessList: ?*?*u32,
                pcGrantedAccessListLength: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IEffectivePermission_GetEffectivePermission(self: *const T, pguidObjectType: ?*const Guid, pUserSid: ?PSID, pszServerName: ?[*:0]const u16, pSD: ?*SECURITY_DESCRIPTOR, ppObjectTypeList: ?*?*OBJECT_TYPE_LIST, pcObjectTypeListLength: ?*u32, ppGrantedAccessList: ?*?*u32, pcGrantedAccessListLength: ?*u32) HRESULT {
                return @as(*const IEffectivePermission.VTable, @ptrCast(self.vtable)).GetEffectivePermission(@as(*const IEffectivePermission, @ptrCast(self)), pguidObjectType, pUserSid, pszServerName, pSD, ppObjectTypeList, pcObjectTypeListLength, ppGrantedAccessList, pcGrantedAccessListLength);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

// TODO: this type is limited to platform 'windows5.1.2600'
const IID_ISecurityObjectTypeInfo_Value = Guid.initString("fc3066eb-79ef-444b-9111-d18a75ebf2fa");
pub const IID_ISecurityObjectTypeInfo = &IID_ISecurityObjectTypeInfo_Value;
pub const ISecurityObjectTypeInfo = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        GetInheritSource: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const ISecurityObjectTypeInfo,
                si: u32,
                pACL: ?*ACL,
                ppInheritArray: ?*?*INHERITED_FROMA,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const ISecurityObjectTypeInfo,
                si: u32,
                pACL: ?*ACL,
                ppInheritArray: ?*?*INHERITED_FROMA,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn ISecurityObjectTypeInfo_GetInheritSource(self: *const T, si: u32, pACL: ?*ACL, ppInheritArray: ?*?*INHERITED_FROMA) HRESULT {
                return @as(*const ISecurityObjectTypeInfo.VTable, @ptrCast(self.vtable)).GetInheritSource(@as(*const ISecurityObjectTypeInfo, @ptrCast(self)), si, pACL, ppInheritArray);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

// TODO: this type is limited to platform 'windows6.0.6000'
const IID_ISecurityInformation3_Value = Guid.initString("e2cdc9cc-31bd-4f8f-8c8b-b641af516a1a");
pub const IID_ISecurityInformation3 = &IID_ISecurityInformation3_Value;
pub const ISecurityInformation3 = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        GetFullResourceName: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const ISecurityInformation3,
                ppszResourceName: ?*?PWSTR,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const ISecurityInformation3,
                ppszResourceName: ?*?PWSTR,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        OpenElevatedEditor: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const ISecurityInformation3,
                hWnd: ?HWND,
                uPage: SI_PAGE_TYPE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const ISecurityInformation3,
                hWnd: ?HWND,
                uPage: SI_PAGE_TYPE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn ISecurityInformation3_GetFullResourceName(self: *const T, ppszResourceName: ?*?PWSTR) HRESULT {
                return @as(*const ISecurityInformation3.VTable, @ptrCast(self.vtable)).GetFullResourceName(@as(*const ISecurityInformation3, @ptrCast(self)), ppszResourceName);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn ISecurityInformation3_OpenElevatedEditor(self: *const T, hWnd: ?HWND, uPage: SI_PAGE_TYPE) HRESULT {
                return @as(*const ISecurityInformation3.VTable, @ptrCast(self.vtable)).OpenElevatedEditor(@as(*const ISecurityInformation3, @ptrCast(self)), hWnd, uPage);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

pub const SECURITY_OBJECT = extern struct {
    pwszName: ?PWSTR,
    pData: ?*anyopaque,
    cbData: u32,
    pData2: ?*anyopaque,
    cbData2: u32,
    Id: u32,
    fWellKnown: BOOLEAN,
};

pub const EFFPERM_RESULT_LIST = extern struct {
    fEvaluated: BOOLEAN,
    cObjectTypeListLength: u32,
    pObjectTypeList: ?*OBJECT_TYPE_LIST,
    pGrantedAccessList: ?*u32,
};

// TODO: this type is limited to platform 'windows8.0'
const IID_ISecurityInformation4_Value = Guid.initString("ea961070-cd14-4621-ace4-f63c03e583e4");
pub const IID_ISecurityInformation4 = &IID_ISecurityInformation4_Value;
pub const ISecurityInformation4 = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        GetSecondarySecurity: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const ISecurityInformation4,
                pSecurityObjects: ?*?*SECURITY_OBJECT,
                pSecurityObjectCount: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const ISecurityInformation4,
                pSecurityObjects: ?*?*SECURITY_OBJECT,
                pSecurityObjectCount: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn ISecurityInformation4_GetSecondarySecurity(self: *const T, pSecurityObjects: ?*?*SECURITY_OBJECT, pSecurityObjectCount: ?*u32) HRESULT {
                return @as(*const ISecurityInformation4.VTable, @ptrCast(self.vtable)).GetSecondarySecurity(@as(*const ISecurityInformation4, @ptrCast(self)), pSecurityObjects, pSecurityObjectCount);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

// TODO: this type is limited to platform 'windows8.0'
const IID_IEffectivePermission2_Value = Guid.initString("941fabca-dd47-4fca-90bb-b0e10255f20d");
pub const IID_IEffectivePermission2 = &IID_IEffectivePermission2_Value;
pub const IEffectivePermission2 = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        ComputeEffectivePermissionWithSecondarySecurity: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IEffectivePermission2,
                pSid: ?PSID,
                pDeviceSid: ?PSID,
                pszServerName: ?[*:0]const u16,
                pSecurityObjects: [*]SECURITY_OBJECT,
                dwSecurityObjectCount: u32,
                pUserGroups: ?*TOKEN_GROUPS,
                pAuthzUserGroupsOperations: ?*AUTHZ_SID_OPERATION,
                pDeviceGroups: ?*TOKEN_GROUPS,
                pAuthzDeviceGroupsOperations: ?*AUTHZ_SID_OPERATION,
                pAuthzUserClaims: ?*AUTHZ_SECURITY_ATTRIBUTES_INFORMATION,
                pAuthzUserClaimsOperations: ?*AUTHZ_SECURITY_ATTRIBUTE_OPERATION,
                pAuthzDeviceClaims: ?*AUTHZ_SECURITY_ATTRIBUTES_INFORMATION,
                pAuthzDeviceClaimsOperations: ?*AUTHZ_SECURITY_ATTRIBUTE_OPERATION,
                pEffpermResultLists: [*]EFFPERM_RESULT_LIST,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IEffectivePermission2,
                pSid: ?PSID,
                pDeviceSid: ?PSID,
                pszServerName: ?[*:0]const u16,
                pSecurityObjects: [*]SECURITY_OBJECT,
                dwSecurityObjectCount: u32,
                pUserGroups: ?*TOKEN_GROUPS,
                pAuthzUserGroupsOperations: ?*AUTHZ_SID_OPERATION,
                pDeviceGroups: ?*TOKEN_GROUPS,
                pAuthzDeviceGroupsOperations: ?*AUTHZ_SID_OPERATION,
                pAuthzUserClaims: ?*AUTHZ_SECURITY_ATTRIBUTES_INFORMATION,
                pAuthzUserClaimsOperations: ?*AUTHZ_SECURITY_ATTRIBUTE_OPERATION,
                pAuthzDeviceClaims: ?*AUTHZ_SECURITY_ATTRIBUTES_INFORMATION,
                pAuthzDeviceClaimsOperations: ?*AUTHZ_SECURITY_ATTRIBUTE_OPERATION,
                pEffpermResultLists: [*]EFFPERM_RESULT_LIST,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IEffectivePermission2_ComputeEffectivePermissionWithSecondarySecurity(self: *const T, pSid: ?PSID, pDeviceSid: ?PSID, pszServerName: ?[*:0]const u16, pSecurityObjects: [*]SECURITY_OBJECT, dwSecurityObjectCount: u32, pUserGroups: ?*TOKEN_GROUPS, pAuthzUserGroupsOperations: ?*AUTHZ_SID_OPERATION, pDeviceGroups: ?*TOKEN_GROUPS, pAuthzDeviceGroupsOperations: ?*AUTHZ_SID_OPERATION, pAuthzUserClaims: ?*AUTHZ_SECURITY_ATTRIBUTES_INFORMATION, pAuthzUserClaimsOperations: ?*AUTHZ_SECURITY_ATTRIBUTE_OPERATION, pAuthzDeviceClaims: ?*AUTHZ_SECURITY_ATTRIBUTES_INFORMATION, pAuthzDeviceClaimsOperations: ?*AUTHZ_SECURITY_ATTRIBUTE_OPERATION, pEffpermResultLists: [*]EFFPERM_RESULT_LIST) HRESULT {
                return @as(*const IEffectivePermission2.VTable, @ptrCast(self.vtable)).ComputeEffectivePermissionWithSecondarySecurity(@as(*const IEffectivePermission2, @ptrCast(self)), pSid, pDeviceSid, pszServerName, pSecurityObjects, dwSecurityObjectCount, pUserGroups, pAuthzUserGroupsOperations, pDeviceGroups, pAuthzDeviceGroupsOperations, pAuthzUserClaims, pAuthzUserClaimsOperations, pAuthzDeviceClaims, pAuthzDeviceClaimsOperations, pEffpermResultLists);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

//--------------------------------------------------------------------------------
// Section: Functions (3)
//--------------------------------------------------------------------------------
// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "aclui" fn CreateSecurityPage(
    psi: ?*ISecurityInformation,
) callconv(@import("std").os.windows.WINAPI) ?HPROPSHEETPAGE;

// TODO: this type is limited to platform 'windows5.1.2600'
pub extern "aclui" fn EditSecurity(
    hwndOwner: ?HWND,
    psi: ?*ISecurityInformation,
) callconv(@import("std").os.windows.WINAPI) BOOL;

// TODO: this type is limited to platform 'windows6.0.6000'
pub extern "aclui" fn EditSecurityAdvanced(
    hwndOwner: ?HWND,
    psi: ?*ISecurityInformation,
    uSIPage: SI_PAGE_TYPE,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

//--------------------------------------------------------------------------------
// Section: Unicode Aliases (0)
//--------------------------------------------------------------------------------
const thismodule = @This();
pub usingnamespace switch (@import("../../zig.zig").unicode_mode) {
    .ansi => struct {},
    .wide => struct {},
    .unspecified => if (@import("builtin").is_test) struct {} else struct {},
};
//--------------------------------------------------------------------------------
// Section: Imports (22)
//--------------------------------------------------------------------------------
const Guid = @import("../../zig.zig").Guid;
const ACE_FLAGS = @import("../../security.zig").ACE_FLAGS;
const ACL = @import("../../security.zig").ACL;
const AUTHZ_SECURITY_ATTRIBUTE_OPERATION = @import("../../security/authorization.zig").AUTHZ_SECURITY_ATTRIBUTE_OPERATION;
const AUTHZ_SECURITY_ATTRIBUTES_INFORMATION = @import("../../security/authorization.zig").AUTHZ_SECURITY_ATTRIBUTES_INFORMATION;
const AUTHZ_SID_OPERATION = @import("../../security/authorization.zig").AUTHZ_SID_OPERATION;
const BOOL = @import("../../foundation.zig").BOOL;
const BOOLEAN = @import("../../foundation.zig").BOOLEAN;
const HINSTANCE = @import("../../foundation.zig").HINSTANCE;
const HPROPSHEETPAGE = @import("../../ui/controls.zig").HPROPSHEETPAGE;
const HRESULT = @import("../../foundation.zig").HRESULT;
const HWND = @import("../../foundation.zig").HWND;
const IDataObject = @import("../../system/com.zig").IDataObject;
const INHERITED_FROMA = @import("../../security/authorization.zig").INHERITED_FROMA;
const IUnknown = @import("../../system/com.zig").IUnknown;
const OBJECT_SECURITY_INFORMATION = @import("../../security.zig").OBJECT_SECURITY_INFORMATION;
const OBJECT_TYPE_LIST = @import("../../security.zig").OBJECT_TYPE_LIST;
const PSID = @import("../../foundation.zig").PSID;
const PSPCB_MESSAGE = @import("../../ui/controls.zig").PSPCB_MESSAGE;
const PWSTR = @import("../../foundation.zig").PWSTR;
const SECURITY_DESCRIPTOR = @import("../../security.zig").SECURITY_DESCRIPTOR;
const TOKEN_GROUPS = @import("../../security.zig").TOKEN_GROUPS;

test {
    @setEvalBranchQuota(comptime @import("std").meta.declarations(@This()).len * 3);

    // reference all the pub declarations
    if (!@import("builtin").is_test) return;
    inline for (comptime @import("std").meta.declarations(@This())) |decl| {
        if (decl.is_pub) {
            _ = @field(@This(), decl.name);
        }
    }
}
