MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / Process_RawGetExePath

Function Process_RawGetExePath

src/Platform_Windows.c:769–785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

767cc_bool Process_OpenSupported = true;
768
769static cc_result Process_RawGetExePath(cc_winstring* path, int* len) {
770 cc_result res;
771
772 /* If GetModuleFileNameA fails.. that's a serious problem */
773 *len = GetModuleFileNameA(NULL, path->ansi, NATIVE_STR_LEN);
774 path->ansi[*len] = '\0';
775 if (!(*len)) return GetLastError();
776
777 *len = GetModuleFileNameW(NULL, path->uni, NATIVE_STR_LEN);
778 path->uni[*len] = '\0';
779 if (*len) return 0;
780
781 /* GetModuleFileNameW can fail on Win 9x */
782 res = GetLastError();
783 if (res == ERROR_CALL_NOT_IMPLEMENTED) res = 0;
784 return res;
785}
786
787cc_result Process_StartGame2(const cc_string* args, int numArgs) {
788 union STARTUPINFO_union {

Callers 4

Process_StartGame2Function · 0.70
Updater_StartFunction · 0.70
Updater_GetBuildTimeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected