[MMDEVAPI] Sync with Wine Staging 4.0. CORE-15682

This commit is contained in:
Amine Khaldi 2019-01-26 13:17:08 +01:00
parent 0a904ca409
commit 31d268d584
3 changed files with 7 additions and 7 deletions

View file

@ -338,7 +338,7 @@ static MMDevice *MMDevice_Create(WCHAR *name, GUID *id, EDataFlow flow, DWORD st
cur->state = state; cur->state = state;
cur->devguid = *id; cur->devguid = *id;
StringFromGUID2(&cur->devguid, guidstr, sizeof(guidstr)/sizeof(*guidstr)); StringFromGUID2(&cur->devguid, guidstr, ARRAY_SIZE(guidstr));
if (flow == eRender) if (flow == eRender)
root = key_render; root = key_render;
@ -429,7 +429,7 @@ static HRESULT load_devices_from_reg(void)
DWORD len; DWORD len;
PROPVARIANT pv = { VT_EMPTY }; PROPVARIANT pv = { VT_EMPTY };
len = sizeof(guidvalue)/sizeof(guidvalue[0]); len = ARRAY_SIZE(guidvalue);
ret = RegEnumKeyExW(cur, i++, guidvalue, &len, NULL, NULL, NULL, NULL); ret = RegEnumKeyExW(cur, i++, guidvalue, &len, NULL, NULL, NULL, NULL);
if (ret == ERROR_NO_MORE_ITEMS) if (ret == ERROR_NO_MORE_ITEMS)
{ {
@ -1395,7 +1395,7 @@ static HRESULT WINAPI MMDevPropStore_GetCount(IPropertyStore *iface, DWORD *npro
return hr; return hr;
*nprops = 0; *nprops = 0;
do { do {
DWORD len = sizeof(buffer)/sizeof(*buffer); DWORD len = ARRAY_SIZE(buffer);
if (RegEnumValueW(propkey, i, buffer, &len, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) if (RegEnumValueW(propkey, i, buffer, &len, NULL, NULL, NULL, NULL) != ERROR_SUCCESS)
break; break;
i++; i++;
@ -1410,7 +1410,7 @@ static HRESULT WINAPI MMDevPropStore_GetAt(IPropertyStore *iface, DWORD prop, PR
{ {
MMDevPropStore *This = impl_from_IPropertyStore(iface); MMDevPropStore *This = impl_from_IPropertyStore(iface);
WCHAR buffer[50]; WCHAR buffer[50];
DWORD len = sizeof(buffer)/sizeof(*buffer); DWORD len = ARRAY_SIZE(buffer);
HRESULT hr; HRESULT hr;
HKEY propkey; HKEY propkey;
@ -1530,7 +1530,7 @@ static HRESULT WINAPI PB_Read(IPropertyBag *iface, LPCOLESTR name, VARIANT *var,
if (!lstrcmpW(name, dsguid)) if (!lstrcmpW(name, dsguid))
{ {
WCHAR guidstr[39]; WCHAR guidstr[39];
StringFromGUID2(&This->devguid, guidstr,sizeof(guidstr)/sizeof(*guidstr)); StringFromGUID2(&This->devguid, guidstr,ARRAY_SIZE(guidstr));
var->n1.n2.vt = VT_BSTR; var->n1.n2.vt = VT_BSTR;
var->n1.n2.n3.bstrVal = SysAllocString(guidstr); var->n1.n2.n3.bstrVal = SysAllocString(guidstr);
return S_OK; return S_OK;

View file

@ -295,7 +295,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
return E_NOINTERFACE; return E_NOINTERFACE;
} }
for (i = 0; i < sizeof(MMDEVAPI_CF)/sizeof(MMDEVAPI_CF[0]); ++i) for (i = 0; i < ARRAY_SIZE(MMDEVAPI_CF); ++i)
{ {
if (IsEqualGUID(rclsid, MMDEVAPI_CF[i].rclsid)) { if (IsEqualGUID(rclsid, MMDEVAPI_CF[i].rclsid)) {
IClassFactory_AddRef(&MMDEVAPI_CF[i].IClassFactory_iface); IClassFactory_AddRef(&MMDEVAPI_CF[i].IClassFactory_iface);

View file

@ -97,7 +97,7 @@ reactos/dll/win32/mciseq # Synced to WineStaging-3.3
reactos/dll/win32/mciwave # Synced to WineStaging-4.0 reactos/dll/win32/mciwave # Synced to WineStaging-4.0
reactos/dll/win32/mgmtapi # Synced to WineStaging-3.3 reactos/dll/win32/mgmtapi # Synced to WineStaging-3.3
reactos/dll/win32/mlang # Synced to WineStaging-4.0 reactos/dll/win32/mlang # Synced to WineStaging-4.0
reactos/dll/win32/mmdevapi # Synced to WineStaging-3.3 reactos/dll/win32/mmdevapi # Synced to WineStaging-4.0
reactos/dll/win32/mpr # Synced to WineStaging-3.17 reactos/dll/win32/mpr # Synced to WineStaging-3.17
reactos/dll/win32/mprapi # Synced to WineStaging-3.3 reactos/dll/win32/mprapi # Synced to WineStaging-3.3
reactos/dll/win32/msacm32 # Synced to WineStaging-3.3 reactos/dll/win32/msacm32 # Synced to WineStaging-3.3