MCPcopy Create free account
hub / github.com/Squirrel/Squirrel.Windows / FindOwnExecutableName

Function FindOwnExecutableName

src/StubExecutable/StubExecutable.cpp:27–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27wchar_t* FindOwnExecutableName()
28{
29 wchar_t* ourDirectory = new wchar_t[MAX_PATH];
30
31 GetModuleFileName(GetModuleHandle(NULL), ourDirectory, MAX_PATH);
32 wchar_t* lastSlash = wcsrchr(ourDirectory, L'\\');
33 if (!lastSlash) {
34 delete[] ourDirectory;
35 return NULL;
36 }
37
38 wchar_t* ret = _wcsdup(lastSlash + 1);
39 delete[] ourDirectory;
40 return ret;
41}
42
43std::wstring FindLatestAppDir()
44{

Callers 1

wWinMainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected