Commit 19ca8c7f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winmm: Use nameless unions.

parent 55e83494
EXTRADEFS = -D_WINMM_ -DWINE_NO_NAMELESS_EXTENSION EXTRADEFS = -D_WINMM_
MODULE = winmm.dll MODULE = winmm.dll
IMPORTLIB = winmm IMPORTLIB = winmm
IMPORTS = uuid user32 advapi32 ole32 msacm32 IMPORTS = uuid user32 advapi32 ole32 msacm32
......
...@@ -532,10 +532,10 @@ static void MMDRV_Init(void) ...@@ -532,10 +532,10 @@ static void MMDRV_Init(void)
goto exit; goto exit;
} }
size = WideCharToMultiByte(CP_ACP, 0, pv.u.pwszVal, -1, size = WideCharToMultiByte(CP_ACP, 0, pv.pwszVal, -1,
NULL, 0, NULL, NULL); NULL, 0, NULL, NULL);
drvA = HeapAlloc(GetProcessHeap(), 0, size); drvA = HeapAlloc(GetProcessHeap(), 0, size);
WideCharToMultiByte(CP_ACP, 0, pv.u.pwszVal, -1, drvA, size, NULL, NULL); WideCharToMultiByte(CP_ACP, 0, pv.pwszVal, -1, drvA, size, NULL, NULL);
MMDRV_Install(drvA, drvA, FALSE); MMDRV_Install(drvA, drvA, FALSE);
......
...@@ -422,7 +422,7 @@ static HRESULT WINMM_GetFriendlyName(IMMDevice *device, WCHAR *out, ...@@ -422,7 +422,7 @@ static HRESULT WINMM_GetFriendlyName(IMMDevice *device, WCHAR *out,
return hr; return hr;
} }
lstrcpynW(out, var.u.pwszVal, outlen); lstrcpynW(out, var.pwszVal, outlen);
PropVariantClear(&var); PropVariantClear(&var);
...@@ -2368,7 +2368,7 @@ static LRESULT DRV_QueryDeviceInterface(WINMM_QueryInterfaceInfo *info) ...@@ -2368,7 +2368,7 @@ static LRESULT DRV_QueryDeviceInterface(WINMM_QueryInterfaceInfo *info)
return MMSYSERR_ERROR; return MMSYSERR_ERROR;
} }
len_bytes = (lstrlenW(pv.u.pwszVal) + 1) * sizeof(WCHAR); len_bytes = (lstrlenW(pv.pwszVal) + 1) * sizeof(WCHAR);
if(info->str){ if(info->str){
if(len_bytes > *info->len_bytes){ if(len_bytes > *info->len_bytes){
...@@ -2378,7 +2378,7 @@ static LRESULT DRV_QueryDeviceInterface(WINMM_QueryInterfaceInfo *info) ...@@ -2378,7 +2378,7 @@ static LRESULT DRV_QueryDeviceInterface(WINMM_QueryInterfaceInfo *info)
return MMSYSERR_INVALPARAM; return MMSYSERR_INVALPARAM;
} }
memcpy(info->str, pv.u.pwszVal, len_bytes); memcpy(info->str, pv.pwszVal, len_bytes);
}else }else
*info->len_bytes = len_bytes; *info->len_bytes = len_bytes;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment