Commit 7f6554b7 authored by Felix Nawothnig's avatar Felix Nawothnig Committed by Alexandre Julliard

Make string elements of MCI_OPEN_PARMS const to match the SDK headers.

parent c01c579f
......@@ -738,7 +738,7 @@ static DWORD MIDI_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSW lpParms)
if (dwFlags & MCI_OPEN_ELEMENT) {
TRACE("MCI_OPEN_ELEMENT %s!\n", debugstr_w(lpParms->lpstrElementName));
if (lpParms->lpstrElementName && strlenW(lpParms->lpstrElementName) > 0) {
wmm->hFile = mmioOpenW(lpParms->lpstrElementName, NULL,
wmm->hFile = mmioOpenW((LPWSTR)lpParms->lpstrElementName, NULL,
MMIO_ALLOCBUF | MMIO_READ | MMIO_DENYWRITE);
if (wmm->hFile == 0) {
WARN("Can't find file %s!\n", debugstr_w(lpParms->lpstrElementName));
......
......@@ -456,15 +456,15 @@ static DWORD MCI_UnmapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR dwParam2,
if (dwParam1 & MCI_OPEN_TYPE)
{
if (!(dwParam1 & MCI_OPEN_TYPE_ID))
HeapFree(GetProcessHeap(), 0, mci_openW->lpstrDeviceType);
HeapFree(GetProcessHeap(), 0, (LPWSTR)mci_openW->lpstrDeviceType);
}
if (dwParam1 & MCI_OPEN_ELEMENT)
{
if (!(dwParam1 & MCI_OPEN_ELEMENT_ID))
HeapFree(GetProcessHeap(), 0, mci_openW->lpstrElementName);
HeapFree(GetProcessHeap(), 0, (LPWSTR)mci_openW->lpstrElementName);
}
if (dwParam1 & MCI_OPEN_ALIAS)
HeapFree(GetProcessHeap(), 0, mci_openW->lpstrAlias);
HeapFree(GetProcessHeap(), 0, (LPWSTR)mci_openW->lpstrAlias);
HeapFree(GetProcessHeap(), 0, ptr);
}
break;
......
......@@ -2808,11 +2808,11 @@ static WINMM_MapType MCI_UnMapMsg16To32W(WORD uDevType, WORD wMsg, DWORD dwFlag
mop16->wDeviceID = mop32w->wDeviceID;
if( ( dwFlags & ( MCI_OPEN_TYPE | MCI_OPEN_TYPE_ID)) == MCI_OPEN_TYPE)
HeapFree(GetProcessHeap(), 0, mop32w->lpstrDeviceType);
HeapFree(GetProcessHeap(), 0, (LPWSTR)mop32w->lpstrDeviceType);
if( ( dwFlags & ( MCI_OPEN_ELEMENT | MCI_OPEN_ELEMENT_ID)) == MCI_OPEN_ELEMENT)
HeapFree(GetProcessHeap(), 0, mop32w->lpstrElementName);
HeapFree(GetProcessHeap(), 0, (LPWSTR)mop32w->lpstrElementName);
if( ( dwFlags & MCI_OPEN_ALIAS))
HeapFree(GetProcessHeap(), 0, mop32w->lpstrAlias);
HeapFree(GetProcessHeap(), 0, (LPWSTR)mop32w->lpstrAlias);
if (!HeapFree(GetProcessHeap(), 0, (LPVOID)(lParam - sizeof(LPMCI_OPEN_PARMS16))))
FIXME("bad free line=%d\n", __LINE__);
}
......
......@@ -1942,17 +1942,17 @@ typedef struct tagMCI_GENERIC_PARMS {
typedef struct tagMCI_OPEN_PARMSA {
DWORD_PTR dwCallback;
MCIDEVICEID wDeviceID;
LPSTR lpstrDeviceType;
LPSTR lpstrElementName;
LPSTR lpstrAlias;
LPCSTR lpstrDeviceType;
LPCSTR lpstrElementName;
LPCSTR lpstrAlias;
} MCI_OPEN_PARMSA, *LPMCI_OPEN_PARMSA;
typedef struct tagMCI_OPEN_PARMSW {
DWORD_PTR dwCallback;
MCIDEVICEID wDeviceID;
LPWSTR lpstrDeviceType;
LPWSTR lpstrElementName;
LPWSTR lpstrAlias;
LPCWSTR lpstrDeviceType;
LPCWSTR lpstrElementName;
LPCWSTR lpstrAlias;
} MCI_OPEN_PARMSW, *LPMCI_OPEN_PARMSW;
DECL_WINELIB_TYPE_AW(MCI_OPEN_PARMS)
......
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