537 lines
28 KiB
Zig
537 lines
28 KiB
Zig
//! NOTE: this file is autogenerated, DO NOT MODIFY
|
|
//--------------------------------------------------------------------------------
|
|
// Section: Constants (0)
|
|
//--------------------------------------------------------------------------------
|
|
|
|
//--------------------------------------------------------------------------------
|
|
// Section: Types (8)
|
|
//--------------------------------------------------------------------------------
|
|
const IID_IProtectionPolicyManagerInterop_Value = Guid.initString("4652651d-c1fe-4ba1-9f0a-c0f56596f721");
|
|
pub const IID_IProtectionPolicyManagerInterop = &IID_IProtectionPolicyManagerInterop_Value;
|
|
pub const IProtectionPolicyManagerInterop = extern struct {
|
|
pub const VTable = extern struct {
|
|
base: IInspectable.VTable,
|
|
RequestAccessForWindowAsync: switch (@import("builtin").zig_backend) {
|
|
.stage1 => fn(
|
|
self: *const IProtectionPolicyManagerInterop,
|
|
appWindow: ?HWND,
|
|
sourceIdentity: ?HSTRING,
|
|
targetIdentity: ?HSTRING,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
else => *const fn(
|
|
self: *const IProtectionPolicyManagerInterop,
|
|
appWindow: ?HWND,
|
|
sourceIdentity: ?HSTRING,
|
|
targetIdentity: ?HSTRING,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
},
|
|
GetForWindow: switch (@import("builtin").zig_backend) {
|
|
.stage1 => fn(
|
|
self: *const IProtectionPolicyManagerInterop,
|
|
appWindow: ?HWND,
|
|
riid: ?*const Guid,
|
|
result: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
else => *const fn(
|
|
self: *const IProtectionPolicyManagerInterop,
|
|
appWindow: ?HWND,
|
|
riid: ?*const Guid,
|
|
result: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
},
|
|
};
|
|
vtable: *const VTable,
|
|
pub fn MethodMixin(comptime T: type) type { return struct {
|
|
pub usingnamespace IInspectable.MethodMixin(T);
|
|
// NOTE: method is namespaced with interface name to avoid conflicts for now
|
|
pub fn IProtectionPolicyManagerInterop_RequestAccessForWindowAsync(self: *const T, appWindow: ?HWND, sourceIdentity: ?HSTRING, targetIdentity: ?HSTRING, riid: ?*const Guid, asyncOperation: ?*?*anyopaque) callconv(.Inline) HRESULT {
|
|
return @as(*const IProtectionPolicyManagerInterop.VTable, @ptrCast(self.vtable)).RequestAccessForWindowAsync(@as(*const IProtectionPolicyManagerInterop, @ptrCast(self)), appWindow, sourceIdentity, targetIdentity, riid, asyncOperation);
|
|
}
|
|
// NOTE: method is namespaced with interface name to avoid conflicts for now
|
|
pub fn IProtectionPolicyManagerInterop_GetForWindow(self: *const T, appWindow: ?HWND, riid: ?*const Guid, result: ?*?*anyopaque) callconv(.Inline) HRESULT {
|
|
return @as(*const IProtectionPolicyManagerInterop.VTable, @ptrCast(self.vtable)).GetForWindow(@as(*const IProtectionPolicyManagerInterop, @ptrCast(self)), appWindow, riid, result);
|
|
}
|
|
};}
|
|
pub usingnamespace MethodMixin(@This());
|
|
};
|
|
|
|
const IID_IProtectionPolicyManagerInterop2_Value = Guid.initString("157cfbe4-a78d-4156-b384-61fdac41e686");
|
|
pub const IID_IProtectionPolicyManagerInterop2 = &IID_IProtectionPolicyManagerInterop2_Value;
|
|
pub const IProtectionPolicyManagerInterop2 = extern struct {
|
|
pub const VTable = extern struct {
|
|
base: IInspectable.VTable,
|
|
RequestAccessForAppWithWindowAsync: switch (@import("builtin").zig_backend) {
|
|
.stage1 => fn(
|
|
self: *const IProtectionPolicyManagerInterop2,
|
|
appWindow: ?HWND,
|
|
sourceIdentity: ?HSTRING,
|
|
appPackageFamilyName: ?HSTRING,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
else => *const fn(
|
|
self: *const IProtectionPolicyManagerInterop2,
|
|
appWindow: ?HWND,
|
|
sourceIdentity: ?HSTRING,
|
|
appPackageFamilyName: ?HSTRING,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
},
|
|
RequestAccessWithAuditingInfoForWindowAsync: switch (@import("builtin").zig_backend) {
|
|
.stage1 => fn(
|
|
self: *const IProtectionPolicyManagerInterop2,
|
|
appWindow: ?HWND,
|
|
sourceIdentity: ?HSTRING,
|
|
targetIdentity: ?HSTRING,
|
|
auditInfoUnk: ?*IUnknown,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
else => *const fn(
|
|
self: *const IProtectionPolicyManagerInterop2,
|
|
appWindow: ?HWND,
|
|
sourceIdentity: ?HSTRING,
|
|
targetIdentity: ?HSTRING,
|
|
auditInfoUnk: ?*IUnknown,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
},
|
|
RequestAccessWithMessageForWindowAsync: switch (@import("builtin").zig_backend) {
|
|
.stage1 => fn(
|
|
self: *const IProtectionPolicyManagerInterop2,
|
|
appWindow: ?HWND,
|
|
sourceIdentity: ?HSTRING,
|
|
targetIdentity: ?HSTRING,
|
|
auditInfoUnk: ?*IUnknown,
|
|
messageFromApp: ?HSTRING,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
else => *const fn(
|
|
self: *const IProtectionPolicyManagerInterop2,
|
|
appWindow: ?HWND,
|
|
sourceIdentity: ?HSTRING,
|
|
targetIdentity: ?HSTRING,
|
|
auditInfoUnk: ?*IUnknown,
|
|
messageFromApp: ?HSTRING,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
},
|
|
RequestAccessForAppWithAuditingInfoForWindowAsync: switch (@import("builtin").zig_backend) {
|
|
.stage1 => fn(
|
|
self: *const IProtectionPolicyManagerInterop2,
|
|
appWindow: ?HWND,
|
|
sourceIdentity: ?HSTRING,
|
|
appPackageFamilyName: ?HSTRING,
|
|
auditInfoUnk: ?*IUnknown,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
else => *const fn(
|
|
self: *const IProtectionPolicyManagerInterop2,
|
|
appWindow: ?HWND,
|
|
sourceIdentity: ?HSTRING,
|
|
appPackageFamilyName: ?HSTRING,
|
|
auditInfoUnk: ?*IUnknown,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
},
|
|
RequestAccessForAppWithMessageForWindowAsync: switch (@import("builtin").zig_backend) {
|
|
.stage1 => fn(
|
|
self: *const IProtectionPolicyManagerInterop2,
|
|
appWindow: ?HWND,
|
|
sourceIdentity: ?HSTRING,
|
|
appPackageFamilyName: ?HSTRING,
|
|
auditInfoUnk: ?*IUnknown,
|
|
messageFromApp: ?HSTRING,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
else => *const fn(
|
|
self: *const IProtectionPolicyManagerInterop2,
|
|
appWindow: ?HWND,
|
|
sourceIdentity: ?HSTRING,
|
|
appPackageFamilyName: ?HSTRING,
|
|
auditInfoUnk: ?*IUnknown,
|
|
messageFromApp: ?HSTRING,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
},
|
|
};
|
|
vtable: *const VTable,
|
|
pub fn MethodMixin(comptime T: type) type { return struct {
|
|
pub usingnamespace IInspectable.MethodMixin(T);
|
|
// NOTE: method is namespaced with interface name to avoid conflicts for now
|
|
pub fn IProtectionPolicyManagerInterop2_RequestAccessForAppWithWindowAsync(self: *const T, appWindow: ?HWND, sourceIdentity: ?HSTRING, appPackageFamilyName: ?HSTRING, riid: ?*const Guid, asyncOperation: ?*?*anyopaque) callconv(.Inline) HRESULT {
|
|
return @as(*const IProtectionPolicyManagerInterop2.VTable, @ptrCast(self.vtable)).RequestAccessForAppWithWindowAsync(@as(*const IProtectionPolicyManagerInterop2, @ptrCast(self)), appWindow, sourceIdentity, appPackageFamilyName, riid, asyncOperation);
|
|
}
|
|
// NOTE: method is namespaced with interface name to avoid conflicts for now
|
|
pub fn IProtectionPolicyManagerInterop2_RequestAccessWithAuditingInfoForWindowAsync(self: *const T, appWindow: ?HWND, sourceIdentity: ?HSTRING, targetIdentity: ?HSTRING, auditInfoUnk: ?*IUnknown, riid: ?*const Guid, asyncOperation: ?*?*anyopaque) callconv(.Inline) HRESULT {
|
|
return @as(*const IProtectionPolicyManagerInterop2.VTable, @ptrCast(self.vtable)).RequestAccessWithAuditingInfoForWindowAsync(@as(*const IProtectionPolicyManagerInterop2, @ptrCast(self)), appWindow, sourceIdentity, targetIdentity, auditInfoUnk, riid, asyncOperation);
|
|
}
|
|
// NOTE: method is namespaced with interface name to avoid conflicts for now
|
|
pub fn IProtectionPolicyManagerInterop2_RequestAccessWithMessageForWindowAsync(self: *const T, appWindow: ?HWND, sourceIdentity: ?HSTRING, targetIdentity: ?HSTRING, auditInfoUnk: ?*IUnknown, messageFromApp: ?HSTRING, riid: ?*const Guid, asyncOperation: ?*?*anyopaque) callconv(.Inline) HRESULT {
|
|
return @as(*const IProtectionPolicyManagerInterop2.VTable, @ptrCast(self.vtable)).RequestAccessWithMessageForWindowAsync(@as(*const IProtectionPolicyManagerInterop2, @ptrCast(self)), appWindow, sourceIdentity, targetIdentity, auditInfoUnk, messageFromApp, riid, asyncOperation);
|
|
}
|
|
// NOTE: method is namespaced with interface name to avoid conflicts for now
|
|
pub fn IProtectionPolicyManagerInterop2_RequestAccessForAppWithAuditingInfoForWindowAsync(self: *const T, appWindow: ?HWND, sourceIdentity: ?HSTRING, appPackageFamilyName: ?HSTRING, auditInfoUnk: ?*IUnknown, riid: ?*const Guid, asyncOperation: ?*?*anyopaque) callconv(.Inline) HRESULT {
|
|
return @as(*const IProtectionPolicyManagerInterop2.VTable, @ptrCast(self.vtable)).RequestAccessForAppWithAuditingInfoForWindowAsync(@as(*const IProtectionPolicyManagerInterop2, @ptrCast(self)), appWindow, sourceIdentity, appPackageFamilyName, auditInfoUnk, riid, asyncOperation);
|
|
}
|
|
// NOTE: method is namespaced with interface name to avoid conflicts for now
|
|
pub fn IProtectionPolicyManagerInterop2_RequestAccessForAppWithMessageForWindowAsync(self: *const T, appWindow: ?HWND, sourceIdentity: ?HSTRING, appPackageFamilyName: ?HSTRING, auditInfoUnk: ?*IUnknown, messageFromApp: ?HSTRING, riid: ?*const Guid, asyncOperation: ?*?*anyopaque) callconv(.Inline) HRESULT {
|
|
return @as(*const IProtectionPolicyManagerInterop2.VTable, @ptrCast(self.vtable)).RequestAccessForAppWithMessageForWindowAsync(@as(*const IProtectionPolicyManagerInterop2, @ptrCast(self)), appWindow, sourceIdentity, appPackageFamilyName, auditInfoUnk, messageFromApp, riid, asyncOperation);
|
|
}
|
|
};}
|
|
pub usingnamespace MethodMixin(@This());
|
|
};
|
|
|
|
const IID_IProtectionPolicyManagerInterop3_Value = Guid.initString("c1c03933-b398-4d93-b0fd-2972adf802c2");
|
|
pub const IID_IProtectionPolicyManagerInterop3 = &IID_IProtectionPolicyManagerInterop3_Value;
|
|
pub const IProtectionPolicyManagerInterop3 = extern struct {
|
|
pub const VTable = extern struct {
|
|
base: IInspectable.VTable,
|
|
RequestAccessWithBehaviorForWindowAsync: switch (@import("builtin").zig_backend) {
|
|
.stage1 => fn(
|
|
self: *const IProtectionPolicyManagerInterop3,
|
|
appWindow: ?HWND,
|
|
sourceIdentity: ?HSTRING,
|
|
targetIdentity: ?HSTRING,
|
|
auditInfoUnk: ?*IUnknown,
|
|
messageFromApp: ?HSTRING,
|
|
behavior: u32,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
else => *const fn(
|
|
self: *const IProtectionPolicyManagerInterop3,
|
|
appWindow: ?HWND,
|
|
sourceIdentity: ?HSTRING,
|
|
targetIdentity: ?HSTRING,
|
|
auditInfoUnk: ?*IUnknown,
|
|
messageFromApp: ?HSTRING,
|
|
behavior: u32,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
},
|
|
RequestAccessForAppWithBehaviorForWindowAsync: switch (@import("builtin").zig_backend) {
|
|
.stage1 => fn(
|
|
self: *const IProtectionPolicyManagerInterop3,
|
|
appWindow: ?HWND,
|
|
sourceIdentity: ?HSTRING,
|
|
appPackageFamilyName: ?HSTRING,
|
|
auditInfoUnk: ?*IUnknown,
|
|
messageFromApp: ?HSTRING,
|
|
behavior: u32,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
else => *const fn(
|
|
self: *const IProtectionPolicyManagerInterop3,
|
|
appWindow: ?HWND,
|
|
sourceIdentity: ?HSTRING,
|
|
appPackageFamilyName: ?HSTRING,
|
|
auditInfoUnk: ?*IUnknown,
|
|
messageFromApp: ?HSTRING,
|
|
behavior: u32,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
},
|
|
RequestAccessToFilesForAppForWindowAsync: switch (@import("builtin").zig_backend) {
|
|
.stage1 => fn(
|
|
self: *const IProtectionPolicyManagerInterop3,
|
|
appWindow: ?HWND,
|
|
sourceItemListUnk: ?*IUnknown,
|
|
appPackageFamilyName: ?HSTRING,
|
|
auditInfoUnk: ?*IUnknown,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
else => *const fn(
|
|
self: *const IProtectionPolicyManagerInterop3,
|
|
appWindow: ?HWND,
|
|
sourceItemListUnk: ?*IUnknown,
|
|
appPackageFamilyName: ?HSTRING,
|
|
auditInfoUnk: ?*IUnknown,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
},
|
|
RequestAccessToFilesForAppWithMessageAndBehaviorForWindowAsync: switch (@import("builtin").zig_backend) {
|
|
.stage1 => fn(
|
|
self: *const IProtectionPolicyManagerInterop3,
|
|
appWindow: ?HWND,
|
|
sourceItemListUnk: ?*IUnknown,
|
|
appPackageFamilyName: ?HSTRING,
|
|
auditInfoUnk: ?*IUnknown,
|
|
messageFromApp: ?HSTRING,
|
|
behavior: u32,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
else => *const fn(
|
|
self: *const IProtectionPolicyManagerInterop3,
|
|
appWindow: ?HWND,
|
|
sourceItemListUnk: ?*IUnknown,
|
|
appPackageFamilyName: ?HSTRING,
|
|
auditInfoUnk: ?*IUnknown,
|
|
messageFromApp: ?HSTRING,
|
|
behavior: u32,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
},
|
|
RequestAccessToFilesForProcessForWindowAsync: switch (@import("builtin").zig_backend) {
|
|
.stage1 => fn(
|
|
self: *const IProtectionPolicyManagerInterop3,
|
|
appWindow: ?HWND,
|
|
sourceItemListUnk: ?*IUnknown,
|
|
processId: u32,
|
|
auditInfoUnk: ?*IUnknown,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
else => *const fn(
|
|
self: *const IProtectionPolicyManagerInterop3,
|
|
appWindow: ?HWND,
|
|
sourceItemListUnk: ?*IUnknown,
|
|
processId: u32,
|
|
auditInfoUnk: ?*IUnknown,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
},
|
|
RequestAccessToFilesForProcessWithMessageAndBehaviorForWindowAsync: switch (@import("builtin").zig_backend) {
|
|
.stage1 => fn(
|
|
self: *const IProtectionPolicyManagerInterop3,
|
|
appWindow: ?HWND,
|
|
sourceItemListUnk: ?*IUnknown,
|
|
processId: u32,
|
|
auditInfoUnk: ?*IUnknown,
|
|
messageFromApp: ?HSTRING,
|
|
behavior: u32,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
else => *const fn(
|
|
self: *const IProtectionPolicyManagerInterop3,
|
|
appWindow: ?HWND,
|
|
sourceItemListUnk: ?*IUnknown,
|
|
processId: u32,
|
|
auditInfoUnk: ?*IUnknown,
|
|
messageFromApp: ?HSTRING,
|
|
behavior: u32,
|
|
riid: ?*const Guid,
|
|
asyncOperation: ?*?*anyopaque,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT,
|
|
},
|
|
};
|
|
vtable: *const VTable,
|
|
pub fn MethodMixin(comptime T: type) type { return struct {
|
|
pub usingnamespace IInspectable.MethodMixin(T);
|
|
// NOTE: method is namespaced with interface name to avoid conflicts for now
|
|
pub fn IProtectionPolicyManagerInterop3_RequestAccessWithBehaviorForWindowAsync(self: *const T, appWindow: ?HWND, sourceIdentity: ?HSTRING, targetIdentity: ?HSTRING, auditInfoUnk: ?*IUnknown, messageFromApp: ?HSTRING, behavior: u32, riid: ?*const Guid, asyncOperation: ?*?*anyopaque) callconv(.Inline) HRESULT {
|
|
return @as(*const IProtectionPolicyManagerInterop3.VTable, @ptrCast(self.vtable)).RequestAccessWithBehaviorForWindowAsync(@as(*const IProtectionPolicyManagerInterop3, @ptrCast(self)), appWindow, sourceIdentity, targetIdentity, auditInfoUnk, messageFromApp, behavior, riid, asyncOperation);
|
|
}
|
|
// NOTE: method is namespaced with interface name to avoid conflicts for now
|
|
pub fn IProtectionPolicyManagerInterop3_RequestAccessForAppWithBehaviorForWindowAsync(self: *const T, appWindow: ?HWND, sourceIdentity: ?HSTRING, appPackageFamilyName: ?HSTRING, auditInfoUnk: ?*IUnknown, messageFromApp: ?HSTRING, behavior: u32, riid: ?*const Guid, asyncOperation: ?*?*anyopaque) callconv(.Inline) HRESULT {
|
|
return @as(*const IProtectionPolicyManagerInterop3.VTable, @ptrCast(self.vtable)).RequestAccessForAppWithBehaviorForWindowAsync(@as(*const IProtectionPolicyManagerInterop3, @ptrCast(self)), appWindow, sourceIdentity, appPackageFamilyName, auditInfoUnk, messageFromApp, behavior, riid, asyncOperation);
|
|
}
|
|
// NOTE: method is namespaced with interface name to avoid conflicts for now
|
|
pub fn IProtectionPolicyManagerInterop3_RequestAccessToFilesForAppForWindowAsync(self: *const T, appWindow: ?HWND, sourceItemListUnk: ?*IUnknown, appPackageFamilyName: ?HSTRING, auditInfoUnk: ?*IUnknown, riid: ?*const Guid, asyncOperation: ?*?*anyopaque) callconv(.Inline) HRESULT {
|
|
return @as(*const IProtectionPolicyManagerInterop3.VTable, @ptrCast(self.vtable)).RequestAccessToFilesForAppForWindowAsync(@as(*const IProtectionPolicyManagerInterop3, @ptrCast(self)), appWindow, sourceItemListUnk, appPackageFamilyName, auditInfoUnk, riid, asyncOperation);
|
|
}
|
|
// NOTE: method is namespaced with interface name to avoid conflicts for now
|
|
pub fn IProtectionPolicyManagerInterop3_RequestAccessToFilesForAppWithMessageAndBehaviorForWindowAsync(self: *const T, appWindow: ?HWND, sourceItemListUnk: ?*IUnknown, appPackageFamilyName: ?HSTRING, auditInfoUnk: ?*IUnknown, messageFromApp: ?HSTRING, behavior: u32, riid: ?*const Guid, asyncOperation: ?*?*anyopaque) callconv(.Inline) HRESULT {
|
|
return @as(*const IProtectionPolicyManagerInterop3.VTable, @ptrCast(self.vtable)).RequestAccessToFilesForAppWithMessageAndBehaviorForWindowAsync(@as(*const IProtectionPolicyManagerInterop3, @ptrCast(self)), appWindow, sourceItemListUnk, appPackageFamilyName, auditInfoUnk, messageFromApp, behavior, riid, asyncOperation);
|
|
}
|
|
// NOTE: method is namespaced with interface name to avoid conflicts for now
|
|
pub fn IProtectionPolicyManagerInterop3_RequestAccessToFilesForProcessForWindowAsync(self: *const T, appWindow: ?HWND, sourceItemListUnk: ?*IUnknown, processId: u32, auditInfoUnk: ?*IUnknown, riid: ?*const Guid, asyncOperation: ?*?*anyopaque) callconv(.Inline) HRESULT {
|
|
return @as(*const IProtectionPolicyManagerInterop3.VTable, @ptrCast(self.vtable)).RequestAccessToFilesForProcessForWindowAsync(@as(*const IProtectionPolicyManagerInterop3, @ptrCast(self)), appWindow, sourceItemListUnk, processId, auditInfoUnk, riid, asyncOperation);
|
|
}
|
|
// NOTE: method is namespaced with interface name to avoid conflicts for now
|
|
pub fn IProtectionPolicyManagerInterop3_RequestAccessToFilesForProcessWithMessageAndBehaviorForWindowAsync(self: *const T, appWindow: ?HWND, sourceItemListUnk: ?*IUnknown, processId: u32, auditInfoUnk: ?*IUnknown, messageFromApp: ?HSTRING, behavior: u32, riid: ?*const Guid, asyncOperation: ?*?*anyopaque) callconv(.Inline) HRESULT {
|
|
return @as(*const IProtectionPolicyManagerInterop3.VTable, @ptrCast(self.vtable)).RequestAccessToFilesForProcessWithMessageAndBehaviorForWindowAsync(@as(*const IProtectionPolicyManagerInterop3, @ptrCast(self)), appWindow, sourceItemListUnk, processId, auditInfoUnk, messageFromApp, behavior, riid, asyncOperation);
|
|
}
|
|
};}
|
|
pub usingnamespace MethodMixin(@This());
|
|
};
|
|
|
|
pub const HTHREAD_NETWORK_CONTEXT = extern struct {
|
|
ThreadId: u32,
|
|
ThreadContext: ?HANDLE,
|
|
};
|
|
|
|
pub const ENTERPRISE_DATA_POLICIES = enum(u32) {
|
|
NONE = 0,
|
|
ALLOWED = 1,
|
|
ENLIGHTENED = 2,
|
|
EXEMPT = 4,
|
|
_,
|
|
pub fn initFlags(o: struct {
|
|
NONE: u1 = 0,
|
|
ALLOWED: u1 = 0,
|
|
ENLIGHTENED: u1 = 0,
|
|
EXEMPT: u1 = 0,
|
|
}) ENTERPRISE_DATA_POLICIES {
|
|
return @as(ENTERPRISE_DATA_POLICIES, @enumFromInt(
|
|
(if (o.NONE == 1) @intFromEnum(ENTERPRISE_DATA_POLICIES.NONE) else 0)
|
|
| (if (o.ALLOWED == 1) @intFromEnum(ENTERPRISE_DATA_POLICIES.ALLOWED) else 0)
|
|
| (if (o.ENLIGHTENED == 1) @intFromEnum(ENTERPRISE_DATA_POLICIES.ENLIGHTENED) else 0)
|
|
| (if (o.EXEMPT == 1) @intFromEnum(ENTERPRISE_DATA_POLICIES.EXEMPT) else 0)
|
|
));
|
|
}
|
|
};
|
|
pub const ENTERPRISE_POLICY_NONE = ENTERPRISE_DATA_POLICIES.NONE;
|
|
pub const ENTERPRISE_POLICY_ALLOWED = ENTERPRISE_DATA_POLICIES.ALLOWED;
|
|
pub const ENTERPRISE_POLICY_ENLIGHTENED = ENTERPRISE_DATA_POLICIES.ENLIGHTENED;
|
|
pub const ENTERPRISE_POLICY_EXEMPT = ENTERPRISE_DATA_POLICIES.EXEMPT;
|
|
|
|
pub const SRPHOSTING_TYPE = enum(i32) {
|
|
NONE = 0,
|
|
WINHTTP = 1,
|
|
WININET = 2,
|
|
};
|
|
pub const SRPHOSTING_TYPE_NONE = SRPHOSTING_TYPE.NONE;
|
|
pub const SRPHOSTING_TYPE_WINHTTP = SRPHOSTING_TYPE.WINHTTP;
|
|
pub const SRPHOSTING_TYPE_WININET = SRPHOSTING_TYPE.WININET;
|
|
|
|
pub const SRPHOSTING_VERSION = enum(i32) {
|
|
@"1" = 1,
|
|
};
|
|
pub const SRPHOSTING_VERSION1 = SRPHOSTING_VERSION.@"1";
|
|
|
|
pub const FILE_UNPROTECT_OPTIONS = extern struct {
|
|
audit: bool,
|
|
};
|
|
|
|
|
|
//--------------------------------------------------------------------------------
|
|
// Section: Functions (13)
|
|
//--------------------------------------------------------------------------------
|
|
// TODO: this type is limited to platform 'windows10.0.10240'
|
|
pub extern "srpapi" fn SrpCreateThreadNetworkContext(
|
|
enterpriseId: ?[*:0]const u16,
|
|
threadNetworkContext: ?*HTHREAD_NETWORK_CONTEXT,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT;
|
|
|
|
// TODO: this type is limited to platform 'windows10.0.10240'
|
|
pub extern "srpapi" fn SrpCloseThreadNetworkContext(
|
|
threadNetworkContext: ?*HTHREAD_NETWORK_CONTEXT,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT;
|
|
|
|
// TODO: this type is limited to platform 'windows10.0.10240'
|
|
pub extern "srpapi" fn SrpSetTokenEnterpriseId(
|
|
tokenHandle: ?HANDLE,
|
|
enterpriseId: ?[*:0]const u16,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT;
|
|
|
|
// TODO: this type is limited to platform 'windows10.0.10240'
|
|
pub extern "srpapi" fn SrpGetEnterpriseIds(
|
|
tokenHandle: ?HANDLE,
|
|
numberOfBytes: ?*u32,
|
|
// TODO: what to do with BytesParamIndex 1?
|
|
enterpriseIds: ?*?PWSTR,
|
|
enterpriseIdCount: ?*u32,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT;
|
|
|
|
// TODO: this type is limited to platform 'windows10.0.10240'
|
|
pub extern "srpapi" fn SrpEnablePermissiveModeFileEncryption(
|
|
enterpriseId: ?[*:0]const u16,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT;
|
|
|
|
// TODO: this type is limited to platform 'windows10.0.10240'
|
|
pub extern "srpapi" fn SrpDisablePermissiveModeFileEncryption(
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT;
|
|
|
|
// TODO: this type is limited to platform 'windows10.0.10240'
|
|
pub extern "srpapi" fn SrpGetEnterprisePolicy(
|
|
tokenHandle: ?HANDLE,
|
|
policyFlags: ?*ENTERPRISE_DATA_POLICIES,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT;
|
|
|
|
// TODO: this type is limited to platform 'windows10.0.10240'
|
|
pub extern "srpapi" fn SrpIsTokenService(
|
|
TokenHandle: ?HANDLE,
|
|
IsTokenService: ?*u8,
|
|
) callconv(@import("std").os.windows.WINAPI) NTSTATUS;
|
|
|
|
// TODO: this type is limited to platform 'windows10.0.10240'
|
|
pub extern "srpapi" fn SrpDoesPolicyAllowAppExecution(
|
|
packageId: ?*const PACKAGE_ID,
|
|
isAllowed: ?*BOOL,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT;
|
|
|
|
pub extern "srpapi" fn SrpHostingInitialize(
|
|
Version: SRPHOSTING_VERSION,
|
|
Type: SRPHOSTING_TYPE,
|
|
pvData: ?*anyopaque,
|
|
cbData: u32,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT;
|
|
|
|
pub extern "srpapi" fn SrpHostingTerminate(
|
|
Type: SRPHOSTING_TYPE,
|
|
) callconv(@import("std").os.windows.WINAPI) void;
|
|
|
|
// TODO: this type is limited to platform 'windows10.0.10240'
|
|
pub extern "efswrt" fn ProtectFileToEnterpriseIdentity(
|
|
fileOrFolderPath: ?[*:0]const u16,
|
|
identity: ?[*:0]const u16,
|
|
) callconv(@import("std").os.windows.WINAPI) HRESULT;
|
|
|
|
pub extern "efswrt" fn UnprotectFile(
|
|
fileOrFolderPath: ?[*:0]const u16,
|
|
options: ?*const FILE_UNPROTECT_OPTIONS,
|
|
) 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 (11)
|
|
//--------------------------------------------------------------------------------
|
|
const Guid = @import("../zig.zig").Guid;
|
|
const BOOL = @import("../foundation.zig").BOOL;
|
|
const HANDLE = @import("../foundation.zig").HANDLE;
|
|
const HRESULT = @import("../foundation.zig").HRESULT;
|
|
const HSTRING = @import("../system/win_rt.zig").HSTRING;
|
|
const HWND = @import("../foundation.zig").HWND;
|
|
const IInspectable = @import("../system/win_rt.zig").IInspectable;
|
|
const IUnknown = @import("../system/com.zig").IUnknown;
|
|
const NTSTATUS = @import("../foundation.zig").NTSTATUS;
|
|
const PACKAGE_ID = @import("../storage/packaging/appx.zig").PACKAGE_ID;
|
|
const PWSTR = @import("../foundation.zig").PWSTR;
|
|
|
|
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| {
|
|
_ = @field(@This(), decl.name);
|
|
}
|
|
}
|