| 767 | cc_bool Process_OpenSupported = true; |
| 768 | |
| 769 | static 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 | |
| 787 | cc_result Process_StartGame2(const cc_string* args, int numArgs) { |
| 788 | union STARTUPINFO_union { |
no outgoing calls
no test coverage detected