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

Function GetSingleRegString

bwapi/BWAPI_PluginInjector/common.cpp:27–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27DWORD GetSingleRegString(HKEY hBaseKey, const char *pszSubKey, const char *pszValueName, char *pszOutput, DWORD *dwOutSize)
28{
29 HKEY hKey = NULL;
30 pszOutput[0] = '\0';
31
32 // Open the key
33 DWORD dwErrCode = RegOpenKeyExA(hBaseKey, pszSubKey, 0, KEY_QUERY_VALUE, &hKey);
34 if ( dwErrCode != ERROR_SUCCESS )
35 return dwErrCode;
36
37 // Query the value
38 dwErrCode = RegQueryValueExA(hKey, pszValueName, NULL, NULL, (LPBYTE)pszOutput, dwOutSize);
39
40 // Close key and return error code
41 RegCloseKey(hKey);
42 return dwErrCode;
43}
44
45std::string GetRegString(const char *pszSubKey, const char *pszValueName)
46{

Callers 1

GetRegStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected