https://git.reactos.org/?p=reactos.git;a=commitdiff;h=31d268d584c84be227d05…
commit 31d268d584c84be227d05457b9131bfb674fd8e8
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sat Jan 26 13:17:08 2019 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sat Jan 26 13:17:08 2019 +0100
[MMDEVAPI] Sync with Wine Staging 4.0. CORE-15682
---
dll/win32/mmdevapi/devenum.c | 10 +++++-----
dll/win32/mmdevapi/main.c | 2 +-
media/doc/README.WINE | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dll/win32/mmdevapi/devenum.c b/dll/win32/mmdevapi/devenum.c
index b189e8e060..685ec27de6 100644
--- a/dll/win32/mmdevapi/devenum.c
+++ b/dll/win32/mmdevapi/devenum.c
@@ -338,7 +338,7 @@ static MMDevice *MMDevice_Create(WCHAR *name, GUID *id, EDataFlow
flow, DWORD st
cur->state = state;
cur->devguid = *id;
- StringFromGUID2(&cur->devguid, guidstr, sizeof(guidstr)/sizeof(*guidstr));
+ StringFromGUID2(&cur->devguid, guidstr, ARRAY_SIZE(guidstr));
if (flow == eRender)
root = key_render;
@@ -429,7 +429,7 @@ static HRESULT load_devices_from_reg(void)
DWORD len;
PROPVARIANT pv = { VT_EMPTY };
- len = sizeof(guidvalue)/sizeof(guidvalue[0]);
+ len = ARRAY_SIZE(guidvalue);
ret = RegEnumKeyExW(cur, i++, guidvalue, &len, NULL, NULL, NULL, NULL);
if (ret == ERROR_NO_MORE_ITEMS)
{
@@ -1395,7 +1395,7 @@ static HRESULT WINAPI MMDevPropStore_GetCount(IPropertyStore *iface,
DWORD *npro
return hr;
*nprops = 0;
do {
- DWORD len = sizeof(buffer)/sizeof(*buffer);
+ DWORD len = ARRAY_SIZE(buffer);
if (RegEnumValueW(propkey, i, buffer, &len, NULL, NULL, NULL, NULL) !=
ERROR_SUCCESS)
break;
i++;
@@ -1410,7 +1410,7 @@ static HRESULT WINAPI MMDevPropStore_GetAt(IPropertyStore *iface,
DWORD prop, PR
{
MMDevPropStore *This = impl_from_IPropertyStore(iface);
WCHAR buffer[50];
- DWORD len = sizeof(buffer)/sizeof(*buffer);
+ DWORD len = ARRAY_SIZE(buffer);
HRESULT hr;
HKEY propkey;
@@ -1530,7 +1530,7 @@ static HRESULT WINAPI PB_Read(IPropertyBag *iface, LPCOLESTR name,
VARIANT *var,
if (!lstrcmpW(name, dsguid))
{
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.n3.bstrVal = SysAllocString(guidstr);
return S_OK;
diff --git a/dll/win32/mmdevapi/main.c b/dll/win32/mmdevapi/main.c
index 2b0a6f946b..8886975c96 100644
--- a/dll/win32/mmdevapi/main.c
+++ b/dll/win32/mmdevapi/main.c
@@ -295,7 +295,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID
*ppv)
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)) {
IClassFactory_AddRef(&MMDEVAPI_CF[i].IClassFactory_iface);
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 25458c0b00..bb6ca8c70a 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -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/mgmtapi # Synced to WineStaging-3.3
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/mprapi # Synced to WineStaging-3.3
reactos/dll/win32/msacm32 # Synced to WineStaging-3.3