mirror of
https://github.com/reactos/reactos.git
synced 2025-05-19 17:14:32 +00:00
- Setup winmm entries for wdmaud.drv if they dont exist yet
svn path=/trunk/; revision=39886
This commit is contained in:
parent
fed8d4f74d
commit
ab3175b141
1 changed files with 21 additions and 0 deletions
|
@ -166,6 +166,10 @@ MMSYS_InstallDevice(HDEVINFO hDevInfo, PSP_DEVINFO_DATA pspDevInfoData)
|
||||||
PVOID Context;
|
PVOID Context;
|
||||||
BOOL Result;
|
BOOL Result;
|
||||||
SC_HANDLE hSCManager, hService;
|
SC_HANDLE hSCManager, hService;
|
||||||
|
WCHAR WaveName[20];
|
||||||
|
HKEY hKey;
|
||||||
|
DWORD BufferSize;
|
||||||
|
ULONG Index;
|
||||||
|
|
||||||
if (!IsEqualIID(&pspDevInfoData->ClassGuid, &GUID_DEVCLASS_SOUND) &&
|
if (!IsEqualIID(&pspDevInfoData->ClassGuid, &GUID_DEVCLASS_SOUND) &&
|
||||||
!IsEqualIID(&pspDevInfoData->ClassGuid, &GUID_DEVCLASS_MEDIA))
|
!IsEqualIID(&pspDevInfoData->ClassGuid, &GUID_DEVCLASS_MEDIA))
|
||||||
|
@ -243,6 +247,23 @@ MMSYS_InstallDevice(HDEVINFO hDevInfo, PSP_DEVINFO_DATA pspDevInfoData)
|
||||||
}
|
}
|
||||||
CloseServiceHandle(hSCManager);
|
CloseServiceHandle(hSCManager);
|
||||||
|
|
||||||
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32", 0, GENERIC_READ | GENERIC_WRITE, &hKey) == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
szBuffer[Length] = '\0';
|
||||||
|
pBuffer = PathAddBackslashW(szBuffer);
|
||||||
|
wcscpy(pBuffer, L"system32\\wdmaud.drv");
|
||||||
|
|
||||||
|
for(Index = 1; Index <= 4; Index++)
|
||||||
|
{
|
||||||
|
swprintf(WaveName, L"wave%u", Index);
|
||||||
|
if (RegQueryValueExW(hKey, WaveName, 0, NULL, NULL, &BufferSize) != ERROR_MORE_DATA)
|
||||||
|
{
|
||||||
|
RegSetValueExW(hKey, WaveName, 0, REG_SZ, (LPBYTE)szBuffer, (wcslen(szBuffer)+1) * sizeof(WCHAR));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RegCloseKey(hKey);
|
||||||
|
}
|
||||||
|
|
||||||
return ERROR_DI_DO_DEFAULT;
|
return ERROR_DI_DO_DEFAULT;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue