From 7f6554b7d12d4a25f41de8e6f603b34909065d98 Mon Sep 17 00:00:00 2001 From: Felix Nawothnig Date: Thu, 18 Aug 2005 10:53:58 +0000 Subject: [PATCH] Make string elements of MCI_OPEN_PARMS const to match the SDK headers. --- dlls/mciseq/mcimidi.c | 2 +- dlls/winmm/mci.c | 6 +++--- dlls/winmm/message16.c | 6 +++--- include/mmsystem.h | 12 ++++++------ 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/mciseq/mcimidi.c b/dlls/mciseq/mcimidi.c index c1976df838b..16b8b8737eb 100644 --- a/dlls/mciseq/mcimidi.c +++ b/dlls/mciseq/mcimidi.c @@ -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)); diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c index 5ec26155ea5..3a8175cba58 100644 --- a/dlls/winmm/mci.c +++ b/dlls/winmm/mci.c @@ -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; diff --git a/dlls/winmm/message16.c b/dlls/winmm/message16.c index aa986a534de..3e3bbcc6e9f 100644 --- a/dlls/winmm/message16.c +++ b/dlls/winmm/message16.c @@ -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__); } diff --git a/include/mmsystem.h b/include/mmsystem.h index de0f98111f6..3ee92cf7b05 100644 --- a/include/mmsystem.h +++ b/include/mmsystem.h @@ -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)