6 write_registry_setting_ex(
17 if (rc = RegCreateKeyEx(hRoot, LEASH_SETTINGS_REGISTRY_KEY_NAME, 0, 0, 0,
18 KEY_ALL_ACCESS, 0, &hKey, 0))
21 rc = RegSetValueEx(hKey, setting, 0, type, (LPBYTE)buffer, size);
29 write_registry_setting(
36 return write_registry_setting_ex(HKEY_CURRENT_USER,
45 read_registry_setting_ex(
57 if (rc = RegOpenKeyEx(hRoot,
58 LEASH_SETTINGS_REGISTRY_KEY_NAME,
59 0, KEY_QUERY_VALUE, &hKey))
62 memset(buffer, 0, size);
64 rc = RegQueryValueEx(hKey, setting, NULL, &dwType, (LPBYTE)buffer,
73 read_registry_setting_user(
79 return read_registry_setting_ex(HKEY_CURRENT_USER, setting, buffer, size);
84 read_registry_setting_machine(
90 return read_registry_setting_ex(HKEY_LOCAL_MACHINE, setting, buffer, size);
94 read_registry_setting(
101 rc = read_registry_setting_user(setting, buffer, size);
103 rc = read_registry_setting_machine(setting, buffer, size);