Author: greatlrd Date: Sat Mar 1 18:28:44 2008 New Revision: 32539
URL: http://svn.reactos.org/svn/reactos?rev=3D32539&view=3Drev Log: finish implemented of DvpVideoport, misc, misc2, Color Control, NT callback= s not tested to 100% yet stub up almost all callbacks that DdGetDriverInfo setup, mark out where Dir= ectX DdBltAlphaBlend are =
ReactOS gdi32.dll was tested in windows xp and it seam working fine with d= x1-7 at moment, even not everything are finish. =
Modified: trunk/reactos/dll/win32/gdi32/misc/gdientry.c
Modified: trunk/reactos/dll/win32/gdi32/misc/gdientry.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/= gdientry.c?rev=3D32539&r1=3D32538&r2=3D32539&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- trunk/reactos/dll/win32/gdi32/misc/gdientry.c (original) +++ trunk/reactos/dll/win32/gdi32/misc/gdientry.c Sat Mar 1 18:28:44 2008 @@ -603,7 +603,7 @@ WINAPI DvpWaitForVideoPortSync(LPDDHAL_WAITFORVPORTSYNCDATA pDvdWaitForVideoPortS= ync) { - return NtGdiDvpWaitForVideoPortSync(pDvdWaitForVideoPortSync->lpVideoP= ort->hDDVideoPort, (PDD_WAITFORVPORTSYNCDATA) pDvdWaitForVideoPortSync); + return NtGdiDvpWaitForVideoPortSync(pDvdWaitForVideoPortSync->lpVideoP= ort->hDDVideoPort, (PDD_WAITFORVPORTSYNCDATA) pDvdWaitForVideoPortSync); } =
/* @@ -670,121 +670,485 @@ return NtGdiDvpUpdateVideoPort(pDvdUpdateVideoPort->lpVideoPort->hDDVi= deoPort,phSurfaceVideo,phSurfaceVbi, (PDD_UPDATEVPORTDATA)pDvdUpdateVideoPo= rt); } =
+/* + * @implemented + * + * DvpWaitForVideoPortSync + */ +DWORD +WINAPI +DvpGetVideoPortField(LPDDHAL_FLIPVPORTDATA pDvdGetVideoPortField) +{ + return NtGdiDvpGetVideoPortField(pDvdGetVideoPortField->lpVideoPort->h= DDVideoPort, (PDD_GETVPORTFIELDDATA)pDvdGetVideoPortField); +} + +/* + * @implemented + * + * DvpWaitForVideoPortSync + */ +DWORD +WINAPI +DvpGetVideoPortInputFormats(LPDDHAL_GETVPORTINPUTFORMATDATA pDvdGetVideoPo= rtInputFormat) +{ + return NtGdiDvpGetVideoPortInputFormats(pDvdGetVideoPortInputFormat->l= pVideoPort->hDDVideoPort, (PDD_GETVPORTINPUTFORMATDATA) pDvdGetVideoPortInp= utFormat); +} + + +/* + * @implemented + * + * DvpGetVideoPortLine + */ +DWORD +WINAPI +DvpGetVideoPortLine(LPDDHAL_GETVPORTLINEDATA pDvdGetVideoPortLine) +{ + return NtGdiDvpGetVideoPortLine(pDvdGetVideoPortLine->lpVideoPort->hDD= VideoPort, (PDD_GETVPORTLINEDATA)pDvdGetVideoPortLine); +} + +/* + * @implemented + * + * DvpGetVideoPortOutputFormats + */ +DWORD +WINAPI +DvpGetVideoPortOutputFormats(LPDDHAL_GETVPORTLINEDATA pDvdGetVideoPortOutp= utFormat) +{ + return NtGdiDvpGetVideoPortLine(pDvdGetVideoPortOutputFormat->lpVideoP= ort->hDDVideoPort, (PDD_GETVPORTLINEDATA)pDvdGetVideoPortOutputFormat); +} + + +/* + * @implemented + * + * DvpGetVideoPortConnectInfo + */ +DWORD +WINAPI +DvpGetVideoPortConnectInfo(LPDDHAL_GETVPORTCONNECTDATA pDvdGetVideoPortInf= o) +{ + return NtGdiDvpGetVideoPortConnectInfo( GetDdHandle( pDvdGetVideoPortI= nfo->lpDD->lpGbl->hDD) , (PDD_GETVPORTCONNECTDATA) pDvdGetVideoPortInfo); +} + +/* + * @implemented + * + * DdGetAvailDriverMemory + */ +DWORD +WINAPI +DdGetAvailDriverMemory(LPDDHAL_GETAVAILDRIVERMEMORYDATA pDdGetAvailDriverM= emory) +{ + return NtGdiDdGetAvailDriverMemory(GetDdHandle( pDdGetAvailDriverMemory-=
lpDD->hDD), (PDD_GETAVAILDRIVERMEMORYDATA) pDdGetAvailDriverMemory);
+} + +/* + * @implemented + * + * DdAlphaBlt + */ +DWORD +WINAPI +DdAlphaBlt(LPDDHAL_BLTDATA pDdAlphaBlt) +{ + HANDLE hDDSrcSurface =3D 0; =
+ + if (pDdAlphaBlt->lpDDSrcSurface !=3D 0) + { + hDDSrcSurface =3D (HANDLE) pDdAlphaBlt->lpDDSrcSurface->hDDSurface= ; =
+ } + =
+ return NtGdiDdAlphaBlt((HANDLE)pDdAlphaBlt->lpDDDestSurface->hDDSurfac= e, hDDSrcSurface, (PDD_BLTDATA)&pDdAlphaBlt); +} + +/* + * @implemented + * + * DdCreateSurfaceEx + */ +DWORD +WINAPI +DdCreateSurfaceEx(LPDDHAL_CREATESURFACEEXDATA pDdCreateSurfaceEx) +{ + pDdCreateSurfaceEx->ddRVal =3D NtGdiDdCreateSurfaceEx( GetDdHandle(pDd= CreateSurfaceEx->lpDDLcl->lpGbl->hDD), + (HANDLE)pDdCreate= SurfaceEx->lpDDSLcl->hDDSurface, =
+ pDdCreateSurfaceE= x->lpDDSLcl->lpSurfMore->dwSurfaceHandle); =
+ return TRUE; +} + +/* + * @implemented + * + * DdColorControl + */ +DWORD +WINAPI +DdColorControl(LPDDHAL_COLORCONTROLDATA pDdColorControl) +{ + return NtGdiDdColorControl( (HANDLE) pDdColorControl->lpDDSurface->hDD= Surface, (PDD_COLORCONTROLDATA) &pDdColorControl); +} + + +/* + * @implemented + * + * DdSetExclusiveMode + */ +DWORD +WINAPI +DdSetExclusiveMode(LPDDHAL_SETEXCLUSIVEMODEDATA pDdSetExclusiveMode) +{ + return NtGdiDdSetExclusiveMode( GetDdHandle(pDdSetExclusiveMode->lpDD-=
hDD), (PDD_SETEXCLUSIVEMODEDATA) &pDdSetExclusiveMode);
+} + +/* + * @implemented + * + * DdFlipToGDISurface + */ +DWORD +WINAPI +DdFlipToGDISurface(LPDDHAL_FLIPTOGDISURFACEDATA pDdFlipToGDISurface) +{ + return NtGdiDdFlipToGDISurface( GetDdHandle(pDdFlipToGDISurface->lpDD-=
hDD), (PDD_FLIPTOGDISURFACEDATA) &pDdFlipToGDISurface);
+} + + + + /* TODO */ - DWORD WINAPI DdGetDriverInfo(LPDDHAL_GETDRIVERINFODATA pData) -{ - HANDLE hDD =3D GetDdHandle(pData->dwContext); - - /* Get videoport callbacks */ - if (IsEqualGUID(&pData->guidInfo, &GUID_VideoPortCallbacks)) - { - DDHAL_GETDRIVERINFODATA pDvdPortInfo; - DDHAL_DDVIDEOPORTCALLBACKS pDvdPort; - DDHAL_DDVIDEOPORTCALLBACKS* pUserDvdPort =3D (DDHAL_DDVIDEOPORTCAL= LBACKS *)pData->lpvData; - DWORD retValue; +{ =
+ DDHAL_GETDRIVERINFODATA pDrvInfoData; + DWORD retValue =3D DDHAL_DRIVER_NOTHANDLED; + HANDLE hDD; + + /* FIXME add SEH around this functions */ + + RtlZeroMemory(&pDrvInfoData, sizeof (DDHAL_GETDRIVERINFODATA)); = =
+ RtlCopyMemory(&pDrvInfoData.guidInfo, &pData->guidInfo, sizeof(GUI= D)); + =
+ hDD =3D GetDdHandle(pData->dwContext); + + pDrvInfoData.dwSize =3D sizeof (DDHAL_GETDRIVERINFODATA); + pDrvInfoData.ddRVal =3D DDERR_GENERIC; =
+ pDrvInfoData.dwContext =3D (ULONG_PTR)hDD; =
- /* Clear user out buffer */ - RtlZeroMemory(pUserDvdPort, DDVIDEOPORTCALLBACKSSIZE); =
- - /* Clear internal out buffer and set it up*/ - RtlZeroMemory(&pDvdPort, DDVIDEOPORTCALLBACKSSIZE); - pDvdPort.dwSize =3D DDVIDEOPORTCALLBACKSSIZE; - - /* Clear internal in buffer and set it up*/ - RtlZeroMemory(&pDvdPortInfo, sizeof (DDHAL_GETDRIVERINFODATA)); = =
- pDvdPortInfo.dwSize =3D sizeof (DDHAL_GETDRIVERINFODATA); - pDvdPortInfo.guidInfo =3D GUID_VideoPortCallbacks; - pDvdPortInfo.lpvData =3D (PVOID)&pDvdPort; - pDvdPortInfo.ddRVal =3D DDERR_GENERIC; - pDvdPortInfo.dwExpectedSize =3D DDVIDEOPORTCALLBACKSSIZE ; =
- pDvdPortInfo.dwContext =3D (ULONG_PTR) hDD; + =
+ /* Videoport Callbacks check and setup for DirectX/ ReactX */ + if (IsEqualGUID(&pData->guidInfo, &GUID_VideoPortCallbacks)) + { =
+ DDHAL_DDVIDEOPORTCALLBACKS pDvdPort; + DDHAL_DDVIDEOPORTCALLBACKS* pUserDvdPort =3D (DDHAL_DDVIDEOPOR= TCALLBACKS *)pData->lpvData; =
+ + /* Clear internal out buffer and set it up*/ + RtlZeroMemory(&pDvdPort, DDVIDEOPORTCALLBACKSSIZE); + pDvdPort.dwSize =3D DDVIDEOPORTCALLBACKSSIZE; + + /* set up internal buffer */ = =
+ pDrvInfoData.lpvData =3D (PVOID)&pDvdPort; =
+ pDrvInfoData.dwExpectedSize =3D DDVIDEOPORTCALLBACKSSIZE ; =
+ =
+ /* Call win32k */ + retValue =3D NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)= &pDrvInfoData); + + /* Setup user out buffer and convert kmode callbacks to user m= ode */ + pUserDvdPort->dwSize =3D DDVIDEOPORTCALLBACKSSIZE; =
+ pUserDvdPort->dwFlags =3D pDrvInfoData.dwFlags =3D 0; + =
+ pUserDvdPort->dwFlags =3D (pDrvInfoData.dwFlags & ~(DDHAL_VPOR= T32_CREATEVIDEOPORT | DDHAL_VPORT32_FLIP | + DDHAL_VPORT3= 2_DESTROY | DDHAL_VPORT32_UPDATE | DDHAL_VPORT32_WAITFORSYNC)) | + (DDHAL_VPORT3= 2_CREATEVIDEOPORT | DDHAL_VPORT32_FLIP | + DDHAL_VPORT3= 2_DESTROY | DDHAL_VPORT32_UPDATE); + + pData->dwActualSize =3D DDVIDEOPORTCALLBACKSSIZE; =
+ pUserDvdPort->CreateVideoPort =3D (LPDDHALVPORTCB_CREATEVIDEOP= ORT) DvpCreateVideoPort; + pUserDvdPort->FlipVideoPort =3D (LPDDHALVPORTCB_FLIP) DvpFlipV= ideoPort; + pUserDvdPort->DestroyVideoPort =3D (LPDDHALVPORTCB_DESTROYVPOR= T) DvpDestroyVideoPort; + pUserDvdPort->UpdateVideoPort =3D (LPDDHALVPORTCB_UPDATE) DvpU= pdateVideoPort; + + if (pDvdPort.CanCreateVideoPort) + { + pUserDvdPort->CanCreateVideoPort =3D (LPDDHALVPORTCB_CANCR= EATEVIDEOPORT) DvpCanCreateVideoPort; + } + + if (pDvdPort.GetVideoPortBandwidth) + { + pUserDvdPort->GetVideoPortBandwidth =3D (LPDDHALVPORTCB_GE= TBANDWIDTH) DvpGetVideoPortBandwidth; + } + + if (pDvdPort.GetVideoPortInputFormats) + { + pUserDvdPort->GetVideoPortInputFormats =3D (LPDDHALVPORTCB= _GETINPUTFORMATS) DvpGetVideoPortInputFormats; + } + + if (pDvdPort.GetVideoPortOutputFormats) + { + pUserDvdPort->GetVideoPortOutputFormats =3D (LPDDHALVPORTC= B_GETOUTPUTFORMATS) DvpGetVideoPortOutputFormats; + } + + if (pDvdPort.GetVideoPortField) + { + pUserDvdPort->GetVideoPortField =3D (LPDDHALVPORTCB_GETFIE= LD) DvpGetVideoPortField; =
+ } + + if (pDvdPort.GetVideoPortLine) + { + pUserDvdPort->GetVideoPortLine =3D (LPDDHALVPORTCB_GETLINE= ) DvpGetVideoPortLine; + } + + if (pDvdPort.GetVideoPortConnectInfo) + { + pUserDvdPort->GetVideoPortConnectInfo =3D (LPDDHALVPORTCB_= GETVPORTCONNECT) DvpGetVideoPortConnectInfo; + } + + if (pDvdPort.GetVideoPortFlipStatus) + { + pUserDvdPort->GetVideoPortFlipStatus =3D (LPDDHALVPORTCB_G= ETFLIPSTATUS) DvpGetVideoPortFlipStatus; + } =
- /* Call win32k */ - retValue =3D NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDv= dPortInfo); - - /* Setup user out buffer and convert kmode callbacks to user mode = */ - pUserDvdPort->dwSize =3D DDVIDEOPORTCALLBACKSSIZE; =
- =
- pUserDvdPort->dwFlags =3D (pDvdPortInfo.dwFlags & ~(DDHAL_VPORT32_= CREATEVIDEOPORT | DDHAL_VPORT32_FLIP | - DDHAL_VPORT32_DE= STROY | DDHAL_VPORT32_UPDATE )) | - (DDHAL_VPORT32_CR= EATEVIDEOPORT | DDHAL_VPORT32_FLIP | - DDHAL_VPORT32_DE= STROY | DDHAL_VPORT32_UPDATE); - - pData->dwActualSize =3D DDVIDEOPORTCALLBACKSSIZE; =
- pUserDvdPort->CreateVideoPort =3D (LPDDHALVPORTCB_CREATEVIDEOPORT)= DvpCreateVideoPort; - pUserDvdPort->FlipVideoPort =3D (LPDDHALVPORTCB_FLIP) DvpFlipVideo= Port; - pUserDvdPort->DestroyVideoPort =3D (LPDDHALVPORTCB_DESTROYVPORT) D= vpDestroyVideoPort; - pUserDvdPort->UpdateVideoPort =3D (LPDDHALVPORTCB_UPDATE) DvpUpdat= eVideoPort; - - if (pDvdPort.CanCreateVideoPort) - { - pUserDvdPort->CanCreateVideoPort =3D (LPDDHALVPORTCB_CANCREAT= EVIDEOPORT) DvpCanCreateVideoPort; - } - - if (pDvdPort.GetVideoPortBandwidth) - { - pUserDvdPort->GetVideoPortBandwidth =3D (LPDDHALVPORTCB_GETBAN= DWIDTH) DvpGetVideoPortBandwidth; - } - - if (pDvdPort.GetVideoPortInputFormats) - { - pUserDvdPort->GetVideoPortInputFormats =3D (LPDDHALVPORTCB_GET= INPUTFORMATS) NULL; // FIXME : DvpGetVideoPortInputFormats - } - - if (pDvdPort.GetVideoPortOutputFormats) - { - pUserDvdPort->GetVideoPortOutputFormats =3D (LPDDHALVPORTCB_GE= TOUTPUTFORMATS) NULL; // FIXME : DvpGetVideoPortInputFormats - } - - if (pDvdPort.GetVideoPortField) - { - pUserDvdPort->GetVideoPortField =3D (LPDDHALVPORTCB_GETFIELD) = NULL; // FIXME : DvpGetVideoPortField =
- } - - if (pDvdPort.GetVideoPortLine) - { - pUserDvdPort->GetVideoPortLine =3D (LPDDHALVPORTCB_GETLINE) NU= LL; // FIXME : DvpGetVideoPortLine - } - - if (pDvdPort.GetVideoPortConnectInfo) - { - pUserDvdPort->GetVideoPortConnectInfo =3D (LPDDHALVPORTCB_GETV= PORTCONNECT) NULL; // FIXME : DvpGetVideoPortConnectInfo - } - - if (pDvdPort.GetVideoPortFlipStatus) - { - pUserDvdPort->GetVideoPortFlipStatus =3D (LPDDHALVPORTCB_GETFL= IPSTATUS) DvpGetVideoPortFlipStatus; - } - =
- if (pDvdPort.WaitForVideoPortSync) - { - pUserDvdPort->WaitForVideoPortSync =3D (LPDDHALVPORTCB_WAITFOR= SYNC) DvpWaitForVideoPortSync; =
- } - - if (pDvdPort.GetVideoSignalStatus) - { - pUserDvdPort->GetVideoSignalStatus =3D (LPDDHALVPORTCB_GETSIGN= ALSTATUS) DvpGetVideoSignalStatus; - } - - if (pDvdPort.ColorControl) - { - pUserDvdPort->ColorControl =3D (LPDDHALVPORTCB_COLORCONTROL) D= vpColorControl; - } - - /* Windows XP never repot back the true return value, =
- * it only report back if we have a driver or not - * ReactOS keep this behoir to be compatible with - * Windows XP - */ - pData->ddRVal =3D retValue; - return retValue; - } - - /* FIXME not supported yet */ - return 0; + if (pDvdPort.WaitForVideoPortSync) + { + pUserDvdPort->WaitForVideoPortSync =3D (LPDDHALVPORTCB_WAI= TFORSYNC) DvpWaitForVideoPortSync; =
+ } + + if (pDvdPort.GetVideoSignalStatus) + { + pUserDvdPort->GetVideoSignalStatus =3D (LPDDHALVPORTCB_GET= SIGNALSTATUS) DvpGetVideoSignalStatus; + } + + if (pDvdPort.ColorControl) + { + pUserDvdPort->ColorControl =3D (LPDDHALVPORTCB_COLORCONTRO= L) DvpColorControl; + } + + /* Windows XP never repot back the true return value, =
+ * it only report back if we have a driver or not + * ReactOS keep this behoir to be compatible with + * Windows XP + */ + pData->ddRVal =3D retValue; + } + + /* Color Control Callbacks check and setup for DirectX/ ReactX */ + if (IsEqualGUID(&pData->guidInfo, &GUID_ColorControlCallbacks)) + { + DDHAL_DDCOLORCONTROLCALLBACKS pColorControl; + DDHAL_DDCOLORCONTROLCALLBACKS* pUserColorControl =3D (DDHAL_DD= COLORCONTROLCALLBACKS *)pData->lpvData; + =
+ /* Clear internal out buffer and set it up*/ + RtlZeroMemory(&pColorControl, DDCOLORCONTROLCALLBACKSSIZE); + pColorControl.dwSize =3D DDCOLORCONTROLCALLBACKSSIZE; + + /* set up internal buffer */ = =
+ pDrvInfoData.lpvData =3D (PVOID)&pColorControl; =
+ pDrvInfoData.dwExpectedSize =3D DDCOLORCONTROLCALLBACKSSIZE ; =
+ =
+ /* Call win32k */ + retValue =3D NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)= &pDrvInfoData); + =
+ pData->dwActualSize =3D DDCOLORCONTROLCALLBACKSSIZE; + pData->dwFlags =3D pDrvInfoData.dwFlags; + + pUserColorControl->dwSize =3D DDCOLORCONTROLCALLBACKSSIZE; + pUserColorControl->dwFlags =3D pUserColorControl->dwFlags; + =
+ if (pColorControl.ColorControl !=3D NULL) + { + pUserColorControl->ColorControl =3D (LPDDHALCOLORCB_COLORC= ONTROL) DdColorControl; + } + + /* Windows XP never repot back the true return value, =
+ * it only report back if we have a driver or not + * ReactOS keep this behoir to be compatible with + * Windows XP + */ + pData->ddRVal =3D retValue; + } + + /* Misc Callbacks check and setup for DirectX/ ReactX */ + else if (IsEqualGUID(&pData->guidInfo, &GUID_MiscellaneousCallback= s)) + { + DDHAL_DDMISCELLANEOUSCALLBACKS pMisc; + DDHAL_DDMISCELLANEOUSCALLBACKS* pUserMisc =3D (DDHAL_DDMISCELL= ANEOUSCALLBACKS *)pData->lpvData; + =
+ /* Clear internal out buffer and set it up*/ + RtlZeroMemory(&pMisc, DDMISCELLANEOUSCALLBACKSSIZE); + pMisc.dwSize =3D DDMISCELLANEOUSCALLBACKSSIZE; + + /* set up internal buffer */ = =
+ pDrvInfoData.lpvData =3D (PVOID)&pMisc; =
+ pDrvInfoData.dwExpectedSize =3D DDMISCELLANEOUSCALLBACKSSIZE ;= =
+ =
+ /* Call win32k */ + retValue =3D NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)= &pDrvInfoData); + + pData->dwActualSize =3D DDMISCELLANEOUSCALLBACKSSIZE; + + /* Only one callbacks are supported */ =
+ pUserMisc->dwFlags =3D pMisc.dwFlags & DDHAL_MISCCB32_GETAVAIL= DRIVERMEMORY; + pUserMisc->GetAvailDriverMemory =3D (LPDDHAL_GETAVAILDRIVERMEM= ORY) DdGetAvailDriverMemory; + + /* This callbacks are only for win9x and theirfor it is not lo= nger use in NT or ReactOS + * pUserMisc->UpdateNonLocalHeap; + * pUserMisc->GetHeapAlignment; + * pUserMisc->GetSysmemBltStatus; */ + + /* Windows XP never repot back the true return value, =
+ * it only report back if we have a driver or not + * ReactOS keep this behoir to be compatible with + * Windows XP + */ + pData->ddRVal =3D retValue; + } + + /* Misc 2 Callbacks check and setup for DirectX/ ReactX */ + else if (IsEqualGUID(&pData->guidInfo, &GUID_Miscellaneous2Callbac= ks)) + { + DDHAL_DDMISCELLANEOUS2CALLBACKS pMisc; + DDHAL_DDMISCELLANEOUS2CALLBACKS* pUserMisc =3D (DDHAL_DDMISCEL= LANEOUS2CALLBACKS *)pData->lpvData; + =
+ /* Clear internal out buffer and set it up*/ + RtlZeroMemory(&pMisc, DDMISCELLANEOUS2CALLBACKSSIZE); + pMisc.dwSize =3D DDMISCELLANEOUS2CALLBACKSSIZE; + + /* set up internal buffer */ = =
+ pDrvInfoData.lpvData =3D (PVOID)&pMisc; =
+ pDrvInfoData.dwExpectedSize =3D DDMISCELLANEOUS2CALLBACKSSIZE = ; =
+ =
+ /* Call win32k */ + retValue =3D NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)= &pDrvInfoData); + + pData->dwActualSize =3D DDMISCELLANEOUS2CALLBACKSSIZE; + + pUserMisc->dwFlags =3D pMisc.dwFlags; + + /* This functions are not documneted in MSDN for this struct, = here is directx/reactx alpha blend */ =
+ if ( pMisc.Reserved ) + { + pUserMisc->Reserved =3D (LPVOID) DdAlphaBlt; + } + + if ( pMisc.CreateSurfaceEx ) + { + pUserMisc->CreateSurfaceEx =3D (LPDDHAL_CREATESURFACEEX) D= dCreateSurfaceEx; + } + + if ( pMisc.GetDriverState ) + { + pUserMisc->GetDriverState =3D (LPDDHAL_GETDRIVERSTATE) NtG= diDdGetDriverState; + } + + /* NOTE : pUserMisc->DestroyDDLocal is outdated and are not be= ign tuch */ + + /* Windows XP never repot back the true return value, =
+ * it only report back if we have a driver or not + * ReactOS keep this behoir to be compatible with + * Windows XP + */ + pData->ddRVal =3D retValue; + } + + /* NT Callbacks check and setup for DirectX/ ReactX */ + else if (IsEqualGUID(&pData->guidInfo, &GUID_NTCallbacks)) + { + /* MS does not have DHAL_* version of this callbacks =
+ * so we are force using PDD_* callbacks here =
+ */ + DD_NTCALLBACKS pNtKernel; + PDD_NTCALLBACKS pUserNtKernel =3D (PDD_NTCALLBACKS)pData->lpvD= ata; + =
+ /* Clear internal out buffer and set it up*/ + RtlZeroMemory(&pNtKernel, sizeof(DD_NTCALLBACKS)); + pNtKernel.dwSize =3D sizeof(DD_NTCALLBACKS); + + /* set up internal buffer */ = =
+ pDrvInfoData.lpvData =3D (PVOID)&pNtKernel; =
+ pDrvInfoData.dwExpectedSize =3D sizeof(DD_NTCALLBACKS) ; =
+ =
+ /* Call win32k */ + retValue =3D NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)= &pDrvInfoData); + + pData->dwActualSize =3D sizeof(DD_NTCALLBACKS); + + pUserNtKernel->dwSize =3D sizeof(DD_NTCALLBACKS); + pUserNtKernel->dwFlags =3D pNtKernel.dwFlags; =
+ pUserNtKernel->FreeDriverMemory =3D 0; + =
+ if (pNtKernel.SetExclusiveMode) + { =
+ pUserNtKernel->SetExclusiveMode =3D (PDD_SETEXCLUSIVEMODE)= DdSetExclusiveMode; =
+ } + + if (pNtKernel.FlipToGDISurface) + { + pUserNtKernel->FlipToGDISurface =3D (PDD_FLIPTOGDISURFACE)= DdFlipToGDISurface; + } + + /* Windows XP never repot back the true return value, =
+ * it only report back if we have a driver or not + * ReactOS keep this behoir to be compatible with + * Windows XP + */ + pData->ddRVal =3D retValue; + =
+ + } + + /* D3D Callbacks version 2 check and setup for DirectX/ ReactX */ + else if (IsEqualGUID(&pData->guidInfo, &GUID_D3DCallbacks2)) + { + // FIXME GUID_D3DCallbacks2 + } + + /* D3D Callbacks version 3 check and setup for DirectX/ ReactX */ + else if (IsEqualGUID(&pData->guidInfo, &GUID_D3DCallbacks3)) + { + // FIXME GUID_D3DCallbacks3 + } + + /* D3DParseUnknownCommand Callbacks check and setup for DirectX/ R= eactX */ + else if (IsEqualGUID(&pData->guidInfo, &GUID_D3DParseUnknownComman= dCallback)) + { + // FIXME GUID_D3DParseUnknownCommandCallback + } + + /* MotionComp Callbacks check and setup for DirectX/ ReactX */ + else if (IsEqualGUID(&pData->guidInfo, &GUID_MotionCompCallbacks)) + { + // FIXME GUID_MotionCompCallbacks + } + + /* FIXME VPE2 Callbacks check and setup for DirectX/ ReactX */ + //else if (IsEqualGUID(&pData->guidInfo, &GUID_VPE2Callbacks)) + //{ + // FIXME GUID_VPE2Callbacks + //} + else + { + /* set up internal buffer */ =
+ pDrvInfoData.dwExpectedSize =3D pData->dwExpectedSize; =
+ pDrvInfoData.lpvData =3D pData->lpvData; + + /* We do not cover all callbacks for user mode, they are only = cover by kmode */ + retValue =3D NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)= &pDrvInfoData); + + /* Setup return data */ =
+ pData->dwActualSize =3D pDrvInfoData.dwActualSize; + pData->lpvData =3D pDrvInfoData.lpvData; =
+ /* Windows XP never repot back the true return value, =
+ * it only report back if we have a driver or not + * ReactOS keep this behoir to be compatible with + * Windows XP + */ + pData->ddRVal =3D retValue; + } + + return retValue; } =
=
@@ -1594,3 +1958,4 @@ =
=
=
+