Mercurial > games > semicongine
comparison fuhtark_test/include/winapi/userenv.h @ 1500:91c8c3b7cbf0
add: futhark tests for generating vulkan api
| author | sam <sam@basx.dev> |
|---|---|
| date | Wed, 26 Nov 2025 21:36:48 +0700 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1499:1f58458b7ef7 | 1500:91c8c3b7cbf0 |
|---|---|
| 1 /** | |
| 2 * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 * This file is part of the w64 mingw-runtime package. | |
| 4 * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 */ | |
| 6 #ifndef _USERENV_H_ | |
| 7 #define _USERENV_H_ | |
| 8 | |
| 9 #include <wbemcli.h> | |
| 10 #include <profinfo.h> | |
| 11 | |
| 12 #if !defined(_USERENV_) | |
| 13 #define USERENVAPI DECLSPEC_IMPORT | |
| 14 #else | |
| 15 #define USERENVAPI | |
| 16 #endif | |
| 17 | |
| 18 #ifdef __cplusplus | |
| 19 extern "C" { | |
| 20 #endif | |
| 21 | |
| 22 #define PI_NOUI 0x00000001 | |
| 23 #define PI_APPLYPOLICY 0x00000002 | |
| 24 | |
| 25 #ifdef UNICODE | |
| 26 #define LoadUserProfile LoadUserProfileW | |
| 27 #define GetProfilesDirectory GetProfilesDirectoryW | |
| 28 #define DeleteProfile DeleteProfileW | |
| 29 #define GetDefaultUserProfileDirectory GetDefaultUserProfileDirectoryW | |
| 30 #define GetAllUsersProfileDirectory GetAllUsersProfileDirectoryW | |
| 31 #define GetUserProfileDirectory GetUserProfileDirectoryW | |
| 32 #define ExpandEnvironmentStringsForUser ExpandEnvironmentStringsForUserW | |
| 33 #else | |
| 34 #define LoadUserProfile LoadUserProfileA | |
| 35 #define GetProfilesDirectory GetProfilesDirectoryA | |
| 36 #define DeleteProfile DeleteProfileA | |
| 37 #define GetDefaultUserProfileDirectory GetDefaultUserProfileDirectoryA | |
| 38 #define GetAllUsersProfileDirectory GetAllUsersProfileDirectoryA | |
| 39 #define GetUserProfileDirectory GetUserProfileDirectoryA | |
| 40 #define ExpandEnvironmentStringsForUser ExpandEnvironmentStringsForUserA | |
| 41 #endif | |
| 42 | |
| 43 USERENVAPI WINBOOL WINAPI LoadUserProfileA(HANDLE hToken,LPPROFILEINFOA lpProfileInfo); | |
| 44 USERENVAPI WINBOOL WINAPI LoadUserProfileW(HANDLE hToken,LPPROFILEINFOW lpProfileInfo); | |
| 45 USERENVAPI WINBOOL WINAPI UnloadUserProfile(HANDLE hToken,HANDLE hProfile); | |
| 46 USERENVAPI WINBOOL WINAPI GetProfilesDirectoryA(LPSTR lpProfilesDir,LPDWORD lpcchSize); | |
| 47 USERENVAPI WINBOOL WINAPI GetProfilesDirectoryW(LPWSTR lpProfilesDir,LPDWORD lpcchSize); | |
| 48 | |
| 49 #define PT_TEMPORARY 0x00000001 | |
| 50 #define PT_ROAMING 0x00000002 | |
| 51 #define PT_MANDATORY 0x00000004 | |
| 52 | |
| 53 USERENVAPI WINBOOL WINAPI GetProfileType(DWORD *dwFlags); | |
| 54 USERENVAPI WINBOOL WINAPI DeleteProfileA(LPCSTR lpSidString,LPCSTR lpProfilePath,LPCSTR lpComputerName); | |
| 55 USERENVAPI WINBOOL WINAPI DeleteProfileW(LPCWSTR lpSidString,LPCWSTR lpProfilePath,LPCWSTR lpComputerName); | |
| 56 USERENVAPI WINBOOL WINAPI GetDefaultUserProfileDirectoryA(LPSTR lpProfileDir,LPDWORD lpcchSize); | |
| 57 USERENVAPI WINBOOL WINAPI GetDefaultUserProfileDirectoryW(LPWSTR lpProfileDir,LPDWORD lpcchSize); | |
| 58 USERENVAPI WINBOOL WINAPI GetAllUsersProfileDirectoryA(LPSTR lpProfileDir,LPDWORD lpcchSize); | |
| 59 USERENVAPI WINBOOL WINAPI GetAllUsersProfileDirectoryW(LPWSTR lpProfileDir,LPDWORD lpcchSize); | |
| 60 USERENVAPI WINBOOL WINAPI GetUserProfileDirectoryA(HANDLE hToken,LPSTR lpProfileDir,LPDWORD lpcchSize); | |
| 61 USERENVAPI WINBOOL WINAPI GetUserProfileDirectoryW(HANDLE hToken,LPWSTR lpProfileDir,LPDWORD lpcchSize); | |
| 62 USERENVAPI WINBOOL WINAPI CreateEnvironmentBlock(LPVOID *lpEnvironment,HANDLE hToken,WINBOOL bInherit); | |
| 63 USERENVAPI WINBOOL WINAPI DestroyEnvironmentBlock(LPVOID lpEnvironment); | |
| 64 USERENVAPI WINBOOL WINAPI ExpandEnvironmentStringsForUserA(HANDLE hToken,LPCSTR lpSrc,LPSTR lpDest,DWORD dwSize); | |
| 65 USERENVAPI WINBOOL WINAPI ExpandEnvironmentStringsForUserW(HANDLE hToken,LPCWSTR lpSrc,LPWSTR lpDest,DWORD dwSize); | |
| 66 USERENVAPI WINBOOL WINAPI RefreshPolicy(WINBOOL bMachine); | |
| 67 | |
| 68 #define RP_FORCE 1 | |
| 69 | |
| 70 USERENVAPI WINBOOL WINAPI RefreshPolicyEx(WINBOOL bMachine,DWORD dwOptions); | |
| 71 USERENVAPI HANDLE WINAPI EnterCriticalPolicySection(WINBOOL bMachine); | |
| 72 USERENVAPI WINBOOL WINAPI LeaveCriticalPolicySection(HANDLE hSection); | |
| 73 USERENVAPI WINBOOL WINAPI RegisterGPNotification(HANDLE hEvent,WINBOOL bMachine); | |
| 74 USERENVAPI WINBOOL WINAPI UnregisterGPNotification(HANDLE hEvent); | |
| 75 | |
| 76 #define GPC_BLOCK_POLICY 0x00000001 | |
| 77 | |
| 78 #define GPO_FLAG_DISABLE 0x00000001 | |
| 79 #define GPO_FLAG_FORCE 0x00000002 | |
| 80 | |
| 81 typedef enum _GPO_LINK { | |
| 82 GPLinkUnknown = 0,GPLinkMachine,GPLinkSite,GPLinkDomain,GPLinkOrganizationalUnit | |
| 83 } GPO_LINK,*PGPO_LINK; | |
| 84 | |
| 85 typedef struct _GROUP_POLICY_OBJECTA { | |
| 86 DWORD dwOptions; | |
| 87 DWORD dwVersion; | |
| 88 LPSTR lpDSPath; | |
| 89 LPSTR lpFileSysPath; | |
| 90 LPSTR lpDisplayName; | |
| 91 CHAR szGPOName[50]; | |
| 92 GPO_LINK GPOLink; | |
| 93 LPARAM lParam; | |
| 94 struct _GROUP_POLICY_OBJECTA *pNext; | |
| 95 struct _GROUP_POLICY_OBJECTA *pPrev; | |
| 96 LPSTR lpExtensions; | |
| 97 LPARAM lParam2; | |
| 98 LPSTR lpLink; | |
| 99 } GROUP_POLICY_OBJECTA,*PGROUP_POLICY_OBJECTA; | |
| 100 | |
| 101 typedef struct _GROUP_POLICY_OBJECTW { | |
| 102 DWORD dwOptions; | |
| 103 DWORD dwVersion; | |
| 104 LPWSTR lpDSPath; | |
| 105 LPWSTR lpFileSysPath; | |
| 106 LPWSTR lpDisplayName; | |
| 107 WCHAR szGPOName[50]; | |
| 108 GPO_LINK GPOLink; | |
| 109 LPARAM lParam; | |
| 110 struct _GROUP_POLICY_OBJECTW *pNext; | |
| 111 struct _GROUP_POLICY_OBJECTW *pPrev; | |
| 112 LPWSTR lpExtensions; | |
| 113 LPARAM lParam2; | |
| 114 LPWSTR lpLink; | |
| 115 } GROUP_POLICY_OBJECTW,*PGROUP_POLICY_OBJECTW; | |
| 116 | |
| 117 #ifdef UNICODE | |
| 118 typedef GROUP_POLICY_OBJECTW GROUP_POLICY_OBJECT; | |
| 119 typedef PGROUP_POLICY_OBJECTW PGROUP_POLICY_OBJECT; | |
| 120 #else | |
| 121 typedef GROUP_POLICY_OBJECTA GROUP_POLICY_OBJECT; | |
| 122 typedef PGROUP_POLICY_OBJECTA PGROUP_POLICY_OBJECT; | |
| 123 #endif | |
| 124 | |
| 125 #define GPO_LIST_FLAG_MACHINE 0x00000001 | |
| 126 #define GPO_LIST_FLAG_SITEONLY 0x00000002 | |
| 127 #define GPO_LIST_FLAG_NO_WMIFILTERS 0x00000004 | |
| 128 | |
| 129 #ifdef UNICODE | |
| 130 #define GetGPOList GetGPOListW | |
| 131 #define FreeGPOList FreeGPOListW | |
| 132 #define GetAppliedGPOList GetAppliedGPOListW | |
| 133 #else | |
| 134 #define GetGPOList GetGPOListA | |
| 135 #define FreeGPOList FreeGPOListA | |
| 136 #define GetAppliedGPOList GetAppliedGPOListA | |
| 137 #endif | |
| 138 | |
| 139 USERENVAPI WINBOOL WINAPI GetGPOListA(HANDLE hToken,LPCSTR lpName,LPCSTR lpHostName,LPCSTR lpComputerName,DWORD dwFlags,PGROUP_POLICY_OBJECTA *pGPOList); | |
| 140 USERENVAPI WINBOOL WINAPI GetGPOListW(HANDLE hToken,LPCWSTR lpName,LPCWSTR lpHostName,LPCWSTR lpComputerName,DWORD dwFlags,PGROUP_POLICY_OBJECTW *pGPOList); | |
| 141 USERENVAPI WINBOOL WINAPI FreeGPOListA(PGROUP_POLICY_OBJECTA pGPOList); | |
| 142 USERENVAPI WINBOOL WINAPI FreeGPOListW(PGROUP_POLICY_OBJECTW pGPOList); | |
| 143 USERENVAPI DWORD WINAPI GetAppliedGPOListA(DWORD dwFlags,LPCSTR pMachineName,PSID pSidUser,GUID *pGuidExtension,PGROUP_POLICY_OBJECTA *ppGPOList); | |
| 144 USERENVAPI DWORD WINAPI GetAppliedGPOListW(DWORD dwFlags,LPCWSTR pMachineName,PSID pSidUser,GUID *pGuidExtension,PGROUP_POLICY_OBJECTW *ppGPOList); | |
| 145 | |
| 146 #define GP_DLLNAME TEXT("DllName") | |
| 147 #define GP_ENABLEASYNCHRONOUSPROCESSING TEXT("EnableAsynchronousProcessing") | |
| 148 #define GP_MAXNOGPOLISTCHANGESINTERVAL TEXT("MaxNoGPOListChangesInterval") | |
| 149 #define GP_NOBACKGROUNDPOLICY TEXT("NoBackgroundPolicy") | |
| 150 #define GP_NOGPOLISTCHANGES TEXT("NoGPOListChanges") | |
| 151 #define GP_NOMACHINEPOLICY TEXT("NoMachinePolicy") | |
| 152 #define GP_NOSLOWLINK TEXT("NoSlowLink") | |
| 153 #define GP_NOTIFYLINKTRANSITION TEXT("NotifyLinkTransition") | |
| 154 #define GP_NOUSERPOLICY TEXT("NoUserPolicy") | |
| 155 #define GP_PERUSERLOCALSETTINGS TEXT("PerUserLocalSettings") | |
| 156 #define GP_PROCESSGROUPPOLICY TEXT("ProcessGroupPolicy") | |
| 157 #define GP_REQUIRESSUCCESSFULREGISTRY TEXT("RequiresSuccessfulRegistry") | |
| 158 | |
| 159 #define GPO_INFO_FLAG_MACHINE 0x00000001 | |
| 160 #define GPO_INFO_FLAG_BACKGROUND 0x00000010 | |
| 161 #define GPO_INFO_FLAG_SLOWLINK 0x00000020 | |
| 162 #define GPO_INFO_FLAG_VERBOSE 0x00000040 | |
| 163 #define GPO_INFO_FLAG_NOCHANGES 0x00000080 | |
| 164 #define GPO_INFO_FLAG_LINKTRANSITION 0x00000100 | |
| 165 | |
| 166 #define GPO_INFO_FLAG_LOGRSOP_TRANSITION 0x00000200 | |
| 167 | |
| 168 #define GPO_INFO_FLAG_FORCED_REFRESH 0x00000400 | |
| 169 #define GPO_INFO_FLAG_SAFEMODE_BOOT 0x00000800 | |
| 170 #define GPO_INFO_FLAG_ASYNC_FOREGROUND 0x00001000 | |
| 171 #define GPO_INFO_FLAG_REPORT 0x00002000 | |
| 172 | |
| 173 typedef UINT_PTR ASYNCCOMPLETIONHANDLE; | |
| 174 typedef DWORD (*PFNSTATUSMESSAGECALLBACK)(WINBOOL bVerbose,LPWSTR lpMessage); | |
| 175 typedef DWORD(*PFNPROCESSGROUPPOLICY)(DWORD dwFlags,HANDLE hToken,HKEY hKeyRoot,PGROUP_POLICY_OBJECT pDeletedGPOList,PGROUP_POLICY_OBJECT pChangedGPOList,ASYNCCOMPLETIONHANDLE pHandle,WINBOOL *pbAbort,PFNSTATUSMESSAGECALLBACK pStatusCallback); | |
| 176 typedef DWORD(*PFNPROCESSGROUPPOLICYEX)(DWORD dwFlags,HANDLE hToken,HKEY hKeyRoot,PGROUP_POLICY_OBJECT pDeletedGPOList,PGROUP_POLICY_OBJECT pChangedGPOList,ASYNCCOMPLETIONHANDLE pHandle,WINBOOL *pbAbort,PFNSTATUSMESSAGECALLBACK pStatusCallback,IWbemServices *pWbemServices,HRESULT *pRsopStatus); | |
| 177 typedef PVOID PRSOPTOKEN; | |
| 178 | |
| 179 typedef struct _RSOP_TARGET { | |
| 180 WCHAR *pwszAccountName; | |
| 181 WCHAR *pwszNewSOM; | |
| 182 SAFEARRAY *psaSecurityGroups; | |
| 183 PRSOPTOKEN pRsopToken; | |
| 184 PGROUP_POLICY_OBJECT pGPOList; | |
| 185 IWbemServices *pWbemServices; | |
| 186 } RSOP_TARGET,*PRSOP_TARGET; | |
| 187 | |
| 188 typedef DWORD(*PFNGENERATEGROUPPOLICY)(DWORD dwFlags,WINBOOL *pbAbort,WCHAR *pwszSite,PRSOP_TARGET pComputerTarget,PRSOP_TARGET pUserTarget); | |
| 189 | |
| 190 #define REGISTRY_EXTENSION_GUID { 0x35378EAC,0x683F,0x11D2,0xA8,0x9A,0x00,0xC0,0x4F,0xBB,0xCF,0xA2 } | |
| 191 | |
| 192 typedef GUID *REFGPEXTENSIONID; | |
| 193 | |
| 194 USERENVAPI DWORD WINAPI ProcessGroupPolicyCompleted(REFGPEXTENSIONID extensionId,ASYNCCOMPLETIONHANDLE pAsyncHandle,DWORD dwStatus); | |
| 195 USERENVAPI DWORD WINAPI ProcessGroupPolicyCompletedEx(REFGPEXTENSIONID extensionId,ASYNCCOMPLETIONHANDLE pAsyncHandle,DWORD dwStatus,HRESULT RsopStatus); | |
| 196 USERENVAPI HRESULT WINAPI RsopAccessCheckByType(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID pPrincipalSelfSid,PRSOPTOKEN pRsopToken,DWORD dwDesiredAccessMask,POBJECT_TYPE_LIST pObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING pGenericMapping,PPRIVILEGE_SET pPrivilegeSet,LPDWORD pdwPrivilegeSetLength,LPDWORD pdwGrantedAccessMask,LPBOOL pbAccessStatus); | |
| 197 USERENVAPI HRESULT WINAPI RsopFileAccessCheck(LPWSTR pszFileName,PRSOPTOKEN pRsopToken,DWORD dwDesiredAccessMask,LPDWORD pdwGrantedAccessMask,LPBOOL pbAccessStatus); | |
| 198 | |
| 199 typedef enum _SETTINGSTATUS { | |
| 200 RSOPUnspecified = 0,RSOPApplied,RSOPIgnored,RSOPFailed,RSOPSubsettingFailed | |
| 201 } SETTINGSTATUS; | |
| 202 | |
| 203 typedef struct _POLICYSETTINGSTATUSINFO { | |
| 204 LPWSTR szKey; | |
| 205 LPWSTR szEventSource; | |
| 206 LPWSTR szEventLogName; | |
| 207 DWORD dwEventID; | |
| 208 DWORD dwErrorCode; | |
| 209 SETTINGSTATUS status; | |
| 210 SYSTEMTIME timeLogged; | |
| 211 } POLICYSETTINGSTATUSINFO,*LPPOLICYSETTINGSTATUSINFO; | |
| 212 | |
| 213 USERENVAPI HRESULT WINAPI RsopSetPolicySettingStatus(DWORD dwFlags,IWbemServices *pServices,IWbemClassObject *pSettingInstance,DWORD nInfo,POLICYSETTINGSTATUSINFO *pStatus); | |
| 214 USERENVAPI HRESULT WINAPI RsopResetPolicySettingStatus(DWORD dwFlags,IWbemServices *pServices,IWbemClassObject *pSettingInstance); | |
| 215 | |
| 216 #define FLAG_NO_GPO_FILTER 0x80000000 | |
| 217 #define FLAG_NO_CSE_INVOKE 0x40000000 | |
| 218 #define FLAG_ASSUME_SLOW_LINK 0x20000000 | |
| 219 #define FLAG_LOOPBACK_MERGE 0x10000000 | |
| 220 #define FLAG_LOOPBACK_REPLACE 0x08000000 | |
| 221 | |
| 222 #define FLAG_ASSUME_USER_WQLFILTER_TRUE 0x04000000 | |
| 223 #define FLAG_ASSUME_COMP_WQLFILTER_TRUE 0x02000000 | |
| 224 | |
| 225 #define FLAG_PLANNING_MODE 0x01000000 | |
| 226 | |
| 227 #define FLAG_NO_USER 0x00000001 | |
| 228 #define FLAG_NO_COMPUTER 0x00000002 | |
| 229 #define FLAG_FORCE_CREATENAMESPACE 0x00000004 | |
| 230 | |
| 231 #define RSOP_USER_ACCESS_DENIED 0x00000001 | |
| 232 | |
| 233 #define RSOP_COMPUTER_ACCESS_DENIED 0x00000002 | |
| 234 | |
| 235 #define RSOP_TEMPNAMESPACE_EXISTS 0x00000004 | |
| 236 | |
| 237 #ifdef __cplusplus | |
| 238 } | |
| 239 #endif | |
| 240 | |
| 241 #endif /* _USERENV_H_ */ |
