diff --git a/dlls/msvideo/Makefile.in b/dlls/msvideo/Makefile.in index 6108b730cbc..c133a37435a 100644 --- a/dlls/msvideo/Makefile.in +++ b/dlls/msvideo/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_STRICT TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ diff --git a/dlls/msvideo/drawdib.c b/dlls/msvideo/drawdib.c index 32e5c47ba75..d8d0ca70d8e 100644 --- a/dlls/msvideo/drawdib.c +++ b/dlls/msvideo/drawdib.c @@ -66,8 +66,8 @@ HDRAWDIB VFWAPI DrawDibOpen(void) { HDRAWDIB hdd; TRACE("(void)\n"); - hdd = GlobalAlloc16(GHND,sizeof(WINE_HDD)); - TRACE("=> %d\n",hdd); + hdd = HDRAWDIB_32(GlobalAlloc16(GHND,sizeof(WINE_HDD))); + TRACE("=> %p\n",hdd); return hdd; } @@ -75,9 +75,9 @@ HDRAWDIB VFWAPI DrawDibOpen(void) { * DrawDibClose [MSVFW32.@] */ BOOL VFWAPI DrawDibClose(HDRAWDIB hdd) { - WINE_HDD *whdd = GlobalLock16(hdd); + WINE_HDD *whdd = GlobalLock16(HDRAWDIB_16(hdd)); - TRACE("(0x%08lx)\n",(DWORD)hdd); + TRACE("(%p)\n",hdd); if (!whdd) return FALSE; @@ -85,8 +85,8 @@ BOOL VFWAPI DrawDibClose(HDRAWDIB hdd) { if (whdd->begun) DrawDibEnd(hdd); - GlobalUnlock16(hdd); - GlobalFree16(hdd); + GlobalUnlock16(HDRAWDIB_16(hdd)); + GlobalFree16(HDRAWDIB_16(hdd)); return TRUE; } @@ -95,9 +95,9 @@ BOOL VFWAPI DrawDibClose(HDRAWDIB hdd) { */ BOOL VFWAPI DrawDibEnd(HDRAWDIB hdd) { BOOL ret = TRUE; - WINE_HDD *whdd = GlobalLock16(hdd); + WINE_HDD *whdd = GlobalLock16(HDRAWDIB_16(hdd)); - TRACE("(0x%08lx)\n",(DWORD)hdd); + TRACE("(%p)\n",hdd); whdd->hpal = 0; /* Do not free this */ whdd->hdc = 0; @@ -130,7 +130,7 @@ BOOL VFWAPI DrawDibEnd(HDRAWDIB hdd) { whdd->lpvbits = NULL; - GlobalUnlock16(hdd); + GlobalUnlock16(HDRAWDIB_16(hdd)); return ret; } @@ -148,8 +148,8 @@ BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd, BOOL ret = TRUE; WINE_HDD *whdd; - TRACE("(%d,0x%lx,%d,%d,%p,%d,%d,0x%08lx)\n", - hdd,(DWORD)hdc,dxDst,dyDst,lpbi,dxSrc,dySrc,(DWORD)wFlags + TRACE("(%p,%p,%d,%d,%p,%d,%d,0x%08lx)\n", + hdd,hdc,dxDst,dyDst,lpbi,dxSrc,dySrc,(DWORD)wFlags ); TRACE("lpbi: %ld,%ld/%ld,%d,%d,%ld,%ld,%ld,%ld,%ld,%ld\n", lpbi->biSize, lpbi->biWidth, lpbi->biHeight, lpbi->biPlanes, @@ -160,7 +160,7 @@ BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd, if (wFlags & ~(DDF_BUFFER)) FIXME("wFlags == 0x%08x not handled\n", wFlags & ~(DDF_BUFFER)); - whdd = (WINE_HDD*)GlobalLock16(hdd); + whdd = (WINE_HDD*)GlobalLock16(HDRAWDIB_16(hdd)); if (!whdd) return FALSE; if (whdd->begun) @@ -217,7 +217,7 @@ BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd, if (!whdd->hDib) { TRACE("Error: %ld\n",GetLastError()); } - TRACE("Created: %d,%p\n",whdd->hDib,whdd->lpvbits); + TRACE("Created: %p,%p\n",whdd->hDib,whdd->lpvbits); whdd->hOldDib = SelectObject(whdd->hMemDC,whdd->hDib); } @@ -240,7 +240,7 @@ BOOL VFWAPI DrawDibBegin(HDRAWDIB hdd, } } - GlobalUnlock16(hdd); + GlobalUnlock16(HDRAWDIB_16(hdd)); return ret; } @@ -258,8 +258,8 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc, WINE_HDD *whdd; BOOL ret = TRUE; - TRACE("(%d,0x%lx,%d,%d,%d,%d,%p,%p,%d,%d,%d,%d,0x%08lx)\n", - hdd,(DWORD)hdc,xDst,yDst,dxDst,dyDst,lpbi,lpBits,xSrc,ySrc,dxSrc,dySrc,(DWORD)wFlags + TRACE("(%p,%p,%d,%d,%d,%d,%p,%p,%d,%d,%d,%d,0x%08lx)\n", + hdd,hdc,xDst,yDst,dxDst,dyDst,lpbi,lpBits,xSrc,ySrc,dxSrc,dySrc,(DWORD)wFlags ); if (wFlags & ~(DDF_SAME_HDC | DDF_SAME_DRAW | DDF_NOTKEYFRAME | @@ -271,7 +271,7 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc, lpBits = (LPSTR)lpbi + (WORD)(lpbi->biSize) + (WORD)(num_colours(lpbi)*sizeof(RGBQUAD)); } - whdd = GlobalLock16(hdd); + whdd = GlobalLock16(HDRAWDIB_16(hdd)); #define CHANGED(x) (whdd->x != x) @@ -312,7 +312,7 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc, if (!(StretchBlt(whdd->hdc,xDst,yDst,dxDst,dyDst,whdd->hMemDC,xSrc,ySrc,dxSrc,dySrc,SRCCOPY))) ret = FALSE; - GlobalUnlock16(hdd); + GlobalUnlock16(HDRAWDIB_16(hdd)); return ret; } @@ -320,7 +320,7 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc, * DrawDibStart [MSVFW32.@] */ BOOL VFWAPI DrawDibStart(HDRAWDIB hdd, DWORD rate) { - FIXME("(0x%08lx,%ld), stub\n",(DWORD)hdd,rate); + FIXME("(%p,%ld), stub\n",hdd,rate); return TRUE; } @@ -328,7 +328,7 @@ BOOL VFWAPI DrawDibStart(HDRAWDIB hdd, DWORD rate) { * DrawDibStop [MSVFW32.@] */ BOOL VFWAPI DrawDibStop(HDRAWDIB hdd) { - FIXME("(0x%08lx), stub\n",(DWORD)hdd); + FIXME("(%p), stub\n",hdd); return TRUE; } @@ -338,16 +338,16 @@ BOOL VFWAPI DrawDibStop(HDRAWDIB hdd) { BOOL VFWAPI DrawDibSetPalette(HDRAWDIB hdd, HPALETTE hpal) { WINE_HDD *whdd; - TRACE("(0x%08lx,0x%08lx)\n",(DWORD)hdd,(DWORD)hpal); + TRACE("(%p,%p)\n",hdd,hpal); - whdd = GlobalLock16(hdd); + whdd = GlobalLock16(HDRAWDIB_16(hdd)); whdd->hpal = hpal; if (whdd->begun) { SelectPalette(whdd->hdc,hpal,0); RealizePalette(whdd->hdc); } - GlobalUnlock16(hdd); + GlobalUnlock16(HDRAWDIB_16(hdd)); return TRUE; } @@ -358,11 +358,11 @@ HPALETTE VFWAPI DrawDibGetPalette(HDRAWDIB hdd) { WINE_HDD *whdd; HPALETTE ret; - TRACE("(0x%08lx)\n",(DWORD)hdd); + TRACE("(%p)\n",hdd); - whdd = GlobalLock16(hdd); + whdd = GlobalLock16(HDRAWDIB_16(hdd)); ret = whdd->hpal; - GlobalUnlock16(hdd); + GlobalUnlock16(HDRAWDIB_16(hdd)); return ret; } @@ -374,9 +374,9 @@ UINT VFWAPI DrawDibRealize(HDRAWDIB hdd, HDC hdc, BOOL fBackground) { HPALETTE oldPal; UINT ret = 0; - FIXME("(%d,0x%08lx,%d), stub\n",hdd,(DWORD)hdc,fBackground); + FIXME("(%p,%p,%d), stub\n",hdd,hdc,fBackground); - whdd = GlobalLock16(hdd); + whdd = GlobalLock16(HDRAWDIB_16(hdd)); if (!whdd || !(whdd->begun)) { ret = 0; @@ -390,7 +390,7 @@ UINT VFWAPI DrawDibRealize(HDRAWDIB hdd, HDC hdc, BOOL fBackground) { ret = RealizePalette(hdc); out: - GlobalUnlock16(hdd); + GlobalUnlock16(HDRAWDIB_16(hdd)); TRACE("=> %u\n",ret); return ret; diff --git a/dlls/msvideo/mciwnd.c b/dlls/msvideo/mciwnd.c index 1151f8af29f..74e4a221cdd 100644 --- a/dlls/msvideo/mciwnd.c +++ b/dlls/msvideo/mciwnd.c @@ -82,7 +82,7 @@ HWND VFWAPIV MCIWndCreateA(HWND hwndParent, HINSTANCE hInstance, DWORD wndStyle; MCIWndInfo* mwi; - TRACE("%x %x %lx %s\n", hwndParent, hInstance, dwStyle, szFile); + TRACE("%p %p %lx %s\n", hwndParent, hInstance, dwStyle, szFile); MCIWndRegisterClass(hInstance); @@ -116,7 +116,7 @@ HWND VFWAPIV MCIWndCreateA(HWND hwndParent, HINSTANCE hInstance, HWND VFWAPIV MCIWndCreateW(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCWSTR szFile) { - FIXME("%x %x %lx %s\n", hwndParent, hInstance, dwStyle, debugstr_w(szFile)); + FIXME("%p %p %lx %s\n", hwndParent, hInstance, dwStyle, debugstr_w(szFile)); MCIWndRegisterClass(hInstance); @@ -233,14 +233,17 @@ static void MCIWND_Create(HWND hWnd, LPCREATESTRUCTA cs) /* adding the other elements: play/stop button, menu button, status */ hChld = CreateWindowExA(0, "BUTTON", "Play", WS_CHILD|WS_VISIBLE, 0, cy, 32, 32, - hWnd, (HMENU)CTL_PLAYSTOP, GetWindowLongA(hWnd, GWL_HINSTANCE), 0L); - TRACE("Get Button1: %04x\n", hChld); + hWnd, (HMENU)CTL_PLAYSTOP, + (HINSTANCE)GetWindowLongA(hWnd, GWL_HINSTANCE), 0L); + TRACE("Get Button1: %p\n", hChld); hChld = CreateWindowExA(0, "BUTTON", "Menu", WS_CHILD|WS_VISIBLE, 32, cy, 32, 32, - hWnd, (HMENU)CTL_MENU, GetWindowLongA(hWnd, GWL_HINSTANCE), 0L); - TRACE("Get Button2: %04x\n", hChld); + hWnd, (HMENU)CTL_MENU, + (HINSTANCE)GetWindowLongA(hWnd, GWL_HINSTANCE), 0L); + TRACE("Get Button2: %p\n", hChld); hChld = CreateWindowExA(0, TRACKBAR_CLASSA, "", WS_CHILD|WS_VISIBLE, 64, cy, cx - 64, 32, - hWnd, (HMENU)CTL_TRACKBAR, GetWindowLongA(hWnd, GWL_HINSTANCE), 0L); - TRACE("Get status: %04x\n", hChld); + hWnd, (HMENU)CTL_TRACKBAR, + (HINSTANCE)GetWindowLongA(hWnd, GWL_HINSTANCE), 0L); + TRACE("Get status: %p\n", hChld); SendMessageA(hChld, TBM_SETRANGEMIN, 0L, 0L); SendMessageA(hChld, TBM_SETRANGEMAX, 1L, MCIWND_Get(mwi, MCI_STATUS_LENGTH)); @@ -343,4 +346,3 @@ static LRESULT WINAPI MCIWndProc(HWND hWnd, UINT wMsg, WPARAM lParam1, LPARAM lP return DefWindowProcA(hWnd, wMsg, lParam1, lParam2); } - diff --git a/dlls/msvideo/msvideo16.c b/dlls/msvideo/msvideo16.c index 73782fd6a4a..dac282cc46e 100644 --- a/dlls/msvideo/msvideo16.c +++ b/dlls/msvideo/msvideo16.c @@ -28,15 +28,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvideo); -/* handle16 --> handle conversions */ -#define HDRAWDIB_32(h16) ((HDRAWDIB)(ULONG_PTR)(h16)) -#define HIC_32(h16) ((HIC)(ULONG_PTR)(h16)) - -/* handle --> handle16 conversions */ -#define HDRAWDIB_16(h32) (LOWORD(h32)) -#define HIC_16(h32) (LOWORD(h32)) - - /*********************************************************************** * DrawDibOpen [MSVIDEO.102] */ diff --git a/dlls/msvideo/msvideo_main.c b/dlls/msvideo/msvideo_main.c index ee935094b5c..ea34fef5a0f 100644 --- a/dlls/msvideo/msvideo_main.c +++ b/dlls/msvideo/msvideo_main.c @@ -195,7 +195,7 @@ HIC VFWAPI ICOpen(DWORD fccType,DWORD fccHandler,UINT wMode) { char type[5],handler[5],codecname[20]; ICOPEN icopen; HDRVR hdrv; - HIC16 hic; + HIC hic; WINE_HIC *whic; memcpy(type,&fccType,4);type[4]=0; @@ -223,19 +223,19 @@ HIC VFWAPI ICOpen(DWORD fccType,DWORD fccHandler,UINT wMode) { return 0; } /* The handle should be a valid 16-bit handle as well */ - hic = GlobalAlloc16(GHND,sizeof(WINE_HIC)); - whic = (WINE_HIC*)GlobalLock16(hic); + hic = HIC_32(GlobalAlloc16(GHND,sizeof(WINE_HIC))); + whic = (WINE_HIC*)GlobalLock16(HIC_16(hic)); whic->hdrv = hdrv; whic->driverproc= NULL; whic->private = 0; - GlobalUnlock16(hic); - TRACE("=> 0x%08lx\n",(DWORD)hic); - return hic; + GlobalUnlock16(HIC_16(hic)); + TRACE("=> %p\n",hic); + return HIC_32(hic); } HIC MSVIDEO_OpenFunc(DWORD fccType, DWORD fccHandler, UINT wMode, FARPROC lpfnHandler, BOOL bFrom32) { char type[5],handler[5],codecname[20]; - HIC16 hic; + HIC hic; ICOPEN icopen; SEGPTR seg_icopen; WINE_HIC *whic; @@ -251,10 +251,10 @@ HIC MSVIDEO_OpenFunc(DWORD fccType, DWORD fccHandler, UINT wMode, FARPROC lpfnHa sprintf(codecname,"%s.%s",type,handler); - hic = GlobalAlloc16(GHND,sizeof(WINE_HIC)); + hic = HIC_32(GlobalAlloc16(GHND,sizeof(WINE_HIC))); if (!hic) return 0; - whic = GlobalLock16(hic); + whic = GlobalLock16(HIC_16(hic)); whic->driverproc = lpfnHandler; whic->private = bFrom32; @@ -263,8 +263,8 @@ HIC MSVIDEO_OpenFunc(DWORD fccType, DWORD fccHandler, UINT wMode, FARPROC lpfnHa /* What if the function is used more than once? */ if (MSVIDEO_SendMessage(hic,DRV_LOAD,0L,0L,bFrom32) != DRV_SUCCESS) { - WARN("DRV_LOAD failed for hic 0x%08lx\n",(DWORD)hic); - GlobalFree16(hic); + WARN("DRV_LOAD failed for hic %p\n", hic); + GlobalFree16(HIC_16(hic)); return 0; } /* return value is not checked */ @@ -274,13 +274,13 @@ HIC MSVIDEO_OpenFunc(DWORD fccType, DWORD fccHandler, UINT wMode, FARPROC lpfnHa whic->hdrv = (HDRVR)MSVIDEO_SendMessage(hic,DRV_OPEN,0,seg_icopen,FALSE); UnMapLS( seg_icopen ); if (whic->hdrv == 0) { - WARN("DRV_OPEN failed for hic 0x%08lx\n",(DWORD)hic); - GlobalFree16(hic); + WARN("DRV_OPEN failed for hic %p\n",hic); + GlobalFree16(HIC_16(hic)); return 0; } - GlobalUnlock16(hic); - TRACE("=> 0x%08lx\n",(DWORD)hic); + GlobalUnlock16(HIC_16(hic)); + TRACE("=> %p\n",hic); return hic; } @@ -296,7 +296,7 @@ HIC VFWAPI ICOpenFunction(DWORD fccType, DWORD fccHandler, UINT wMode, FARPROC l */ HIC16 VFWAPI ICOpenFunction16(DWORD fccType, DWORD fccHandler, UINT16 wMode, FARPROC16 lpfnHandler) { - return MSVIDEO_OpenFunc(fccType, fccHandler, wMode, (FARPROC)lpfnHandler,FALSE); + return HIC_16(MSVIDEO_OpenFunc(fccType, fccHandler, wMode, (FARPROC)lpfnHandler,FALSE)); } /*********************************************************************** @@ -305,7 +305,7 @@ HIC16 VFWAPI ICOpenFunction16(DWORD fccType, DWORD fccHandler, UINT16 wMode, FAR LRESULT VFWAPI ICGetInfo(HIC hic,ICINFO *picinfo,DWORD cb) { LRESULT ret; - TRACE("(0x%08lx,%p,%ld)\n",(DWORD)hic,picinfo,cb); + TRACE("(%p,%p,%ld)\n",hic,picinfo,cb); ret = ICSendMessage(hic,ICM_GETINFO,(DWORD)picinfo,cb); TRACE(" -> 0x%08lx\n",ret); return ret; @@ -402,7 +402,7 @@ HIC VFWAPI ICGetDisplayFormat( { HIC tmphic = hic; - FIXME("(0x%08lx,%p,%p,%d,%d,%d),stub!\n",(DWORD)hic,lpbiIn,lpbiOut,depth,dx,dy); + FIXME("(%p,%p,%p,%d,%d,%d),stub!\n",hic,lpbiIn,lpbiOut,depth,dx,dy); if (!tmphic) { tmphic=ICLocate(ICTYPE_VIDEO,0,lpbiIn,NULL,ICMODE_DECOMPRESS); if (!tmphic) @@ -438,7 +438,7 @@ HIC VFWAPI ICGetDisplayFormat( if (lpbiIn->biBitCount == 8) depth = 8; - TRACE("=> 0x%08lx\n",(DWORD)tmphic); + TRACE("=> %p\n", tmphic); return tmphic; errout: if (hic!=tmphic) @@ -460,7 +460,7 @@ ICCompress( { ICCOMPRESS iccmp; - TRACE("(0x%08lx,%ld,%p,%p,%p,%p,...)\n",(DWORD)hic,dwFlags,lpbiOutput,lpData,lpbiInput,lpBits); + TRACE("(%p,%ld,%p,%p,%p,%p,...)\n",hic,dwFlags,lpbiOutput,lpData,lpbiInput,lpBits); iccmp.dwFlags = dwFlags; @@ -488,7 +488,7 @@ DWORD VFWAPIV ICDecompress(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiFormat, ICDECOMPRESS icd; DWORD ret; - TRACE("(0x%08lx,%ld,%p,%p,%p,%p)\n",(DWORD)hic,dwFlags,lpbiFormat,lpData,lpbi,lpBits); + TRACE("(%p,%ld,%p,%p,%p,%p)\n",hic,dwFlags,lpbiFormat,lpData,lpbi,lpBits); TRACE("lpBits[0] == %ld\n",((LPDWORD)lpBits)[0]); @@ -674,7 +674,7 @@ LPVOID MSVIDEO_MapMsg16To32(UINT msg, LPDWORD lParam1, LPDWORD lParam2) { COPY(icdb,dwFlags); icdb->hpal = HPALETTE_32(icdb16->hpal); icdb->hwnd = HWND_32(icdb16->hwnd); - COPY(icdb,hdc); + icdb->hdc = HDC_32(icdb16->hdc); COPY(icdb,xDst); COPY(icdb,yDst); COPY(icdb,dxDst); @@ -705,7 +705,7 @@ LPVOID MSVIDEO_MapMsg16To32(UINT msg, LPDWORD lParam1, LPDWORD lParam2) { COPY(icds,dySrc); COPY(icds,dxDst); COPY(icds,dyDst); - COPY(icds,hicDecompressor); + icds->hicDecompressor = HIC_32(icds16->hicDecompressor); *lParam1 = (DWORD)(icds); *lParam2 = sizeof(ICDRAWSUGGEST); @@ -793,11 +793,11 @@ void MSVIDEO_UnmapMsg16To32(UINT msg, LPVOID data16, LPDWORD lParam1, LPDWORD lP LRESULT MSVIDEO_SendMessage(HIC hic,UINT msg,DWORD lParam1,DWORD lParam2, BOOL bFrom32) { LRESULT ret; - WINE_HIC *whic = GlobalLock16(hic); + WINE_HIC *whic = GlobalLock16(HIC_16(hic)); LPVOID data16 = 0; BOOL bDrv32; -#define XX(x) case x: TRACE("(0x%08lx,"#x",0x%08lx,0x%08lx,%d)\n",(DWORD)hic,lParam1,lParam2,bFrom32?32:16);break; +#define XX(x) case x: TRACE("(%p,"#x",0x%08lx,0x%08lx,%d)\n",hic,lParam1,lParam2,bFrom32?32:16);break; switch (msg) { /* DRV_* */ @@ -858,7 +858,7 @@ LRESULT MSVIDEO_SendMessage(HIC hic,UINT msg,DWORD lParam1,DWORD lParam2, BOOL b XX(ICM_DECOMPRESSEX_END); XX(ICM_SET_STATUS_PROC); default: - FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx,%i) unknown message\n",(DWORD)hic,(DWORD)msg,lParam1,lParam2,bFrom32?32:16); + FIXME("(%p,0x%08lx,0x%08lx,0x%08lx,%i) unknown message\n",hic,(DWORD)msg,lParam1,lParam2,bFrom32?32:16); } #undef XX @@ -886,7 +886,7 @@ LRESULT MSVIDEO_SendMessage(HIC hic,UINT msg,DWORD lParam1,DWORD lParam2, BOOL b if (bDrv32) { ret = whic->driverproc(whic->hdrv,hic,msg,lParam1,lParam2); } else { - ret = MSVIDEO_CallTo16_long_lwwll((FARPROC16)whic->driverproc,HDRVR_16(whic->hdrv),hic,msg,lParam1,lParam2); + ret = MSVIDEO_CallTo16_long_lwwll((FARPROC16)whic->driverproc,(LONG)whic->hdrv,HIC_16(hic),msg,lParam1,lParam2); } } else { ret = SendDriverMessage(whic->hdrv,msg,lParam1,lParam2); @@ -896,7 +896,7 @@ LRESULT MSVIDEO_SendMessage(HIC hic,UINT msg,DWORD lParam1,DWORD lParam2, BOOL b MSVIDEO_UnmapMsg16To32(msg,data16,&lParam1,&lParam2); out: - GlobalUnlock16(hic); + GlobalUnlock16(HIC_16(hic)); TRACE(" -> 0x%08lx\n",ret); return ret; @@ -913,7 +913,7 @@ LRESULT VFWAPI ICSendMessage(HIC hic, UINT msg, DWORD lParam1, DWORD lParam2) { * ICSendMessage [MSVIDEO.205] */ LRESULT VFWAPI ICSendMessage16(HIC16 hic, UINT16 msg, DWORD lParam1, DWORD lParam2) { - return MSVIDEO_SendMessage(hic,msg,lParam1,lParam2,FALSE); + return MSVIDEO_SendMessage(HIC_32(hic),msg,lParam1,lParam2,FALSE); } /*********************************************************************** @@ -940,8 +940,8 @@ DWORD VFWAPIV ICDrawBegin( ICDRAWBEGIN icdb; - TRACE("(0x%08lx,%ld,0x%08lx,0x%08lx,0x%08lx,%u,%u,%u,%u,%p,%u,%u,%u,%u,%ld,%ld)\n", - (DWORD)hic, dwFlags, (DWORD)hpal, (DWORD)hwnd, (DWORD)hdc, xDst, yDst, dxDst, dyDst, + TRACE("(%p,%ld,%p,%p,%p,%u,%u,%u,%u,%p,%u,%u,%u,%u,%ld,%ld)\n", + hic, dwFlags, hpal, hwnd, hdc, xDst, yDst, dxDst, dyDst, lpbi, xSrc, ySrc, dxSrc, dySrc, dwRate, dwScale); icdb.dwFlags = dwFlags; @@ -968,7 +968,7 @@ DWORD VFWAPIV ICDrawBegin( DWORD VFWAPIV ICDraw(HIC hic, DWORD dwFlags, LPVOID lpFormat, LPVOID lpData, DWORD cbData, LONG lTime) { ICDRAW icd; - TRACE("(0x%09lx,%ld,%p,%p,%ld,%ld)\n",(DWORD)hic,dwFlags,lpFormat,lpData,cbData,lTime); + TRACE("(%p,%ld,%p,%p,%ld,%ld)\n",hic,dwFlags,lpFormat,lpData,cbData,lTime); icd.dwFlags = dwFlags; icd.lpFormat = lpFormat; @@ -983,8 +983,8 @@ DWORD VFWAPIV ICDraw(HIC hic, DWORD dwFlags, LPVOID lpFormat, LPVOID lpData, DWO * ICClose [MSVFW32.@] */ LRESULT WINAPI ICClose(HIC hic) { - WINE_HIC *whic = GlobalLock16(hic); - TRACE("(0x%08lx)\n",(DWORD)hic); + WINE_HIC *whic = GlobalLock16(HIC_16(hic)); + TRACE("(%p)\n",hic); if (whic->driverproc) { ICSendMessage(hic,DRV_CLOSE,0,0); ICSendMessage(hic,DRV_DISABLE,0,0); @@ -993,8 +993,8 @@ LRESULT WINAPI ICClose(HIC hic) { CloseDriver(whic->hdrv,0,0); } - GlobalUnlock16(hic); - GlobalFree16(hic); + GlobalUnlock16(HIC_16(hic)); + GlobalFree16(HIC_16(hic)); return 0; } @@ -1009,7 +1009,7 @@ HANDLE VFWAPI ICImageCompress( LPBITMAPINFO lpbiOut, LONG lQuality, LONG* plSize) { - FIXME("(%08x,%08x,%p,%p,%p,%ld,%p)\n", + FIXME("(%p,%08x,%p,%p,%p,%ld,%p)\n", hic, uiFlags, lpbiIn, lpBits, lpbiOut, lQuality, plSize); return (HANDLE)NULL; @@ -1032,7 +1032,7 @@ HANDLE VFWAPI ICImageDecompress( BOOL bInDecompress = FALSE; DWORD biSizeImage; - TRACE("(%08x,%08x,%p,%p,%p)\n", + TRACE("(%p,%08x,%p,%p,%p)\n", hic, uiFlags, lpbiIn, lpBits, lpbiOut); if ( hic == (HIC)NULL ) diff --git a/dlls/msvideo/vfw16.h b/dlls/msvideo/vfw16.h index 4fd4d944f15..c5a4967aecb 100644 --- a/dlls/msvideo/vfw16.h +++ b/dlls/msvideo/vfw16.h @@ -118,6 +118,14 @@ HIC16 VFWAPI ICOpen16(DWORD,DWORD,UINT16); HIC16 VFWAPI ICOpenFunction16(DWORD,DWORD,UINT16,FARPROC16); LRESULT VFWAPI ICSendMessage16(HIC16,UINT16,DWORD,DWORD); +/* handle16 --> handle conversions */ +#define HDRAWDIB_32(h16) ((HDRAWDIB)(ULONG_PTR)(h16)) +#define HIC_32(h16) ((HIC)(ULONG_PTR)(h16)) + +/* handle --> handle16 conversions */ +#define HDRAWDIB_16(h32) (LOWORD(h32)) +#define HIC_16(h32) (LOWORD(h32)) + #ifdef __cplusplus } #endif /* __cplusplus */