MCPcopy Create free account
hub / github.com/agraef/pure-lang / GetAppPath

Function GetAppPath

purepad/MainFrm.cpp:220–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218}
219
220static void GetAppPath(CString& app_path)
221{
222 app_path = "";
223 HKEY hSetup;
224 DWORD dwType, dwSize;
225 if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, szSetup,
226 0, KEY_READ, &hSetup) == ERROR_SUCCESS &&
227 RegQueryValueEx(hSetup, szPath, NULL, &dwType, NULL,
228 &dwSize) == ERROR_SUCCESS && dwType == REG_SZ) {
229 unsigned char *path = new unsigned char[dwSize];
230 if (RegQueryValueEx(hSetup, "Path", NULL, &dwType, path,
231 &dwSize) == ERROR_SUCCESS) {
232 app_path = path;
233 delete[] path;
234 }
235 RegCloseKey(hSetup);
236 }
237}
238
239#if 0
240static void GetTclPathAndVersion(CString& tcl_path, CString& tcl_version)

Callers 1

InitializeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected