static LONG getSTDName(const char *winid, char *regStdName, int32_t length) { DWORD cbData = length; LONG result; HKEY hkey; result = openTZRegKey(&hkey, winid); if (result == ERROR_SUCCESS) { result = RegQueryValueExA(hkey, STD_REGKEY, NULL, NULL, (LPBYTE)regStdName, &cbData); RegCloseKey(hkey); } return result; }
static LONG getTZI(const char *winid, TZI *tzi) { DWORD cbData = sizeof(TZI); LONG result; HKEY hkey; result = openTZRegKey(&hkey, winid); if (result == ERROR_SUCCESS) { result = RegQueryValueExA(hkey, TZI_REGKEY, NULL, NULL, (LPBYTE)tzi, &cbData); RegCloseKey(hkey); } return result; }