bool FSGetApplPath(FSString &applPath, bool withPS/* = true*/) { #if defined(WIN32) || defined(_WIN32_WCE) char Temp[_MAX_PATH+1]; ::GetModuleFileNameA(NULL, Temp, _MAX_PATH); applPath = Temp; STRIndex_t pos = applPath.FindRAt(PATH_SEPARATOR_CHAR); if ( STRING_FOUND(pos) ) applPath.Truncate( withPS ? pos + 1 : pos ); return true; #else UniString uniString; if ( FSGetApplPath(uniString, withPS) ) { applPath = uniString; } return false; #endif }