| 1 | #pragma once |
| 2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
| 3 | |
| 4 | |
| 5 | #define ValidateMessageParameter(x, pv, type) { x = ExternalEngineValidateMessageParameter(pv, offsetof(type, cbSize), sizeof(type)); if (FAILED(x)) { goto LExit; }} |
| 6 | #define ValidateMessageArgs(x, pv, type, identifier) ValidateMessageParameter(x, pv, type); const type* identifier = reinterpret_cast<type*>(pv); UNREFERENCED_PARAMETER(identifier) |
| 7 | #define ValidateMessageResults(x, pv, type, identifier) ValidateMessageParameter(x, pv, type); type* identifier = reinterpret_cast<type*>(pv); UNREFERENCED_PARAMETER(identifier) |
| 8 | |
| 9 | |
| 10 | #if defined(__cplusplus) |
| 11 | extern "C" { |
| 12 | #endif |
| 13 | |
| 14 | void ExternalEngineGetPackageCount( |
| 15 | __in BURN_ENGINE_STATE* pEngineState, |
| 16 | __out DWORD* pcPackages |
| 17 | ); |
| 18 | |
| 19 | HRESULT ExternalEngineGetVariableNumeric( |
| 20 | __in BURN_ENGINE_STATE* pEngineState, |
| 21 | __in_z LPCWSTR wzVariable, |
| 22 | __out LONGLONG* pllValue |
| 23 | ); |
| 24 | |
| 25 | HRESULT ExternalEngineGetVariableString( |
| 26 | __in BURN_ENGINE_STATE* pEngineState, |
| 27 | __in_z LPCWSTR wzVariable, |
| 28 | __out_ecount_opt(*pcchValue) LPWSTR wzValue, |
| 29 | __inout SIZE_T* pcchValue |
| 30 | ); |
| 31 | |
| 32 | HRESULT ExternalEngineGetVariableVersion( |
| 33 | __in BURN_ENGINE_STATE* pEngineState, |
| 34 | __in_z LPCWSTR wzVariable, |
| 35 | __out_ecount_opt(*pcchValue) LPWSTR wzValue, |
| 36 | __inout SIZE_T* pcchValue |
| 37 | ); |
| 38 | |
| 39 | HRESULT ExternalEngineFormatString( |
| 40 | __in BURN_ENGINE_STATE* pEngineState, |
| 41 | __in_z LPCWSTR wzIn, |
| 42 | __out_ecount_opt(*pcchOut) LPWSTR wzOut, |
| 43 | __inout SIZE_T* pcchOut |
| 44 | ); |
| 45 | |
| 46 | HRESULT ExternalEngineEscapeString( |
| 47 | __in_z LPCWSTR wzIn, |
| 48 | __out_ecount_opt(*pcchOut) LPWSTR wzOut, |
| 49 | __inout SIZE_T* pcchOut |
| 50 | ); |
| 51 | |
| 52 | HRESULT ExternalEngineEvaluateCondition( |
| 53 | __in BURN_ENGINE_STATE* pEngineState, |
| 54 | __in_z LPCWSTR wzCondition, |
| 55 | __out BOOL* pf |
| 56 | ); |
| 57 | |
| 58 | HRESULT ExternalEngineLog( |
| 59 | __in REPORT_LEVEL rl, |
| 60 | __in_z LPCWSTR wzMessage |
| 61 | ); |
| 62 | |
| 63 | HRESULT ExternalEngineSendEmbeddedError( |
| 64 | __in BURN_ENGINE_STATE* pEngineState, |
| 65 | __in const DWORD dwErrorCode, |
| 66 | __in_z LPCWSTR wzMessage, |
| 67 | __in const DWORD dwUIHint, |
| 68 | __out int* pnResult |
| 69 | ); |
| 70 | |
| 71 | HRESULT ExternalEngineSendEmbeddedProgress( |
| 72 | __in BURN_ENGINE_STATE* pEngineState, |
| 73 | __in const DWORD dwProgressPercentage, |
| 74 | __in const DWORD dwOverallProgressPercentage, |
| 75 | __out int* pnResult |
| 76 | ); |
| 77 | |
| 78 | HRESULT ExternalEngineSetUpdate( |
| 79 | __in BURN_ENGINE_STATE* pEngineState, |
| 80 | __in_z_opt LPCWSTR wzLocalSource, |
| 81 | __in_z_opt LPCWSTR wzDownloadSource, |
| 82 | __in const DWORD64 qwSize, |
| 83 | __in const BOOTSTRAPPER_UPDATE_HASH_TYPE hashType, |
| 84 | __in_opt LPCWSTR wzHash, |
| 85 | __in_opt LPCWSTR wzUpdatePackageId |
| 86 | ); |
| 87 | |
| 88 | HRESULT ExternalEngineSetLocalSource( |
| 89 | __in BURN_ENGINE_STATE* pEngineState, |
| 90 | __in_z_opt LPCWSTR wzPackageOrContainerId, |
| 91 | __in_z_opt LPCWSTR wzPayloadId, |
| 92 | __in_z LPCWSTR wzPath |
| 93 | ); |
| 94 | |
| 95 | HRESULT ExternalEngineSetDownloadSource( |
| 96 | __in BURN_ENGINE_STATE* pEngineState, |
| 97 | __in_z_opt LPCWSTR wzPackageOrContainerId, |
| 98 | __in_z_opt LPCWSTR wzPayloadId, |
| 99 | __in_z_opt LPCWSTR wzUrl, |
| 100 | __in_z_opt LPCWSTR wzUser, |
| 101 | __in_z_opt LPCWSTR wzPassword, |
| 102 | __in_z_opt LPCWSTR wzAuthorizationHeader |
| 103 | ); |
| 104 | |
| 105 | HRESULT ExternalEngineSetVariableNumeric( |
| 106 | __in BURN_ENGINE_STATE* pEngineState, |
| 107 | __in_z LPCWSTR wzVariable, |
| 108 | __in const LONGLONG llValue |
| 109 | ); |
| 110 | |
| 111 | HRESULT ExternalEngineSetVariableString( |
| 112 | __in BURN_ENGINE_STATE* pEngineState, |
| 113 | __in_z LPCWSTR wzVariable, |
| 114 | __in_z_opt LPCWSTR wzValue, |
| 115 | __in const BOOL fFormatted |
| 116 | ); |
| 117 | |
| 118 | HRESULT ExternalEngineSetVariableVersion( |
| 119 | __in BURN_ENGINE_STATE* pEngineState, |
| 120 | __in_z LPCWSTR wzVariable, |
| 121 | __in_z_opt LPCWSTR wzValue |
| 122 | ); |
| 123 | |
| 124 | void ExternalEngineCloseSplashScreen( |
| 125 | __in BURN_ENGINE_STATE* pEngineState |
| 126 | ); |
| 127 | |
| 128 | HRESULT ExternalEngineCompareVersions( |
| 129 | __in_z LPCWSTR wzVersion1, |
| 130 | __in_z LPCWSTR wzVersion2, |
| 131 | __out int* pnResult |
| 132 | ); |
| 133 | |
| 134 | HRESULT ExternalEngineGetRelatedBundleVariable( |
| 135 | __in BURN_ENGINE_STATE* pEngineState, |
| 136 | __in_z LPCWSTR wzBundleId, |
| 137 | __in_z LPCWSTR wzVariable, |
| 138 | __out_ecount_opt(*pcchValue) LPWSTR wzValue, |
| 139 | __inout SIZE_T* pcchValue |
| 140 | ); |
| 141 | |
| 142 | HRESULT ExternalEngineDetect( |
| 143 | __in BAENGINE_CONTEXT* pEngineContext, |
| 144 | __in_opt const HWND hwndParent |
| 145 | ); |
| 146 | |
| 147 | HRESULT ExternalEnginePlan( |
| 148 | __in BAENGINE_CONTEXT* pEngineContext, |
| 149 | __in const BOOTSTRAPPER_ACTION action |
| 150 | ); |
| 151 | |
| 152 | HRESULT ExternalEngineElevate( |
| 153 | __in BAENGINE_CONTEXT* pEngineContext, |
| 154 | __in_opt const HWND hwndParent |
| 155 | ); |
| 156 | |
| 157 | HRESULT ExternalEngineApply( |
| 158 | __in BAENGINE_CONTEXT* pEngineContext, |
| 159 | __in_opt const HWND hwndParent |
| 160 | ); |
| 161 | |
| 162 | HRESULT ExternalEngineQuit( |
| 163 | __in BAENGINE_CONTEXT* pEngineContext, |
| 164 | __in const DWORD dwExitCode |
| 165 | ); |
| 166 | |
| 167 | HRESULT ExternalEngineLaunchApprovedExe( |
| 168 | __in BAENGINE_CONTEXT* pEngineContext, |
| 169 | __in_opt const HWND hwndParent, |
| 170 | __in_z LPCWSTR wzApprovedExeForElevationId, |
| 171 | __in_z_opt LPCWSTR wzArguments, |
| 172 | __in const DWORD dwWaitForInputIdleTimeout |
| 173 | ); |
| 174 | |
| 175 | HRESULT ExternalEngineSetUpdateSource( |
| 176 | __in BURN_ENGINE_STATE* pEngineState, |
| 177 | __in_z LPCWSTR wzUrl, |
| 178 | __in_z_opt LPCWSTR wzAuthorizationHeader |
| 179 | ); |
| 180 | |
| 181 | HRESULT WINAPI ExternalEngineValidateMessageParameter( |
| 182 | __in_opt const LPVOID pv, |
| 183 | __in SIZE_T cbSizeOffset, |
| 184 | __in DWORD dwMinimumSize |
| 185 | ); |
| 186 | |
| 187 | #if defined(__cplusplus) |
| 188 | } |
| 189 | #endif |