Do not trust msdn what it say about dwContext in any struct "MSDN : it
is not in use for windows nt", "My note: it is in use for all os, and it
always point to DDRAWI_DIRECTDRAW_GBL.hDD and we doing that. now the
callbacks works in startup process.
Modified: trunk/reactos/lib/ddraw/hal/ddraw.c
_____
Modified: trunk/reactos/lib/ddraw/hal/ddraw.c
--- trunk/reactos/lib/ddraw/hal/ddraw.c 2005-10-29 18:57:45 UTC (rev
18854)
+++ trunk/reactos/lib/ddraw/hal/ddraw.c 2005-10-29 20:06:23 UTC (rev
18855)
@@ -131,10 +131,18 @@
/* Todo add a check see if HalInfo.GetDriverInfo is supported or
not */
+ /* Do not trust msdn what it say about dwContext it is not in
use for
+ windows nt, it is in use for all os, and it always pont to
+ DirectDrawGlobal.hDD
*/
+
DDHAL_GETDRIVERINFODATA DriverInfo;
memset(&DriverInfo,0, sizeof(DDHAL_GETDRIVERINFODATA));
DriverInfo.dwSize = sizeof(DDHAL_GETDRIVERINFODATA);
+ DriverInfo.dwContext = DirectDrawGlobal.hDD;
+
+
+
/* Get ColorControlCallbacks */
DriverInfo.guidInfo = GUID_ColorControlCallbacks;
DriverInfo.lpvData =
&This->DirectDrawGlobal.lpDDCBtmp->HALDDColorControl;
@@ -207,12 +215,12 @@
/* Get the KernelCaps */
- /*
+ /* Need Alloc memmory for lpDDKernelCaps ?? */
DriverInfo.guidInfo = GUID_KernelCaps;
- DriverInfo.lpvData = &misc;
- DriverInfo.dwExpectedSize =
sizeof(DDHAL_DDMISCELLANEOUSCALLBACKS);
+ DriverInfo.lpvData = &This->DirectDrawGlobal.lpDDKernelCaps;
+ DriverInfo.dwExpectedSize = sizeof(DDHAL_DDKERNELCALLBACKS);
This->HalInfo.GetDriverInfo( &DriverInfo);
- */
+
/* Get the MiscellaneousCallbacks */
DriverInfo.guidInfo = GUID_MiscellaneousCallbacks;
@@ -229,8 +237,7 @@
This->HalInfo.GetDriverInfo( &DriverInfo);
*/
- /* Get the MotionCompCallbacks */
-
+ /* Get the MotionCompCallbacks */
DriverInfo.guidInfo = GUID_MotionCompCallbacks;
DriverInfo.lpvData =
&This->DirectDrawGlobal.lpDDCBtmp->HALDDMotionComp;
DriverInfo.dwExpectedSize = sizeof(DDHAL_DDMOTIONCOMPCALLBACKS);
Show replies by date