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