diff options
Diffstat (limited to 'src/engine/EngineForExtension.cpp')
| -rw-r--r-- | src/engine/EngineForExtension.cpp | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/src/engine/EngineForExtension.cpp b/src/engine/EngineForExtension.cpp index 9667dd18..fdfa59b1 100644 --- a/src/engine/EngineForExtension.cpp +++ b/src/engine/EngineForExtension.cpp | |||
| @@ -245,31 +245,6 @@ LExit: | |||
| 245 | return hr; | 245 | return hr; |
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | static HRESULT BEEngineSetVariableLiteralString( | ||
| 249 | __in BURN_EXTENSION_ENGINE_CONTEXT* pContext, | ||
| 250 | __in const BUNDLE_EXTENSION_ENGINE_SETVARIABLELITERALSTRING_ARGS* pArgs, | ||
| 251 | __in BUNDLE_EXTENSION_ENGINE_SETVARIABLELITERALSTRING_RESULTS* /*pResults*/ | ||
| 252 | ) | ||
| 253 | { | ||
| 254 | HRESULT hr = S_OK; | ||
| 255 | LPCWSTR wzVariable = pArgs->wzVariable; | ||
| 256 | LPCWSTR wzValue = pArgs->wzValue; | ||
| 257 | |||
| 258 | if (wzVariable && *wzVariable) | ||
| 259 | { | ||
| 260 | hr = VariableSetLiteralString(&pContext->pEngineState->variables, wzVariable, wzValue, FALSE); | ||
| 261 | ExitOnFailure(hr, "Failed to set literal string variable."); | ||
| 262 | } | ||
| 263 | else | ||
| 264 | { | ||
| 265 | hr = E_INVALIDARG; | ||
| 266 | ExitOnFailure(hr, "Bundle Extension did not provide variable name."); | ||
| 267 | } | ||
| 268 | |||
| 269 | LExit: | ||
| 270 | return hr; | ||
| 271 | } | ||
| 272 | |||
| 273 | static HRESULT BEEngineSetVariableNumeric( | 248 | static HRESULT BEEngineSetVariableNumeric( |
| 274 | __in BURN_EXTENSION_ENGINE_CONTEXT* pContext, | 249 | __in BURN_EXTENSION_ENGINE_CONTEXT* pContext, |
| 275 | __in const BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS* pArgs, | 250 | __in const BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS* pArgs, |
| @@ -307,7 +282,7 @@ static HRESULT BEEngineSetVariableString( | |||
| 307 | 282 | ||
| 308 | if (wzVariable && *wzVariable) | 283 | if (wzVariable && *wzVariable) |
| 309 | { | 284 | { |
| 310 | hr = VariableSetString(&pContext->pEngineState->variables, wzVariable, wzValue, FALSE); | 285 | hr = VariableSetString(&pContext->pEngineState->variables, wzVariable, wzValue, FALSE, pArgs->fFormatted); |
| 311 | ExitOnFailure(hr, "Failed to set string variable."); | 286 | ExitOnFailure(hr, "Failed to set string variable."); |
| 312 | } | 287 | } |
| 313 | else | 288 | else |
| @@ -383,9 +358,6 @@ HRESULT WINAPI EngineForExtensionProc( | |||
| 383 | case BUNDLE_EXTENSION_ENGINE_MESSAGE_LOG: | 358 | case BUNDLE_EXTENSION_ENGINE_MESSAGE_LOG: |
| 384 | hr = BEEngineLog(pContext, reinterpret_cast<BUNDLE_EXTENSION_ENGINE_LOG_ARGS*>(pvArgs), reinterpret_cast<BUNDLE_EXTENSION_ENGINE_LOG_RESULTS*>(pvResults)); | 359 | hr = BEEngineLog(pContext, reinterpret_cast<BUNDLE_EXTENSION_ENGINE_LOG_ARGS*>(pvArgs), reinterpret_cast<BUNDLE_EXTENSION_ENGINE_LOG_RESULTS*>(pvResults)); |
| 385 | break; | 360 | break; |
| 386 | case BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLELITERALSTRING: | ||
| 387 | hr = BEEngineSetVariableLiteralString(pContext, reinterpret_cast<BUNDLE_EXTENSION_ENGINE_SETVARIABLELITERALSTRING_ARGS*>(pvArgs), reinterpret_cast<BUNDLE_EXTENSION_ENGINE_SETVARIABLELITERALSTRING_RESULTS*>(pvResults)); | ||
| 388 | break; | ||
| 389 | case BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLENUMERIC: | 361 | case BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLENUMERIC: |
| 390 | hr = BEEngineSetVariableNumeric(pContext, reinterpret_cast<BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS*>(pvArgs), reinterpret_cast<BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_RESULTS*>(pvResults)); | 362 | hr = BEEngineSetVariableNumeric(pContext, reinterpret_cast<BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS*>(pvArgs), reinterpret_cast<BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_RESULTS*>(pvResults)); |
| 391 | break; | 363 | break; |
