MCPcopy Create free account
hub / github.com/bwapi/bwapi / GetRegString

Function GetRegString

bwapi/BWAPI_PluginInjector/common.cpp:45–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45std::string GetRegString(const char *pszSubKey, const char *pszValueName)
46{
47 // Declare temporary string and size
48 char szTemp[MAX_PATH];
49 DWORD dwSize = MAX_PATH;
50
51 // Retrieve the key and value from HKCU
52 DWORD dwErrCode = GetSingleRegString(HKEY_CURRENT_USER, pszSubKey, pszValueName, szTemp, &dwSize);
53 // If it's not found, then search HKLM
54 if (dwErrCode != ERROR_SUCCESS)
55 {
56 /// @TODO: Check error
57 GetSingleRegString(HKEY_LOCAL_MACHINE, pszSubKey, pszValueName, szTemp, &dwSize);
58 }
59
60 // Return the string
61 return std::string(szTemp);
62}
63
64bool BWAPIError(const char *format, ...)
65{

Callers 1

GetBWAPIDataDirectoryFunction · 0.85

Calls 1

GetSingleRegStringFunction · 0.85

Tested by

no test coverage detected