1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef _INC_WDSCLIENTAPI 7 #define _INC_WDSCLIENTAPI 8 #if (_WIN32_WINNT >= 0x0600) 9 10 #ifdef __cplusplus 11 extern "C" { 12 #endif 13 14 #define WDS_CLI_MSG_START 0 15 #define WDS_CLI_MSG_COMPLETE 1 16 #define WDS_CLI_MSG_PROGRESS 2 17 #define WDS_CLI_MSG_TEXT 3 18 19 #ifndef WDSCLIAPI 20 #define WDSCLIAPI WINAPI 21 #endif 22 23 /* WdsClientAPI.dll is missing an implib because Vista clients don't have the dll to generate it from */ 24 25 typedef VOID (CALLBACK *PFN_WdsCliCallback)( 26 DWORD dwMessageId, 27 WPARAM wParam, 28 LPARAM lParam, 29 PVOID pvUserData 30 ); 31 32 typedef VOID (WDSCLIAPI *PFN_WdsCliTraceFunction)( 33 LPCWSTR pwszFormat, 34 va_list Params 35 ); 36 37 38 typedef enum _WDS_LOG_LEVEL { 39 WDS_LOG_LEVEL_DISABLED = 0, 40 WDS_LOG_LEVEL_ERROR = 1, 41 WDS_LOG_LEVEL_WARNING = 2, 42 WDS_LOG_LEVEL_INFO = 3 43 } WDS_LOG_LEVEL; 44 45 typedef enum _WDS_LOG_TYPE_CLIENT { 46 WDS_LOG_TYPE_CLIENT_ERROR = 1, 47 WDS_LOG_TYPE_CLIENT_STARTED, 48 WDS_LOG_TYPE_CLIENT_FINISHED, 49 WDS_LOG_TYPE_CLIENT_IMAGE_SELECTED, 50 WDS_LOG_TYPE_CLIENT_APPLY_STARTED, 51 WDS_LOG_TYPE_CLIENT_APPLY_FINISHED, 52 WDS_LOG_TYPE_CLIENT_GENERIC_MESSAGE, 53 WDS_LOG_TYPE_CLIENT_MAX_CODE 54 } WDS_LOG_TYPE_CLIENT; 55 56 typedef struct tagWDS_CLI_CRED { 57 PCWSTR pwszUserName; 58 PCWSTR pwszDomain; 59 PCWSTR pwszPassword; 60 } WDS_CLI_CRED, *PWDS_CLI_CRED, *LPWDS_CLI_CRED; 61 62 HRESULT WDSCLIAPI WdsCliAuthorizeSession( 63 HANDLE hSession, 64 PWDS_CLI_CRED pCred 65 ); 66 67 HRESULT WDSCLIAPI WdsCliCancelTransfer( 68 HANDLE hTransfer 69 ); 70 71 HRESULT WDSCLIAPI WdsCliClose( 72 HANDLE Handle 73 ); 74 75 HRESULT WDSCLIAPI WdsCliCreateSession( 76 PWSTR pwszServer, 77 PWDS_CLI_CRED pCred, 78 PHANDLE phSession 79 ); 80 81 HRESULT WDSCLIAPI WdsCliFindFirstImage( 82 HANDLE hSession, 83 PHANDLE phFindHandle 84 ); 85 86 HRESULT WDSCLIAPI WdsCliFindNextImage( 87 HANDLE Handle 88 ); 89 90 #define WdsCliFlagEnumFilterVersion 1 91 92 HRESULT WDSCLIAPI WdsCliGetEnumerationFlags( 93 HANDLE Handle, 94 PDWORD pdwFlags 95 ); 96 97 #define PROCESSOR_ARCHITECTURE_AMD64 9 98 #define PROCESSOR_ARCHITECTURE_IA64 6 99 #define PROCESSOR_ARCHITECTURE_INTEL 0 100 101 HRESULT WDSCLIAPI WdsCliGetImageArchitecture( 102 HANDLE hIfh, 103 PDWORD pdwValue 104 ); 105 106 HRESULT WDSCLIAPI WdsCliGetImageDescription( 107 HANDLE hIfh, 108 PWSTR *ppwszValue 109 ); 110 111 HRESULT WDSCLIAPI WdsCliGetImageGroup( 112 HANDLE hIfh, 113 PWSTR *ppwszValue 114 ); 115 116 HRESULT WDSCLIAPI WdsCliGetImageHalName( 117 HANDLE hIfh, 118 PWSTR *ppwszValue 119 ); 120 121 HRESULT WDSCLIAPI WdsCliGetImageHandleFromFindHandle( 122 HANDLE FindHandle, 123 PHANDLE phImageHandle 124 ); 125 126 HRESULT WDSCLIAPI WdsCliGetImageHandleFromTransferHandle( 127 HANDLE hTransfer, 128 PHANDLE phImageHandle 129 ); 130 131 HRESULT WDSCLIAPI WdsCliGetImageIndex( 132 HANDLE hIfh, 133 PDWORD pdwValue 134 ); 135 136 HRESULT WDSCLIAPI WdsCliGetImageLanguage( 137 HANDLE hIfh, 138 PWSTR *ppwszValue 139 ); 140 141 HRESULT WDSCLIAPI WdsCliGetImageLanguages( 142 HANDLE hIfh, 143 PTSTR **pppszValues, 144 PDWORD pdwNumValues 145 ); 146 147 HRESULT WDSCLIAPI WdsCliGetImageLastModifiedTime( 148 HANDLE hIfh, 149 PSYSTEMTIME *ppSysTimeValue 150 ); 151 152 HRESULT WINAPI WdsCliGetImageName( 153 HANDLE hIfh, 154 PWSTR *ppwszValue 155 ); 156 157 HRESULT WDSCLIAPI WdsCliGetImageNamespace( 158 HANDLE hIfh, 159 PWSTR *ppwszValue 160 ); 161 162 HRESULT WDSCLIAPI WdsCliGetImagePath( 163 HANDLE hIfh, 164 PWSTR *ppwszValue 165 ); 166 167 HRESULT WDSCLIAPI WdsCliGetImageSize( 168 HANDLE hIfh, 169 PULONGLONG pullValue 170 ); 171 172 HRESULT WDSCLIAPI WdsCliGetImageVersion( 173 HANDLE hIfh, 174 PWSTR *ppwszValue 175 ); 176 177 HRESULT WDSCLIAPI WdsCliGetTransferSize( 178 HANDLE hIfh, 179 PULONGLONG pullValue 180 ); 181 182 HRESULT WDSCLIAPI WdsCliInitializeLog( 183 HANDLE hSession, 184 ULONG ulClientArchitecture, 185 PWSTR pwszClientId, 186 PWSTR pwszClientAddress 187 ); 188 189 #define WDS_LOG_LEVEL_DISABLED 0 190 #define WDS_LOG_LEVEL_ERROR 1 191 #define WDS_LOG_LEVEL_WARNING 2 192 #define WDS_LOG_LEVEL_INFO 3 193 194 #define WDS_LOG_TYPE_CLIENT_ERROR 1 195 #define WDS_LOG_TYPE_CLIENT_STARTED 2 196 #define WDS_LOG_TYPE_CLIENT_FINISHED 3 197 #define WDS_LOG_TYPE_CLIENT_IMAGE_SELECTED 4 198 #define WDS_LOG_TYPE_CLIENT_APPLY_STARTED 5 199 #define WDS_LOG_TYPE_CLIENT_APPLY_FINISHED 6 200 #define WDS_LOG_TYPE_CLIENT_GENERIC_MESSAGE 7 201 #define WDS_LOG_TYPE_CLIENT_MAX_CODE 8 202 203 HRESULT __cdecl WdsCliLog( 204 HANDLE hSession, 205 ULONG ulLogLevel, 206 ULONG ulMessageCode, 207 ... 208 ); 209 210 HRESULT WDSCLIAPI WdsCliRegisterTrace( 211 PFN_WdsCliTraceFunction pfn 212 ); 213 214 HRESULT WDSCLIAPI WdsCliTransferFile( 215 PCWSTR pwszServer, 216 PCWSTR pwszNamespace, 217 PCWSTR pwszRemoteFilePath, 218 PCWSTR pwszLocalFilePath, 219 DWORD dwFlags, 220 DWORD dwReserved, 221 PFN_WdsCliCallback pfnWdsCliCallback, 222 PVOID pvUserData, 223 PHANDLE phTransfer 224 ); 225 226 HRESULT WDSCLIAPI WdsCliTransferImage( 227 HANDLE hImage, 228 PWSTR pwszLocalPath, 229 DWORD dwFlags, 230 DWORD dwReserved, 231 PFN_WdsCliCallback pfnWdsCliCallback, 232 PVOID pvUserData, 233 PHANDLE phTransfer 234 ); 235 236 HRESULT WDSCLIAPI WdsCliWaitForTransfer( 237 HANDLE hTransfer 238 ); 239 240 #ifdef __cplusplus 241 } 242 #endif 243 #endif /*(_WIN32_WINNT >= 0x0600)*/ 244 #endif /*_INC_WDSCLIENTAPI*/ 245