wined3d: Directly call wined3d_texture_create() to create swapchain textures.
[wine.git] / include / winsafer.h
blob02150c599e7144fb13189809e041326ece4d456a
1 /*
2 * Winsafer definitions
4 * Copyright (C) 2009 Nikolay Sivov
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_WINSAFER_H
22 #define __WINE_WINSAFER_H
24 #include <guiddef.h>
25 #include <wincrypt.h>
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
31 DECLARE_HANDLE(SAFER_LEVEL_HANDLE);
33 #define SAFER_TOKEN_NULL_IF_EQUAL 0x00000001
34 #define SAFER_TOKEN_COMPARE_ONLY 0x00000002
35 #define SAFER_TOKEN_MAKE_INERT 0x00000004
36 #define SAFER_TOKEN_WANT_FLAGS 0x00000008
38 #define SAFER_MAX_HASH_SIZE 64
40 #include <pshpack8.h>
41 typedef struct _SAFER_CODE_PROPERTIES_V2 {
42 DWORD cbSize;
43 DWORD dwCheckFlags;
44 LPCWSTR ImagePath;
45 HANDLE hImageFileHandle;
46 DWORD UrlZoneId;
47 BYTE ImageHash[SAFER_MAX_HASH_SIZE];
48 DWORD dwImageHashSize;
49 LARGE_INTEGER ImageSize;
50 ALG_ID HashAlgorithm;
51 LPBYTE pByteBlock;
52 HWND hWndParent;
53 DWORD dwWVTUIChoice;
54 LPCWSTR PackageMoniker;
55 LPCWSTR PackagePublisher;
56 LPCWSTR PackageName;
57 ULONG64 PackageVersion;
58 BOOL PackageIsFramework;
59 } SAFER_CODE_PROPERTIES_V2, *PSAFER_CODE_PROPERTIES_V2;
61 typedef SAFER_CODE_PROPERTIES_V2 SAFER_CODE_PROPERTIES, *PSAFER_CODE_PROPERTIES;
62 #include <poppack.h>
64 #define SAFER_SCOPEID_MACHINE 1
65 #define SAFER_SCOPEID_USER 2
67 #define SAFER_LEVELID_DISALLOWED 0x00000
68 #define SAFER_LEVELID_UNTRUSTED 0x01000
69 #define SAFER_LEVELID_CONSTRAINED 0x10000
70 #define SAFER_LEVELID_NORMALUSER 0x20000
71 #define SAFER_LEVELID_FULLYTRUSTED 0x40000
73 #define SAFER_LEVEL_OPEN 1
75 typedef enum _SAFER_POLICY_INFO_CLASS {
76 SaferPolicyLevelList = 1,
77 SaferPolicyEnableTransparentEnforcement,
78 SaferPolicyDefaultLevel,
79 SaferPolicyEvaluateUserScope,
80 SaferPolicyScopeFlags
81 } SAFER_POLICY_INFO_CLASS;
83 typedef enum _SAFER_OBJECT_INFO_CLASS {
84 SaferObjectLevelId = 1,
85 SaferObjectScopeId,
86 SaferObjectFriendlyName,
87 SaferObjectDescription,
88 SaferObjectBuiltin,
89 SaferObjectDisallowed,
90 SaferObjectDisableMaxPrivilege,
91 SaferObjectInvertDeletedPrivileges,
92 SaferObjectDeletedPrivileges,
93 SaferObjectDefaultOwner,
94 SaferObjectSidsToDisable,
95 SaferObjectRestrictedSidsInverted,
96 SaferObjectRestrictedSidsAdded,
97 SaferObjectAllIdentificationGuids,
98 SaferObjectSingleIdentification,
99 SaferObjectExtendedError
100 } SAFER_OBJECT_INFO_CLASS;
102 WINADVAPI BOOL WINAPI SaferCreateLevel(DWORD,DWORD,DWORD,SAFER_LEVEL_HANDLE*,LPVOID);
103 WINADVAPI BOOL WINAPI SaferGetPolicyInformation(DWORD,SAFER_POLICY_INFO_CLASS,DWORD,PVOID,PDWORD,LPVOID);
104 WINADVAPI BOOL WINAPI SaferIdentifyLevel(DWORD,PSAFER_CODE_PROPERTIES,SAFER_LEVEL_HANDLE*,LPVOID);
105 WINADVAPI BOOL WINAPI SaferSetLevelInformation(SAFER_LEVEL_HANDLE,SAFER_OBJECT_INFO_CLASS,LPVOID,DWORD);
107 #ifdef __cplusplus
109 #endif
111 #endif /* __WINE_WINSAFER_H */