MCPcopy Create free account
hub / github.com/DFHack/dfhack / launch_direct

Function launch_direct

package/launchdf.cpp:91–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89#ifdef WIN32
90
91static LPCWSTR launch_direct() {
92 STARTUPINFOW si;
93 PROCESS_INFORMATION pi;
94
95 ZeroMemory(&si, sizeof(si));
96 si.cb = sizeof(si);
97 ZeroMemory(&pi, sizeof(pi));
98
99 BOOL res = CreateProcessW(L"Dwarf Fortress.exe",
100 NULL, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
101
102 if (res) {
103 WaitForSingleObject(pi.hProcess, INFINITE);
104
105 CloseHandle(pi.hProcess);
106 CloseHandle(pi.hThread);
107 return NULL;
108 }
109
110 return L"Could not launch via non-steam fallback method";
111}
112
113#else
114

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected