Prepare dlls/{comctl32,gdi,msvideo,setupapi,shell32,twain,winmm} for

the conversion of HWND to a void*.
This commit is contained in:
Michael Stefaniuc 2002-09-06 19:41:17 +00:00 committed by Alexandre Julliard
parent d7922143dd
commit 025c0b716b
34 changed files with 126 additions and 103 deletions

View file

@ -385,7 +385,9 @@ static DWORD CALLBACK ANIMATE_AnimationThread(LPVOID ptr_)
hDC = GetDC(infoPtr->hWnd);
/* sometimes the animation window will be destroyed in between
* by the main program, so a ReleaseDC() error msg is possible */
infoPtr->hbrushBG = SendMessageA(GetParent(infoPtr->hWnd),WM_CTLCOLORSTATIC,hDC, infoPtr->hWnd);
infoPtr->hbrushBG = SendMessageA(GetParent(infoPtr->hWnd),
WM_CTLCOLORSTATIC, hDC,
(LPARAM)infoPtr->hWnd);
ReleaseDC(infoPtr->hWnd,hDC);
}
@ -814,7 +816,8 @@ static LRESULT ANIMATE_EraseBackground(HWND hWnd, WPARAM wParam, LPARAM lParam)
if(GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT)
{
hBrush = SendMessageA(GetParent(hWnd),WM_CTLCOLORSTATIC,(HDC)wParam, hWnd);
hBrush = SendMessageA(GetParent(hWnd),WM_CTLCOLORSTATIC,(HDC)wParam,
(LPARAM)hWnd);
}
GetClientRect(hWnd, &rect);
@ -871,7 +874,8 @@ static LRESULT WINAPI ANIMATE_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LP
if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT)
{
ANIMATE_INFO* infoPtr = ANIMATE_GetInfoPtr(hWnd);
infoPtr->hbrushBG = SendMessageA(GetParent(hWnd),WM_CTLCOLORSTATIC,(HDC)wParam, hWnd);
infoPtr->hbrushBG = SendMessageA(GetParent(hWnd), WM_CTLCOLORSTATIC,
(HDC)wParam, (LPARAM)hWnd);
}
return ANIMATE_DrawFrame(ANIMATE_GetInfoPtr(hWnd));
@ -890,7 +894,7 @@ static LRESULT WINAPI ANIMATE_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LP
if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT)
infoPtr->hbrushBG = SendMessageA(GetParent(hWnd), WM_CTLCOLORSTATIC,
(HDC)wParam, hWnd);
(HDC)wParam, (LPARAM)hWnd);
if (wParam)
{

View file

@ -459,7 +459,7 @@ static CBE_ITEMDATA * COMBOEX_FindItem(COMBOEX_INFO *infoPtr, INT index)
static inline BOOL COMBOEX_HasEdit(COMBOEX_INFO *infoPtr)
{
return infoPtr->hwndEdit;
return infoPtr->hwndEdit ? TRUE : FALSE;
}
@ -921,7 +921,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, LPCREATESTRUCTA cs)
infoPtr->unicode = IsWindowUnicode (hwnd);
i = SendMessageW(GetParent (hwnd), WM_NOTIFYFORMAT, hwnd, NF_QUERY);
i = SendMessageW(GetParent (hwnd), WM_NOTIFYFORMAT, (WPARAM)hwnd, NF_QUERY);
if ((i != NFR_ANSI) && (i != NFR_UNICODE)) {
WARN("wrong response to WM_NOTIFYFORMAT (%d), assuming ANSI\n", i);
i = NFR_ANSI;
@ -1571,7 +1571,7 @@ static LRESULT COMBOEX_NotifyFormat (COMBOEX_INFO *infoPtr, LPARAM lParam)
{
if (lParam == NF_REQUERY) {
INT i = SendMessageW(GetParent (infoPtr->hwndSelf),
WM_NOTIFYFORMAT, infoPtr->hwndSelf, NF_QUERY);
WM_NOTIFYFORMAT, (WPARAM)infoPtr->hwndSelf, NF_QUERY);
infoPtr->NtfUnicode = (i == NFR_UNICODE) ? 1 : 0;
}
return infoPtr->NtfUnicode ? NFR_UNICODE : NFR_ANSI;
@ -2057,7 +2057,7 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
SendMessageW ( GetParent(infoPtr->hwndSelf), WM_COMMAND,
MAKEWPARAM(GetDlgCtrlID (infoPtr->hwndSelf),
CBN_EDITCHANGE),
infoPtr->hwndSelf);
(LPARAM)infoPtr->hwndSelf);
return 0;
}
@ -2125,10 +2125,10 @@ COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return COMBOEX_DeleteItem (infoPtr, wParam);
case CBEM_GETCOMBOCONTROL:
return infoPtr->hwndCombo;
return (LRESULT)infoPtr->hwndCombo;
case CBEM_GETEDITCONTROL:
return infoPtr->hwndEdit;
return (LRESULT)infoPtr->hwndEdit;
case CBEM_GETEXTENDEDSTYLE:
return infoPtr->dwExtStyle;

View file

@ -2318,7 +2318,7 @@ DoNotify (LPNOTIFYDATA lpNotify, UINT uCode, LPNMHDR lpHdr)
if (!lpNotify->hwndTo)
return 0;
if (lpNotify->hwndFrom == -1) {
if (lpNotify->hwndFrom == (HWND)-1) {
lpNmh = lpHdr;
idFrom = lpHdr->idFrom;
}

View file

@ -559,7 +559,7 @@ CreateUpDownControl (DWORD style, INT x, INT y, INT cx, INT cy,
CreateWindowA (UPDOWN_CLASSA, 0, style, x, y, cx, cy,
parent, id, inst, 0);
if (hUD) {
SendMessageA (hUD, UDM_SETBUDDY, buddy, 0);
SendMessageA (hUD, UDM_SETBUDDY, (WPARAM)buddy, 0);
SendMessageA (hUD, UDM_SETRANGE, 0, MAKELONG(maxVal, minVal));
SendMessageA (hUD, UDM_SETPOS, 0, MAKELONG(curVal, 0));
}

View file

@ -200,7 +200,7 @@ DATETIME_GetMonthCal (HWND hwnd)
DATETIME_INFO *infoPtr = DATETIME_GetInfoPtr (hwnd);
TRACE("\n");
return infoPtr->hMonthCal;
return (LRESULT)infoPtr->hMonthCal;
}

View file

@ -4395,7 +4395,7 @@ static LRESULT LISTVIEW_DeleteItem(HWND hwnd, INT nItem)
static LRESULT LISTVIEW_GetEditControl(HWND hwnd)
{
LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
return infoPtr->hwndEdit;
return (LRESULT)infoPtr->hwndEdit;
}
@ -5221,7 +5221,7 @@ static LRESULT LISTVIEW_GetHeader(HWND hwnd)
{
LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
return infoPtr->hwndHeader;
return (LRESULT)infoPtr->hwndHeader;
}
/* LISTVIEW_GetHotCursor */
@ -7024,7 +7024,7 @@ static LRESULT LISTVIEW_InsertItemT(HWND hwnd, LPLVITEMW lpLVItem, BOOL isW)
member. See comments for LISTVIEW_InsertCompare() for greater detail */
nItem = DPA_InsertPtr( infoPtr->hdpaItems,
GETITEMCOUNT( infoPtr ) + 1, hdpaSubItems );
DPA_Sort( infoPtr->hdpaItems, LISTVIEW_InsertCompare, hwnd );
DPA_Sort( infoPtr->hdpaItems, LISTVIEW_InsertCompare, (LPARAM)hwnd );
nItem = DPA_GetPtrIndex( infoPtr->hdpaItems, hdpaSubItems );
}
else
@ -8135,7 +8135,7 @@ static LRESULT LISTVIEW_SortItems(HWND hwnd, PFNLVCOMPARE pfnCompare, LPARAM lPa
infoPtr->pfnCompare = pfnCompare;
infoPtr->lParamSort = lParamSort;
DPA_Sort(infoPtr->hdpaItems, LISTVIEW_CallBackCompare, hwnd);
DPA_Sort(infoPtr->hdpaItems, LISTVIEW_CallBackCompare, (LPARAM)hwnd);
/* Adjust selections and indices so that they are the way they should
* be after the sort (otherwise, the list items move around, but
@ -9737,10 +9737,10 @@ static LRESULT WINAPI LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
return LISTVIEW_DeleteItem(hwnd, (INT)wParam);
case LVM_EDITLABELW:
return LISTVIEW_EditLabelT(hwnd, (INT)wParam, TRUE);
return (LRESULT)LISTVIEW_EditLabelT(hwnd, (INT)wParam, TRUE);
case LVM_EDITLABELA:
return LISTVIEW_EditLabelT(hwnd, (INT)wParam, FALSE);
return (LRESULT)LISTVIEW_EditLabelT(hwnd, (INT)wParam, FALSE);
case LVM_ENSUREVISIBLE:
return LISTVIEW_EnsureVisible(hwnd, (INT)wParam, (BOOL)lParam);

View file

@ -583,7 +583,7 @@ BOOL PROPSHEET_CreateDialog(PropSheetInfo* psInfo)
(LPDLGTEMPLATEW) temp,
psInfo->ppshheader.hwndParent,
(DLGPROC) PROPSHEET_DialogProc,
(LPARAM)psInfo);
(LPARAM)psInfo) ? TRUE : FALSE;
COMCTL32_Free(temp);
@ -2668,7 +2668,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (psInfo->activeValid && psInfo->active_page != -1)
hwndPage = psInfo->proppage[psInfo->active_page].hwndPage;
SetWindowLongW(hwnd, DWL_MSGRESULT, hwndPage);
SetWindowLongW(hwnd, DWL_MSGRESULT, (LONG)hwndPage);
return TRUE;
}
@ -2685,7 +2685,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
HWND hwndTabCtrl = GetDlgItem(hwnd, IDC_TABCONTROL);
SetWindowLongW(hwnd, DWL_MSGRESULT, hwndTabCtrl);
SetWindowLongW(hwnd, DWL_MSGRESULT, (LONG)hwndTabCtrl);
return TRUE;
}

View file

@ -2915,7 +2915,7 @@ REBAR_GetTextColor (REBAR_INFO *infoPtr)
inline static LRESULT
REBAR_GetToolTips (REBAR_INFO *infoPtr)
{
return infoPtr->hwndToolTip;
return (LRESULT)infoPtr->hwndToolTip;
}
@ -3878,7 +3878,7 @@ REBAR_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* issue WM_NOTIFYFORMAT to get unicode status of parent */
i = SendMessageA(REBAR_GetNotifyParent (infoPtr),
WM_NOTIFYFORMAT, hwnd, NF_QUERY);
WM_NOTIFYFORMAT, (WPARAM)hwnd, NF_QUERY);
if ((i < NFR_ANSI) || (i > NFR_UNICODE)) {
ERR("wrong response to WM_NOTIFYFORMAT (%d), assuming ANSI\n",
i);
@ -4001,7 +4001,7 @@ REBAR_NotifyFormat (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
if (lParam == NF_REQUERY) {
i = SendMessageA(REBAR_GetNotifyParent (infoPtr),
WM_NOTIFYFORMAT, infoPtr->hwndSelf, NF_QUERY);
WM_NOTIFYFORMAT, (WPARAM)infoPtr->hwndSelf, NF_QUERY);
if ((i < NFR_ANSI) || (i > NFR_UNICODE)) {
ERR("wrong response to WM_NOTIFYFORMAT (%d), assuming ANSI\n",
i);

View file

@ -813,7 +813,7 @@ STATUSBAR_WMCreate (HWND hwnd, LPCREATESTRUCTA lpCreate)
infoPtr->clrBk = CLR_DEFAULT;
infoPtr->hFont = 0;
i = SendMessageW(GetParent (hwnd), WM_NOTIFYFORMAT, hwnd, NF_QUERY);
i = SendMessageW(GetParent (hwnd), WM_NOTIFYFORMAT, (WPARAM)hwnd, NF_QUERY);
infoPtr->NtfUnicode = (i == NFR_UNICODE);
GetClientRect (hwnd, &rect);
@ -1067,7 +1067,7 @@ static LRESULT
STATUSBAR_NotifyFormat (STATUSWINDOWINFO *infoPtr, HWND from, INT cmd)
{
if (cmd == NF_REQUERY) {
INT i = SendMessageW(from, WM_NOTIFYFORMAT, infoPtr->Self, NF_QUERY);
INT i = SendMessageW(from, WM_NOTIFYFORMAT, (WPARAM)infoPtr->Self, NF_QUERY);
infoPtr->NtfUnicode = (i == NFR_UNICODE);
}
return infoPtr->NtfUnicode ? NFR_UNICODE : NFR_ANSI;

View file

@ -199,7 +199,7 @@ TAB_GetToolTips (HWND hwnd, WPARAM wParam, LPARAM lParam)
TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
if (infoPtr == NULL) return 0;
return infoPtr->hwndToolTip;
return (LRESULT)infoPtr->hwndToolTip;
}
static LRESULT
@ -499,7 +499,7 @@ static LRESULT TAB_FocusChanging(
return DefWindowProcA (hwnd, uMsg, wParam, lParam);
}
static HWND TAB_InternalHitTest (
static INT TAB_InternalHitTest (
HWND hwnd,
TAB_INFO* infoPtr,
POINT pt,
@ -507,7 +507,7 @@ static HWND TAB_InternalHitTest (
{
RECT rect;
int iCount;
INT iCount;
for (iCount = 0; iCount < infoPtr->uNumItem; iCount++)
{

View file

@ -3274,7 +3274,7 @@ TOOLBAR_GetToolTips (HWND hwnd, WPARAM wParam, LPARAM lParam)
if (infoPtr == NULL)
return 0;
return infoPtr->hwndToolTip;
return (LRESULT)infoPtr->hwndToolTip;
}
@ -4239,7 +4239,7 @@ TOOLBAR_SetParent (HWND hwnd, WPARAM wParam, LPARAM lParam)
hwndOldNotify = infoPtr->hwndNotify;
infoPtr->hwndNotify = (HWND)wParam;
return hwndOldNotify;
return (LRESULT)hwndOldNotify;
}
@ -5285,7 +5285,7 @@ TOOLBAR_NotifyFormat(TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
if (lParam == NF_REQUERY) {
i = SendMessageA(GetParent(infoPtr->hwndSelf),
WM_NOTIFYFORMAT, infoPtr->hwndSelf, NF_QUERY);
WM_NOTIFYFORMAT, (WPARAM)infoPtr->hwndSelf, NF_QUERY);
if ((i < NFR_ANSI) || (i > NFR_UNICODE)) {
ERR("wrong response to WM_NOTIFYFORMAT (%d), assuming ANSI\n",
i);

View file

@ -632,7 +632,7 @@ TOOLTIPS_CheckTool (HWND hwnd, BOOL bShowTest)
INT nTool;
GetCursorPos (&pt);
hwndTool = SendMessageA (hwnd, TTM_WINDOWFROMPOINT, 0, (LPARAM)&pt);
hwndTool = (HWND)SendMessageA (hwnd, TTM_WINDOWFROMPOINT, 0, (LPARAM)&pt);
if (hwndTool == 0)
return -1;
@ -1974,7 +1974,7 @@ TOOLTIPS_UpdateTipTextW (HWND hwnd, WPARAM wParam, LPARAM lParam)
static LRESULT
TOOLTIPS_WindowFromPoint (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
return WindowFromPoint (*((LPPOINT)lParam));
return (LRESULT)WindowFromPoint (*((LPPOINT)lParam));
}

View file

@ -1603,7 +1603,7 @@ static LRESULT
TREEVIEW_GetToolTips(TREEVIEW_INFO *infoPtr)
{
TRACE("\n");
return infoPtr->hwndToolTip;
return (LRESULT)infoPtr->hwndToolTip;
}
static LRESULT
@ -1615,7 +1615,7 @@ TREEVIEW_SetToolTips(TREEVIEW_INFO *infoPtr, HWND hwndTT)
prevToolTip = infoPtr->hwndToolTip;
infoPtr->hwndToolTip = hwndTT;
return prevToolTip;
return (LRESULT)prevToolTip;
}
@ -3382,7 +3382,7 @@ TREEVIEW_HitTest(TREEVIEW_INFO *infoPtr, LPTVHITTESTINFO lpht)
static LRESULT
TREEVIEW_GetEditControl(TREEVIEW_INFO *infoPtr)
{
return infoPtr->hwndEdit;
return (LRESULT)infoPtr->hwndEdit;
}
static LRESULT CALLBACK
@ -5029,7 +5029,7 @@ TREEVIEW_NotifyFormat (TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
if (lParam == NF_REQUERY) {
i = SendMessageA(GetParent (infoPtr->hwnd),
WM_NOTIFYFORMAT, infoPtr->hwnd, NF_QUERY);
WM_NOTIFYFORMAT, (WPARAM)infoPtr->hwnd, NF_QUERY);
if ((i < NFR_ANSI) || (i > NFR_UNICODE)) {
ERR("wrong response to WM_NOTIFYFORMAT (%d), assuming ANSI\n",
i);
@ -5146,7 +5146,7 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TREEVIEW_DeleteItem(infoPtr, (HTREEITEM)lParam);
case TVM_EDITLABELA:
return TREEVIEW_EditLabelA(infoPtr, (HTREEITEM)lParam);
return (LRESULT)TREEVIEW_EditLabelA(infoPtr, (HTREEITEM)lParam);
case TVM_EDITLABELW:
FIXME("Unimplemented msg TVM_EDITLABELW\n");

View file

@ -569,7 +569,8 @@ static void UPDOWN_DoAction (UPDOWN_INFO *infoPtr, int delta, int action)
/* Also, notify it. This message is sent in any case. */
SendMessageW( GetParent(infoPtr->Self),
dwStyle & UDS_HORZ ? WM_HSCROLL : WM_VSCROLL,
MAKELONG(SB_THUMBPOSITION, infoPtr->CurVal), infoPtr->Self);
MAKELONG(SB_THUMBPOSITION, infoPtr->CurVal),
(LPARAM)infoPtr->Self);
}
/***********************************************************************
@ -791,7 +792,8 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam,
SendMessageW( GetParent(hwnd),
dwStyle & UDS_HORZ ? WM_HSCROLL : WM_VSCROLL,
MAKELONG(SB_ENDSCROLL, infoPtr->CurVal), hwnd);
MAKELONG(SB_ENDSCROLL, infoPtr->CurVal),
(LPARAM)hwnd);
if (UPDOWN_IsBuddyEdit(infoPtr))
SendMessageW(infoPtr->Buddy, EM_SETSEL, 0, MAKELONG(0, -1));
}
@ -857,12 +859,12 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam,
case UDM_GETBUDDY:
if (wParam || lParam) UNKNOWN_PARAM(UDM_GETBUDDY, wParam, lParam);
return infoPtr->Buddy;
return (LRESULT)infoPtr->Buddy;
case UDM_SETBUDDY:
if (lParam) UNKNOWN_PARAM(UDM_SETBUDDY, wParam, lParam);
temp = infoPtr->Buddy;
UPDOWN_SetBuddy (infoPtr, wParam);
temp = (int)infoPtr->Buddy;
UPDOWN_SetBuddy (infoPtr, (HWND)wParam);
return temp;
case UDM_GETPOS:

View file

@ -63,6 +63,8 @@ extern LONG CALLBACK PRTDRV_CallTo16_long_llwll (FARPROC16,LONG,LONG,WORD,LONG,
/* ### stop build ### */
#define HWND_16(h32) (LOWORD(h32))
#define MAX_PRINTER_DRIVERS 16
static LOADED_PRINTER_DRIVER *gapLoadedPrinterDrivers[MAX_PRINTER_DRIVERS];
@ -775,7 +777,8 @@ INT WIN16DRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput,
lpSegProfile = MapLS(lpszProfile);
lpSegOut = MapLS(lpdmOutput);
lpSegIn = MapLS(lpdmInput);
wRet = PRTDRV_CallTo16_word_wwlllllw( pLPD->fn[FUNC_EXTDEVICEMODE], hwnd, pLPD->hInst,
wRet = PRTDRV_CallTo16_word_wwlllllw( pLPD->fn[FUNC_EXTDEVICEMODE],
HWND_16(hwnd), pLPD->hInst,
lpSegOut, lpSegDevice, lpSegPort, lpSegIn,
lpSegProfile, dwMode );
UnMapLS(lpSegOut);

View file

@ -47,6 +47,7 @@ void MSVIDEO_UnmapMsg16To32(UINT msg, LPVOID lpv, LPDWORD lParam1, LPDWORD lPara
LRESULT MSVIDEO_SendMessage(HIC hic, UINT msg, DWORD lParam1, DWORD lParam2, BOOL bFrom32);
#define HDRVR_16(h32) (LOWORD(h32))
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
/***********************************************************************
@ -673,7 +674,7 @@ LPVOID MSVIDEO_MapMsg16To32(UINT msg, LPDWORD lParam1, LPDWORD lParam2) {
COPY(icdb,dwFlags);
icdb->hpal = HPALETTE_32(icdb16->hpal);
COPY(icdb,hwnd);
icdb->hwnd = HWND_32(icdb16->hwnd);
COPY(icdb,hdc);
COPY(icdb,xDst);
COPY(icdb,yDst);

View file

@ -955,7 +955,7 @@ BOOL WINAPI SetupCommitFileQueueW( HWND owner, HSPFILEQ handle, PSP_FILE_CALLBAC
if (!queue->copy_queue.count && !queue->delete_queue.count && !queue->rename_queue.count)
return TRUE; /* nothing to do */
if (!handler( context, SPFILENOTIFY_STARTQUEUE, owner, 0 )) return FALSE;
if (!handler( context, SPFILENOTIFY_STARTQUEUE, (UINT)owner, 0 )) return FALSE;
/* perform deletes */

View file

@ -69,6 +69,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(setupapi);
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
/***********************************************************************
* SURegOpenKey (SETUPX.47)
*/
@ -202,7 +204,7 @@ RETERR16 WINAPI InstallHinfSection16( HWND16 hwnd, HINSTANCE16 hinst, LPCSTR lps
break;
case HOW_ALWAYS_PROMPT_REBOOT:
case HOW_PROMPT_REBOOT:
if (MessageBoxA(hwnd, "You must restart Wine before the new settings will take effect.\n\nDo you want to exit Wine now ?", "Systems Settings Change", MB_YESNO|MB_ICONQUESTION) == IDYES)
if (MessageBoxA(HWND_32(hwnd), "You must restart Wine before the new settings will take effect.\n\nDo you want to exit Wine now ?", "Systems Settings Change", MB_YESNO|MB_ICONQUESTION) == IDYES)
reboot = TRUE;
break;
default:

View file

@ -114,7 +114,7 @@ BOOL WINAPI SHELL_DllEntryPoint(DWORD Reason, HINSTANCE16 hInst,
*/
void WINAPI DragAcceptFiles16(HWND16 hWnd, BOOL16 b)
{
DragAcceptFiles(hWnd, b);
DragAcceptFiles(HWND_32(hWnd), b);
}
/*************************************************************************
@ -198,7 +198,7 @@ HINSTANCE16 WINAPI FindExecutable16( LPCSTR lpFile, LPCSTR lpDirectory,
*/
BOOL16 WINAPI AboutDlgProc16( HWND16 hWnd, UINT16 msg, WPARAM16 wParam,
LPARAM lParam )
{ return AboutDlgProc( hWnd, msg, wParam, lParam );
{ return AboutDlgProc( HWND_32(hWnd), msg, wParam, lParam );
}
@ -207,7 +207,7 @@ BOOL16 WINAPI AboutDlgProc16( HWND16 hWnd, UINT16 msg, WPARAM16 wParam,
*/
BOOL16 WINAPI ShellAbout16( HWND16 hWnd, LPCSTR szApp, LPCSTR szOtherStuff,
HICON16 hIcon )
{ return ShellAboutA( hWnd, szApp, szOtherStuff, hIcon );
{ return ShellAboutA( HWND_32(hWnd), szApp, szOtherStuff, hIcon );
}
/*************************************************************************
@ -495,7 +495,7 @@ LRESULT WINAPI ShellHookProc16(INT16 code, WPARAM16 wParam, LPARAM lParam)
case HSHELL_WINDOWDESTROYED: uMsg = uMsgWndDestroyed; break;
case HSHELL_ACTIVATESHELLWINDOW: uMsg = uMsgShellActivate;
}
PostMessageA( SHELL_hWnd, uMsg, wParam, 0 );
PostMessageA( HWND_32(SHELL_hWnd), uMsg, wParam, 0 );
}
return CallNextHookEx16( SHELL_hHook, code, wParam, lParam );
}

View file

@ -759,7 +759,7 @@ BOOL WINAPI AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
break;
case WM_DROPOBJECT:
if( wParam == hWnd )
if( wParam == (WPARAM)hWnd )
{ LPDRAGINFO16 lpDragInfo = MapSL((SEGPTR)lParam);
if( lpDragInfo && lpDragInfo->wFlags == DRAGOBJ_DATA && lpDragInfo->hList )
{ char* pstr = (char*)GlobalLock16( (HGLOBAL16)(lpDragInfo->hList) );

View file

@ -196,4 +196,7 @@ inline static void __SHCloneStrWtoA(char ** target, const WCHAR * source)
WideCharToMultiByte(CP_ACP, 0, source, -1, *target, len, NULL, NULL);
}
/* handle conversions */
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
#endif

View file

@ -680,7 +680,7 @@ HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation,
sei.cbSize = sizeof(sei);
sei.fMask = 0;
sei.hwnd = hWnd;
sei.hwnd = HWND_32(hWnd);
sei.lpVerb = lpOperation;
sei.lpFile = lpFile;
sei.lpParameters = lpParameters;

View file

@ -364,7 +364,7 @@ TW_UINT16 TWAIN_OpenDSM (pTW_IDENTITY pOrigin, TW_MEMREF pData)
DSM_currentDevice = 0;
DSM_sourceId = 0;
}
DSM_parentHWND = *(HWND*)pData;
DSM_parentHWND = *(TW_HANDLE*)pData;
DSM_currentState = 3; /* transition to state 3 */
DSM_twCC = TWCC_SUCCESS;
twRC = TWRC_SUCCESS;
@ -392,4 +392,3 @@ TW_UINT16 TWAIN_GetDSMStatus (pTW_IDENTITY pOrigin, TW_MEMREF pData)
return TWRC_SUCCESS;
}

View file

@ -47,7 +47,7 @@ typedef struct tagActiveDS
TW_UINT16 DSM_initialized; /* whether Source Manager is initialized */
TW_UINT16 DSM_currentState; /* current state of Source Manager */
TW_UINT16 DSM_twCC; /* current condition code of Source Manager */
TW_INT32 DSM_parentHWND; /* window handle of the Source's "parent" */
TW_HANDLE DSM_parentHWND; /* window handle of the Source's "parent" */
TW_UINT32 DSM_sourceId; /* source id generator */
TW_UINT16 DSM_currentDevice; /* keep track of device during enumeration */
#ifdef HAVE_SANE

View file

@ -1090,7 +1090,7 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpwstrCommand, LPSTR lpstrRet,
DWORD WINAPI mciSendString16(LPCSTR lpstrCommand, LPSTR lpstrRet,
UINT16 uRetLen, HWND16 hwndCallback)
{
return mciSendStringA(lpstrCommand, lpstrRet, uRetLen, hwndCallback);
return mciSendStringA(lpstrCommand, lpstrRet, uRetLen, HWND_32(hwndCallback));
}
/**************************************************************************
@ -1284,7 +1284,7 @@ static MCI_MapType MCI_MapMsg16To32A(WORD uDevType, WORD wMsg, DWORD* lParam)
if (mbp32) {
mbp32->dwCallback = mbp16->dwCallback;
mbp32->nVirtKey = mbp16->nVirtKey;
mbp32->hwndBreak = mbp16->hwndBreak;
mbp32->hwndBreak = HWND_32(mbp16->hwndBreak);
} else {
return MCI_MAP_NOMEM;
}

View file

@ -33,6 +33,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(mcianim);
#define ANIMFRAMES_PERMIN 1800
#define SECONDS_PERMIN 60
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
typedef struct {
UINT16 wDevID;
int nUseCount; /* Incremented for each shared open */
@ -402,7 +404,7 @@ static DWORD MCIANIM_mciStatus(UINT16 wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS
if (dwFlags & MCI_NOTIFY) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wma->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
if (dwFlags & MCI_STATUS_ITEM) {
@ -502,7 +504,7 @@ static DWORD MCIANIM_mciPlay(UINT16 wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpPa
if (dwFlags & MCI_NOTIFY) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n",
lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wma->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return 0;
@ -524,7 +526,7 @@ static DWORD MCIANIM_mciStop(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS l
if (dwFlags & MCI_NOTIFY) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wma->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return 0;
@ -543,7 +545,7 @@ static DWORD MCIANIM_mciPause(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS
if (dwFlags & MCI_NOTIFY) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND16)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wma->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return 0;
@ -562,7 +564,7 @@ static DWORD MCIANIM_mciResume(UINT16 wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS
if (dwFlags & MCI_NOTIFY) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wma->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return 0;
@ -598,7 +600,7 @@ static DWORD MCIANIM_mciSeek(UINT16 wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpPa
if (dwFlags & MCI_NOTIFY) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wma->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return dwRet;
@ -642,7 +644,7 @@ static DWORD MCIANIM_mciSet(UINT16 wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParm
if (dwFlags & MCI_SET_OFF) return MCIERR_UNSUPPORTED_FUNCTION;
if (dwFlags & MCI_NOTIFY) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wma->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return 0;

View file

@ -401,7 +401,7 @@ DWORD MCIAVI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMSA lpPar
TRACE("MCI_DGV_STATUS_HPAL => %lx\n", lpParms->dwReturn);
break;
case MCI_DGV_STATUS_HWND:
lpParms->dwReturn = wma->hWnd;
lpParms->dwReturn = (DWORD)wma->hWnd;
TRACE("MCI_DGV_STATUS_HWND => %u\n", wma->hWnd);
break;
#if 0
@ -444,11 +444,9 @@ DWORD MCIAVI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_DGV_STATUS_PARMSA lpPar
}
if (dwFlags & MCI_NOTIFY) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wma->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return ret;
}

View file

@ -324,7 +324,7 @@ static DWORD MCIAVI_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpP
MCIAVI_CleanUp(wma);
if ((dwFlags & MCI_NOTIFY) && lpParms) {
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wma->openParms.wDeviceID,
MCI_NOTIFY_SUCCESSFUL);
}
@ -444,7 +444,7 @@ cleanUp:
if (lpParms && (dwFlags & MCI_NOTIFY)) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wma->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
@ -501,7 +501,7 @@ static DWORD MCIAVI_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPa
}
if ((dwFlags & MCI_NOTIFY) && lpParms) {
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wma->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
@ -572,7 +572,7 @@ static DWORD MCIAVI_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms
TRACE("Seeking to frame=%lu bytes\n", wma->dwCurrVideoFrame);
if (dwFlags & MCI_NOTIFY) {
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wma->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
@ -1009,5 +1009,3 @@ LONG CALLBACK MCIAVI_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
}
return MCIERR_UNRECOGNIZED_COMMAND;
}

View file

@ -100,3 +100,6 @@ BOOL MCIAVI_CreateWindow(WINE_MCIAVI* wma, DWORD dwFlags, LPMCI_DGV_OPEN_PARM
DWORD MCIAVI_mciPut(UINT wDevID, DWORD dwFlags, LPMCI_DGV_PUT_PARMS lpParms);
DWORD MCIAVI_mciWhere(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms);
DWORD MCIAVI_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMSA lpParms);
/* handle conversions */
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))

View file

@ -42,6 +42,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(mcicda);
#define FRAME_OF_ADDR(a) ((a)[1] * CDFRAMES_PERMIN + (a)[2] * CDFRAMES_PERSEC + (a)[3])
#define FRAME_OF_TOC(toc, idx) FRAME_OF_ADDR((toc).TrackData[idx - (toc).FirstTrack].Address)
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
typedef struct {
UINT wDevID;
int nUseCount; /* Incremented for each shared open */
@ -528,7 +530,7 @@ static DWORD MCICDA_Status(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParm
if (dwFlags & MCI_NOTIFY) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
if (dwFlags & MCI_STATUS_ITEM) {
@ -732,7 +734,7 @@ static DWORD MCICDA_Play(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
} else if (dwFlags & MCI_NOTIFY) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
/*
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
*/
}
@ -756,7 +758,7 @@ static DWORD MCICDA_Stop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms
if (lpParms && (dwFlags & MCI_NOTIFY)) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return 0;
@ -779,7 +781,7 @@ static DWORD MCICDA_Pause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParm
if (lpParms && (dwFlags & MCI_NOTIFY)) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return 0;
@ -802,7 +804,7 @@ static DWORD MCICDA_Resume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPar
if (lpParms && (dwFlags & MCI_NOTIFY)) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return 0;
@ -861,7 +863,7 @@ static DWORD MCICDA_Seek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
if (dwFlags & MCI_NOTIFY) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return 0;
@ -934,7 +936,7 @@ static DWORD MCICDA_Set(UINT wDevID, DWORD dwFlags, LPMCI_SET_PARMS lpParms)
if (dwFlags & MCI_NOTIFY) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n",
lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmcda->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return 0;

View file

@ -42,6 +42,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(mcimidi);
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
#define MIDI_NOTEOFF 0x80
#define MIDI_NOTEON 0x90
@ -830,7 +832,7 @@ static DWORD MIDI_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParm
if (lpParms && (dwFlags & MCI_NOTIFY)) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return 0;
@ -869,7 +871,7 @@ static DWORD MIDI_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPar
if (lpParms && (dwFlags & MCI_NOTIFY)) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return 0;
@ -1171,7 +1173,7 @@ static DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
if (lpParms && (dwFlags & MCI_NOTIFY)) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
@ -1234,7 +1236,7 @@ static DWORD MIDI_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpPar
wmm->dwStatus = MCI_MODE_STOP;
if (lpParms && (dwFlags & MCI_NOTIFY)) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return 0;
@ -1260,7 +1262,7 @@ static DWORD MIDI_mciPause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPar
}
if (lpParms && (dwFlags & MCI_NOTIFY)) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
@ -1284,7 +1286,7 @@ static DWORD MIDI_mciResume(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPa
}
if (lpParms && (dwFlags & MCI_NOTIFY)) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return 0;
@ -1478,7 +1480,7 @@ static DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpPar
}
if (dwFlags & MCI_NOTIFY) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return ret;
@ -1635,7 +1637,7 @@ static DWORD MIDI_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
if (dwFlags & MCI_NOTIFY) {
TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
}

View file

@ -32,6 +32,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(mciwave);
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
typedef struct {
UINT wDevID;
HANDLE hWave;
@ -577,7 +579,7 @@ static DWORD WAVE_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParm
wmw->dwStatus = MCI_MODE_STOP;
if ((dwFlags & MCI_NOTIFY) && lpParms) {
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmw->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
@ -623,7 +625,7 @@ static DWORD WAVE_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpPar
wmw->lpWaveFormat = NULL;
if ((dwFlags & MCI_NOTIFY) && lpParms) {
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmw->openParms.wDeviceID,
(dwRet == 0) ? MCI_NOTIFY_SUCCESSFUL : MCI_NOTIFY_FAILURE);
}
@ -850,7 +852,7 @@ cleanUp:
CloseHandle(wmw->hEvent);
if (lpParms && (dwFlags & MCI_NOTIFY)) {
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmw->openParms.wDeviceID,
dwRet ? MCI_NOTIFY_FAILURE : MCI_NOTIFY_SUCCESSFUL);
}
@ -1076,7 +1078,7 @@ cleanUp:
}
if (lpParms && (dwFlags & MCI_NOTIFY)) {
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmw->openParms.wDeviceID,
dwRet ? MCI_NOTIFY_FAILURE : MCI_NOTIFY_SUCCESSFUL);
}
@ -1162,7 +1164,7 @@ static DWORD WAVE_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParms)
TRACE("Seeking to position=%lu bytes\n", wmw->dwPosition);
if (dwFlags & MCI_NOTIFY) {
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmw->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
}
@ -1308,7 +1310,7 @@ static DWORD WAVE_mciSave(UINT wDevID, DWORD dwFlags, LPMCI_SAVE_PARMS lpParms)
if (dwFlags & MCI_NOTIFY) {
if (ret == ERROR_SUCCESS) wparam = MCI_NOTIFY_SUCCESSFUL;
mciDriverNotify( (HWND) LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmw->openParms.wDeviceID, wparam);
}
@ -1455,7 +1457,7 @@ static DWORD WAVE_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpPar
}
}
if (dwFlags & MCI_NOTIFY) {
mciDriverNotify((HWND)LOWORD(lpParms->dwCallback),
mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
wmw->openParms.wDeviceID, MCI_NOTIFY_SUCCESSFUL);
}
return ret;

View file

@ -1688,7 +1688,7 @@ BOOL16 WINAPI mciDriverNotify16(HWND16 hWndCallBack, UINT16 wDevID, UINT16 wStat
{
TRACE("(%04X, %04x, %04X)\n", hWndCallBack, wDevID, wStatus);
return PostMessageA(hWndCallBack, MM_MCINOTIFY, wStatus, wDevID);
return PostMessageA(HWND_32(hWndCallBack), MM_MCINOTIFY, wStatus, wDevID);
}
/**************************************************************************
@ -1840,15 +1840,15 @@ UINT WINAPI MCI_DefYieldProc(MCIDEVICEID wDevID, DWORD data)
TRACE("(0x%04x, 0x%08lx)\n", wDevID, data);
if ((HIWORD(data) != 0 && GetActiveWindow() != HIWORD(data)) ||
if ((HIWORD(data) != 0 && HWND_16(GetActiveWindow()) != HIWORD(data)) ||
(GetAsyncKeyState(LOWORD(data)) & 1) == 0) {
UserYield16();
ret = 0;
} else {
MSG msg;
msg.hwnd = HIWORD(data);
while (!PeekMessageA(&msg, HIWORD(data), WM_KEYFIRST, WM_KEYLAST, PM_REMOVE));
msg.hwnd = HWND_32(HIWORD(data));
while (!PeekMessageA(&msg, msg.hwnd, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE));
ret = -1;
}
return ret;

View file

@ -239,6 +239,7 @@ void TIME_MMTimeStop(void);
#define HWAVE_32(h16) ((HWAVE)(ULONG_PTR)(h16))
#define HWAVEIN_32(h16) ((HWAVEIN)(ULONG_PTR)(h16))
#define HWAVEOUT_32(h16) ((HWAVEOUT)(ULONG_PTR)(h16))
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
/* HANDLE -> HANDLE16 conversions */
#define HDRVR_16(h32) (LOWORD(h32))
@ -252,3 +253,4 @@ void TIME_MMTimeStop(void);
#define HWAVE_16(h32) (LOWORD(h32))
#define HWAVEIN_16(h32) (LOWORD(h32))
#define HWAVEOUT_16(h32) (LOWORD(h32))
#define HWND_16(h32) (LOWORD(h32))