Commit 230aab4c authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

localspl: Use helper for loading string from registry in monitor_load.

parent 5db76ad2
...@@ -835,14 +835,8 @@ static monitor_t * monitor_load(LPCWSTR name, LPWSTR dllname) ...@@ -835,14 +835,8 @@ static monitor_t * monitor_load(LPCWSTR name, LPWSTR dllname)
lstrcatW(regroot, name); lstrcatW(regroot, name);
if (RegOpenKeyW(HKEY_LOCAL_MACHINE, regroot, &hroot) == ERROR_SUCCESS) { if (RegOpenKeyW(HKEY_LOCAL_MACHINE, regroot, &hroot) == ERROR_SUCCESS) {
/* Get the Driver from the Registry */ /* Get the Driver from the Registry */
if (driver == NULL) { if (!driver)
DWORD namesize; driver = reg_query_value(hroot, L"Driver");
if (RegQueryValueExW(hroot, L"Driver", NULL, NULL, NULL,
&namesize) == ERROR_SUCCESS) {
driver = malloc(namesize);
RegQueryValueExW(hroot, L"Driver", NULL, NULL, (BYTE*)driver, &namesize);
}
}
} }
else else
WARN("%s not found\n", debugstr_w(regroot)); WARN("%s not found\n", debugstr_w(regroot));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment