MCPcopy Create free account
hub / github.com/LegacyUpdate/LegacyUpdate / StartLauncher

Function StartLauncher

LegacyUpdate/Utils.cpp:18–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16typedef DWORD (WINAPI *_InitiateShutdownW)(LPWSTR lpMachineName, LPWSTR lpMessage, DWORD dwGracePeriod, DWORD dwShutdownFlags, DWORD dwReason);
17
18HRESULT StartLauncher(LPCWSTR params, BOOL wait) {
19 LPWSTR path = NULL;
20 HRESULT hr = GetInstallPath(&path);
21 CHECK_HR_OR_RETURN(L"GetInstallPath");
22
23 PathAppend(path, L"LegacyUpdate.exe");
24
25 DWORD code = 0;
26 hr = Exec(NULL, path, params, NULL, SW_SHOWDEFAULT, wait, &code);
27 CHECK_HR_OR_GOTO_END(L"Exec");
28 hr = HRESULT_FROM_WIN32(code);
29
30end:
31 LocalFree(path);
32 return hr;
33}
34
35HRESULT Reboot(void) {
36 HRESULT hr = E_FAIL;

Callers 3

ViewLogMethod · 0.85
LaunchUpdateSiteFunction · 0.85

Calls 2

GetInstallPathFunction · 0.85
ExecFunction · 0.85

Tested by

no test coverage detected