Commit 8eb6b8bc authored by Damjan Jovanovic's avatar Damjan Jovanovic Committed by Alexandre Julliard

mmsystem.dll16: Fix mapping of MCI_WINDOW structures between 16 and 32 bit.

parent 0f9370ae
...@@ -193,12 +193,21 @@ static MMSYSTEM_MapType MCI_MapMsg16To32W(WORD wMsg, DWORD dwFlags, DWORD_PTR* l ...@@ -193,12 +193,21 @@ static MMSYSTEM_MapType MCI_MapMsg16To32W(WORD wMsg, DWORD dwFlags, DWORD_PTR* l
} }
return MMSYSTEM_MAP_OKMEM; return MMSYSTEM_MAP_OKMEM;
case MCI_WINDOW: case MCI_WINDOW:
/* in fact, I would also need the dwFlags... to see {
* which members of lParam are effectively used LPMCI_OVLY_WINDOW_PARMSW mowp32w = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MCI_OVLY_WINDOW_PARMSW));
*/ LPMCI_OVLY_WINDOW_PARMS16 mowp16 = MapSL(*lParam);
*lParam = (DWORD)MapSL(*lParam); if (mowp32w) {
FIXME("Current mapping may be wrong\n"); mowp32w->dwCallback = mowp16->dwCallback;
break; mowp32w->hWnd = HWND_32(mowp16->hWnd);
mowp32w->nCmdShow = mowp16->nCmdShow;
if (dwFlags & (MCI_DGV_WINDOW_TEXT | MCI_OVLY_WINDOW_TEXT))
mowp32w->lpstrText = MCI_strdupAtoW(MapSL(mowp16->lpstrText));
} else {
return MMSYSTEM_MAP_NOMEM;
}
*lParam = (DWORD)mowp32w;
}
return MMSYSTEM_MAP_OKMEM;
case MCI_BREAK: case MCI_BREAK:
{ {
LPMCI_BREAK_PARMS mbp32 = HeapAlloc(GetProcessHeap(), 0, sizeof(MCI_BREAK_PARMS)); LPMCI_BREAK_PARMS mbp32 = HeapAlloc(GetProcessHeap(), 0, sizeof(MCI_BREAK_PARMS));
...@@ -399,7 +408,11 @@ static MMSYSTEM_MapType MCI_UnMapMsg16To32W(WORD wMsg, DWORD dwFlags, DWORD_PTR ...@@ -399,7 +408,11 @@ static MMSYSTEM_MapType MCI_UnMapMsg16To32W(WORD wMsg, DWORD dwFlags, DWORD_PTR
} }
return MMSYSTEM_MAP_OK; return MMSYSTEM_MAP_OK;
case MCI_WINDOW: case MCI_WINDOW:
/* FIXME ?? see Map function */ if (lParam) {
LPMCI_OVLY_WINDOW_PARMSW mowp32w = (LPMCI_OVLY_WINDOW_PARMSW)lParam;
HeapFree(GetProcessHeap(), 0, (LPVOID)mowp32w->lpstrText);
HeapFree(GetProcessHeap(), 0, mowp32w);
}
return MMSYSTEM_MAP_OK; return MMSYSTEM_MAP_OK;
case MCI_BREAK: case MCI_BREAK:
......
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