[ros-diffs] [janderwald] 39886: - Setup winmm entries for wdmaud.drv if they dont exist yet
janderwald at svn.reactos.org
janderwald at svn.reactos.org
Thu Mar 5 15:40:15 CET 2009
Author: janderwald
Date: Thu Mar 5 17:40:14 2009
New Revision: 39886
URL: http://svn.reactos.org/svn/reactos?rev=39886&view=rev
Log:
- Setup winmm entries for wdmaud.drv if they dont exist yet
Modified:
trunk/reactos/dll/cpl/mmsys/mmsys.c
Modified: trunk/reactos/dll/cpl/mmsys/mmsys.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/mmsys/mmsys.c?rev=39886&r1=39885&r2=39886&view=diff
==============================================================================
--- trunk/reactos/dll/cpl/mmsys/mmsys.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/mmsys/mmsys.c [iso-8859-1] Thu Mar 5 17:40:14 2009
@@ -166,6 +166,10 @@
PVOID Context;
BOOL Result;
SC_HANDLE hSCManager, hService;
+ WCHAR WaveName[20];
+ HKEY hKey;
+ DWORD BufferSize;
+ ULONG Index;
if (!IsEqualIID(&pspDevInfoData->ClassGuid, &GUID_DEVCLASS_SOUND) &&
!IsEqualIID(&pspDevInfoData->ClassGuid, &GUID_DEVCLASS_MEDIA))
@@ -242,6 +246,23 @@
CloseServiceHandle(hService);
}
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;
More information about the Ros-diffs
mailing list