diff options
Diffstat (limited to 'src/burn/engine/variable.cpp')
| -rw-r--r-- | src/burn/engine/variable.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/burn/engine/variable.cpp b/src/burn/engine/variable.cpp index 6f818ff3..e2b1f1f2 100644 --- a/src/burn/engine/variable.cpp +++ b/src/burn/engine/variable.cpp | |||
| @@ -294,6 +294,7 @@ extern "C" HRESULT VariablesParseFromXml( | |||
| 294 | ) | 294 | ) |
| 295 | { | 295 | { |
| 296 | HRESULT hr = S_OK; | 296 | HRESULT hr = S_OK; |
| 297 | IXMLDOMNode* pixnCommandLine = NULL; | ||
| 297 | IXMLDOMNodeList* pixnNodes = NULL; | 298 | IXMLDOMNodeList* pixnNodes = NULL; |
| 298 | IXMLDOMNode* pixnNode = NULL; | 299 | IXMLDOMNode* pixnNode = NULL; |
| 299 | DWORD cNodes = 0; | 300 | DWORD cNodes = 0; |
| @@ -307,6 +308,32 @@ extern "C" HRESULT VariablesParseFromXml( | |||
| 307 | 308 | ||
| 308 | ::EnterCriticalSection(&pVariables->csAccess); | 309 | ::EnterCriticalSection(&pVariables->csAccess); |
| 309 | 310 | ||
| 311 | // select registration node | ||
| 312 | hr = XmlSelectSingleNode(pixnBundle, L"CommandLine", &pixnCommandLine); | ||
| 313 | if (S_FALSE == hr) | ||
| 314 | { | ||
| 315 | hr = E_NOTFOUND; | ||
| 316 | } | ||
| 317 | ExitOnFailure(hr, "Failed to select CommandLine node."); | ||
| 318 | |||
| 319 | // @Variables | ||
| 320 | hr = XmlGetAttributeEx(pixnCommandLine, L"Variables", &scz); | ||
| 321 | ExitOnFailure(hr, "Failed to get CommandLine/@Variables."); | ||
| 322 | |||
| 323 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"upperCase", -1)) | ||
| 324 | { | ||
| 325 | pVariables->commandLineType = BURN_VARIABLE_COMMAND_LINE_TYPE_UPPER_CASE; | ||
| 326 | } | ||
| 327 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, scz, -1, L"caseSensitive", -1)) | ||
| 328 | { | ||
| 329 | pVariables->commandLineType = BURN_VARIABLE_COMMAND_LINE_TYPE_CASE_SENSITIVE; | ||
| 330 | } | ||
| 331 | else | ||
| 332 | { | ||
| 333 | hr = E_INVALIDARG; | ||
| 334 | ExitOnFailure(hr, "Invalid value for CommandLine/@Variables: %ls", scz); | ||
| 335 | } | ||
| 336 | |||
| 310 | // select variable nodes | 337 | // select variable nodes |
| 311 | hr = XmlSelectNodes(pixnBundle, L"Variable", &pixnNodes); | 338 | hr = XmlSelectNodes(pixnBundle, L"Variable", &pixnNodes); |
| 312 | ExitOnFailure(hr, "Failed to select variable nodes."); | 339 | ExitOnFailure(hr, "Failed to select variable nodes."); |
| @@ -434,6 +461,7 @@ extern "C" HRESULT VariablesParseFromXml( | |||
| 434 | LExit: | 461 | LExit: |
| 435 | ::LeaveCriticalSection(&pVariables->csAccess); | 462 | ::LeaveCriticalSection(&pVariables->csAccess); |
| 436 | 463 | ||
| 464 | ReleaseObject(pixnCommandLine); | ||
| 437 | ReleaseObject(pixnNodes); | 465 | ReleaseObject(pixnNodes); |
| 438 | ReleaseObject(pixnNode); | 466 | ReleaseObject(pixnNode); |
| 439 | ReleaseStr(scz); | 467 | ReleaseStr(scz); |
