1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 03:45:57 +00:00

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

This commit is contained in:
Piotr Caban 2022-12-02 20:40:05 +01:00 committed by Alexandre Julliard
parent 5db76ad245
commit 230aab4ca8

View File

@ -835,14 +835,8 @@ static monitor_t * monitor_load(LPCWSTR name, LPWSTR dllname)
lstrcatW(regroot, name);
if (RegOpenKeyW(HKEY_LOCAL_MACHINE, regroot, &hroot) == ERROR_SUCCESS) {
/* Get the Driver from the Registry */
if (driver == NULL) {
DWORD namesize;
if (RegQueryValueExW(hroot, L"Driver", NULL, NULL, NULL,
&namesize) == ERROR_SUCCESS) {
driver = malloc(namesize);
RegQueryValueExW(hroot, L"Driver", NULL, NULL, (BYTE*)driver, &namesize);
}
}
if (!driver)
driver = reg_query_value(hroot, L"Driver");
}
else
WARN("%s not found\n", debugstr_w(regroot));