[MMDEVAPI] Sync with Wine 3.0. CORE-14225

This commit is contained in:
Amine Khaldi 2018-01-20 12:26:03 +01:00
parent eeff448275
commit a3eb2d3811
3 changed files with 6 additions and 8 deletions

View file

@ -595,7 +595,7 @@ static HRESULT WINAPI MMDevice_Activate(IMMDevice *iface, REFIID riid, DWORD cls
if (SUCCEEDED(hr))
{
IPersistPropertyBag *ppb;
hr = IUnknown_QueryInterface((IUnknown*)*ppv, &IID_IPersistPropertyBag, (void*)&ppb);
hr = IUnknown_QueryInterface((IUnknown*)*ppv, &IID_IPersistPropertyBag, (void **)&ppb);
if (SUCCEEDED(hr))
{
/* ::Load cannot assume the interface stays alive after the function returns,

View file

@ -82,20 +82,17 @@ static BOOL load_driver(const WCHAR *name, DriverFuncs *driver)
return TRUE;
}
static BOOL init_driver(void)
static BOOL WINAPI init_driver(INIT_ONCE *once, void *param, void **context)
{
static const WCHAR drv_value[] = {'A','u','d','i','o',0};
static WCHAR default_list[] = {'p','u','l','s','e',',','a','l','s','a',',','o','s','s',',',
'c','o','r','e','a','u','d','i','o',0};
'c','o','r','e','a','u','d','i','o',',','a','n','d','r','o','i','d',0};
DriverFuncs driver;
HKEY key;
WCHAR reg_list[256], *p, *next, *driver_list = default_list;
if(drvs.module)
return TRUE;
if(RegOpenKeyW(HKEY_CURRENT_USER, drv_keyW, &key) == ERROR_SUCCESS){
DWORD size = sizeof(reg_list);
@ -249,10 +246,11 @@ static IClassFactoryImpl MMDEVAPI_CF[] = {
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT;
unsigned int i = 0;
TRACE("(%s, %s, %p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if(!init_driver()){
if(!InitOnceExecuteOnce(&init_once, init_driver, NULL, NULL)) {
ERR("Driver initialization failed\n");
return E_FAIL;
}

View file

@ -97,7 +97,7 @@ reactos/dll/win32/mciseq # Synced to WineStaging-2.9
reactos/dll/win32/mciwave # Synced to WineStaging-2.9
reactos/dll/win32/mgmtapi # Synced to WineStaging-2.9
reactos/dll/win32/mlang # Synced to Wine-3.0
reactos/dll/win32/mmdevapi # Synced to WineStaging-1.9.23
reactos/dll/win32/mmdevapi # Synced to Wine-3.0
reactos/dll/win32/mpr # Synced to Wine-3.0
reactos/dll/win32/mprapi # Synced to WineStaging-2.9
reactos/dll/win32/msacm32 # Synced to WineStaging-2.16