MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getExecutableName

Method getExecutableName

Engine/source/platformWin32/winFileio.cpp:886–913  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

884#endif
885
886StringTableEntry Platform::getExecutableName()
887{
888#ifdef UNICODE
889 StringTableEntry exe;
890 getExecutableInfo( NULL, &exe );
891 return exe;
892#else
893 static StringTableEntry cen = NULL;
894 if (!cen)
895 {
896 char cen_buf[2048];
897 GetModuleFileNameA( NULL, cen_buf, 2047);
898 forwardslash(cen_buf);
899
900 char *delimiter = dStrrchr( cen_buf, '/' );
901
902 if( delimiter != NULL )
903 {
904 *delimiter = 0x00;
905 delimiter++;
906 cen = StringTable->insert(delimiter);
907 }
908 else
909 cen = StringTable->insert(cen_buf);
910 }
911 return cen;
912#endif
913}
914
915StringTableEntry Platform::getExecutablePath()
916{

Callers

nothing calls this directly

Calls 4

getExecutableInfoFunction · 0.85
forwardslashFunction · 0.70
dStrrchrFunction · 0.50
insertMethod · 0.45

Tested by

no test coverage detected