| 596 | } |
| 597 | |
| 598 | bool cmVSSetupAPIHelper::Initialize() |
| 599 | { |
| 600 | if (initializationFailure) { |
| 601 | return false; |
| 602 | } |
| 603 | |
| 604 | if (FAILED(comInitialized)) { |
| 605 | initializationFailure = true; |
| 606 | return false; |
| 607 | } |
| 608 | |
| 609 | if (FAILED(setupConfig.CoCreateInstance(CLSID_SetupConfiguration, nullptr, |
| 610 | IID_ISetupConfiguration, |
| 611 | CLSCTX_INPROC_SERVER)) || |
| 612 | !setupConfig) { |
| 613 | initializationFailure = true; |
| 614 | return false; |
| 615 | } |
| 616 | |
| 617 | if (FAILED(setupConfig.QueryInterface(IID_ISetupConfiguration2, |
| 618 | (void**)&setupConfig2)) || |
| 619 | !setupConfig2) { |
| 620 | initializationFailure = true; |
| 621 | return false; |
| 622 | } |
| 623 | |
| 624 | if (FAILED( |
| 625 | setupConfig.QueryInterface(IID_ISetupHelper, (void**)&setupHelper)) || |
| 626 | !setupHelper) { |
| 627 | initializationFailure = true; |
| 628 | return false; |
| 629 | } |
| 630 | |
| 631 | initializationFailure = false; |
| 632 | return true; |
| 633 | } |
nothing calls this directly
no test coverage detected