MCPcopy Create free account
hub / github.com/defold/defold / GetApplicationPath

Function GetApplicationPath

engine/dlib/src/dlib/sys_win32.cpp:160–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158 }
159
160 Result GetApplicationPath(char* path_out, uint32_t path_len)
161 {
162 assert(path_len > 0);
163 path_out[0] = 0;
164
165 char module_file_name[DMPATH_MAX_PATH];
166 DWORD copied = GetModuleFileNameA(NULL, module_file_name, DMPATH_MAX_PATH);
167 if (copied == 0 || copied >= DMPATH_MAX_PATH)
168 {
169 return RESULT_INVAL;
170 }
171
172 dmPath::Dirname(module_file_name, path_out, path_len);
173 return RESULT_OK;
174 }
175
176 Result OpenURL(const char* url, const char* target)
177 {

Callers

nothing calls this directly

Calls 3

DirnameFunction · 0.85
dmSnPrintfFunction · 0.85
assertFunction · 0.50

Tested by

no test coverage detected