Author: greatlrd
Date: Sun Dec 3 12:12:35 2006
New Revision: 25027
URL: http://svn.reactos.org/svn/reactos?rev=25027&view=rev
Log:
Fixed so we can optain the HAL again.
Do not trust on ddraw value yo get blindy. it will rest the value you need to optian the HAL and you can not spy on it so easy then.
Modified:
trunk/reactos/dll/directx/ddraw/startup.c
Modified: trunk/reactos/dll/directx/ddraw/startup.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/startup.…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/startup.c (original)
+++ trunk/reactos/dll/directx/ddraw/startup.c Sun Dec 3 12:12:35 2006
@@ -80,6 +80,7 @@
This->lpLcl->lpGbl->lpModeInfo[0].lPitch = (devmode.dmPelsWidth*devmode.dmBitsPerPel)/8;
This->lpLcl->lpGbl->lpModeInfo[0].wRefreshRate = (WORD)devmode.dmDisplayFrequency;
+
if (lpGuid == NULL)
{
devicetypes = 1;
@@ -656,8 +657,6 @@
DeleteDC((HDC)This->lpLcl->hDC);
return DD_FALSE;
}
-
- return DD_OK;
// Do not relase HDC it have been map in kernel mode
// DeleteDC(hdc);
@@ -941,21 +940,14 @@
/* FIXME cleanup */
return DDERR_OUTOFMEMORY;
}
-
-
- /*
- We need manual fill this struct member we can not trust on
- the heap zero the struct if you play to much with directdraw
- in Windows 2000. This is a small workaround of one of directdraw
- bugs
- */
/*
FIXME
read dwAppHackFlags flag from the system register instead for hard code it
*/
This->lpLcl->dwAppHackFlags = 0;
- This->lpLcl->dwErrorMode = 0;
+ /* Do mot inistate this value if we do we can not open the HAL interface */
+ //This->lpLcl->dwErrorMode = 0;
This->lpLcl->dwHotTracking = 0;
This->lpLcl->dwIMEState = 0;
This->lpLcl->dwLocalFlags = DDRAWILCL_DIRECTDRAW7;
@@ -966,7 +958,6 @@
supriese for me
*/
//This->lpLcl->dwObsolete1 = 0;
- This->lpLcl->dwPreferredMode = 0;
This->lpLcl->dwProcessId = 0;
This->lpLcl->dwUnused0 = 0;
This->lpLcl->hD3DInstance = NULL;
@@ -974,14 +965,17 @@
This->lpLcl->hDDVxd = 0;
This->lpLcl->hFocusWnd = 0;
This->lpLcl->hGammaCalibrator = 0;
- This->lpLcl->hWnd = 0;
+ /* Do mot inistate this value if we do we can not open the HAL interface */
+ //This->lpLcl->hWnd = 0;
This->lpLcl->hWndPopup = 0;
This->lpLcl->lpCB = NULL;
This->lpLcl->lpDDCB = NULL;
This->lpLcl->lpDDMore = 0;
This->lpLcl->lpGammaCalibrator = 0;
This->lpLcl->lpGbl = &ddgbl;
- This->lpLcl->lpPrimary = NULL;
+
+ /* Do mot inistate this value if we do we can not open the HAL interface */
+ //This->lpLcl->lpPrimary = NULL;
This->lpLcl->pD3DIUnknown = NULL;
This->lpLcl->pUnkOuter = NULL;
Author: ion
Date: Sun Dec 3 11:08:08 2006
New Revision: 25026
URL: http://svn.reactos.org/svn/reactos?rev=25026&view=rev
Log:
- Clear capacity data buffer before reading it to avoid 0xCCCCCCCC values and manually set failure code if nobody filled it in (a hack, but I don't understand our pre-Nixon-era storage stack to "properly" fix it, so this is good enough and kills off the 0xCCCCCCCC byte non-paged pool allocations.
Modified:
trunk/reactos/drivers/storage/cdrom/cdrom.c
trunk/reactos/drivers/storage/class2/class2.c
Modified: trunk/reactos/drivers/storage/cdrom/cdrom.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/cdrom/cdro…
==============================================================================
--- trunk/reactos/drivers/storage/cdrom/cdrom.c (original)
+++ trunk/reactos/drivers/storage/cdrom/cdrom.c Sun Dec 3 11:08:08 2006
@@ -1409,6 +1409,7 @@
MmBuildMdlForNonPagedPool (SubIrp->MdlAddress);
Srb->DataBuffer = DataBuffer;
+ RtlZeroMemory(DataBuffer, sizeof(READ_CAPACITY_DATA));
IoCallDriver (DeviceExtension->PortDeviceObject,
SubIrp);
return;
Modified: trunk/reactos/drivers/storage/class2/class2.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class2/cla…
==============================================================================
--- trunk/reactos/drivers/storage/class2/class2.c (original)
+++ trunk/reactos/drivers/storage/class2/class2.c Sun Dec 3 11:08:08 2006
@@ -1772,6 +1772,7 @@
}
RtlZeroMemory(&Srb, sizeof(SCSI_REQUEST_BLOCK));
+ RtlZeroMemory(CapacityBuffer, sizeof(READ_CAPACITY_DATA));
Srb.CdbLength = 10;
Srb.TimeOutValue = DeviceExtension->TimeOutValue;
@@ -1787,6 +1788,7 @@
FALSE);
DPRINT("Status: %lx\n", Status);
DPRINT("Srb: %p\n", &Srb);
+ if (CapacityBuffer->BytesPerBlock == 0) Status = STATUS_NOT_SUPPORTED;
if (NT_SUCCESS(Status))
{
SectorSize = (((PUCHAR)&CapacityBuffer->BytesPerBlock)[0] << 24) |
Author: arty
Date: Sun Dec 3 06:49:15 2006
New Revision: 25023
URL: http://svn.reactos.org/svn/reactos?rev=25023&view=rev
Log:
Create a stable branch for working on x86.
Added:
branches/arty-stable/
- copied from r25022, trunk/
Author: greatlrd
Date: Sun Dec 3 03:17:56 2006
New Revision: 25022
URL: http://svn.reactos.org/svn/reactos?rev=25022&view=rev
Log:
fixed a werid crash do not initate the member dwObsolete1 in LPDDRAWI_DIRECTDRAW_LCL
Modified:
trunk/reactos/dll/directx/ddraw/startup.c
Modified: trunk/reactos/dll/directx/ddraw/startup.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/startup.…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/startup.c (original)
+++ trunk/reactos/dll/directx/ddraw/startup.c Sun Dec 3 03:17:56 2006
@@ -960,7 +960,12 @@
This->lpLcl->dwIMEState = 0;
This->lpLcl->dwLocalFlags = DDRAWILCL_DIRECTDRAW7;
This->lpLcl->dwLocalRefCnt = 0;
- This->lpLcl->dwObsolete1 = 0;
+ /*
+ do not rest this flag to NULL it need be unistae for some reason other wise
+ somet thing will crash dwObsolete1 seam being use for something this was a
+ supriese for me
+ */
+ //This->lpLcl->dwObsolete1 = 0;
This->lpLcl->dwPreferredMode = 0;
This->lpLcl->dwProcessId = 0;
This->lpLcl->dwUnused0 = 0;
Author: greatlrd
Date: Sun Dec 3 02:04:11 2006
New Revision: 25021
URL: http://svn.reactos.org/svn/reactos?rev=25021&view=rev
Log:
bug fixed some more info getting same as ms ddraw when you execute DirectDrawCreateEx
fixed some comment in main.c, Comment why memory does not being fill to zero in lest windows 2000 after you play with directdraw.
Modified:
trunk/reactos/dll/directx/ddraw/main.c
trunk/reactos/dll/directx/ddraw/startup.c
Modified: trunk/reactos/dll/directx/ddraw/main.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main.c?r…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/main.c (original)
+++ trunk/reactos/dll/directx/ddraw/main.c Sun Dec 3 02:04:11 2006
@@ -33,9 +33,14 @@
DirectDrawCreate (LPGUID lpGUID,
LPDIRECTDRAW* lplpDD,
LPUNKNOWN pUnkOuter)
-{
+{
+ /*
+ remove this when UML digram are in place
+ this api is finish and is working as it should
+ */
DX_WINDBG_trace();
+ /* check the pointer if it vaild to read from */
if (IsBadWritePtr( lplpDD, sizeof( LPVOID )) )
{
return DDERR_INVALIDPARAMS;
@@ -44,10 +49,11 @@
/* check see if pUnkOuter is null or not */
if (pUnkOuter)
{
- /* we do not use same error code as MS, ms use CLASS_E_NOAGGREGATION */
- return CLASS_E_NOAGGREGATION;
+ /* we are using same error code as MS*/
+ return CLASS_E_NOAGGREGATION;
}
+ /* Create our DirectDraw interface */
return Create_DirectDraw (lpGUID, lplpDD, &IID_IDirectDraw7, FALSE);
}
@@ -63,8 +69,13 @@
REFIID id,
LPUNKNOWN pUnkOuter)
{
+ /*
+ remove this when UML digram are in place
+ this api is finish and is working as it should
+ */
DX_WINDBG_trace();
+ /* check the pointer if it vaild to read from */
if (IsBadWritePtr( lplpDD, sizeof( LPVOID )) )
{
return DDERR_INVALIDPARAMS;
@@ -73,7 +84,7 @@
/* check see if pUnkOuter is null or not */
if (pUnkOuter)
{
- /* we do not use same error code as MS, ms use CLASS_E_NOAGGREGATION */
+ /* we are using same error code as MS*/
return CLASS_E_NOAGGREGATION;
}
@@ -83,6 +94,7 @@
return DDERR_INVALIDPARAMS;
}
+ /* Create our DirectDraw interface */
return Create_DirectDraw (lpGUID, (LPDIRECTDRAW*)lplpDD, id, TRUE);
}
Modified: trunk/reactos/dll/directx/ddraw/startup.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/startup.…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/startup.c (original)
+++ trunk/reactos/dll/directx/ddraw/startup.c Sun Dec 3 02:04:11 2006
@@ -942,9 +942,43 @@
return DDERR_OUTOFMEMORY;
}
+
+ /*
+ We need manual fill this struct member we can not trust on
+ the heap zero the struct if you play to much with directdraw
+ in Windows 2000. This is a small workaround of one of directdraw
+ bugs
+ */
+
+ /*
+ FIXME
+ read dwAppHackFlags flag from the system register instead for hard code it
+ */
+ This->lpLcl->dwAppHackFlags = 0;
+ This->lpLcl->dwErrorMode = 0;
+ This->lpLcl->dwHotTracking = 0;
+ This->lpLcl->dwIMEState = 0;
+ This->lpLcl->dwLocalFlags = DDRAWILCL_DIRECTDRAW7;
+ This->lpLcl->dwLocalRefCnt = 0;
+ This->lpLcl->dwObsolete1 = 0;
+ This->lpLcl->dwPreferredMode = 0;
+ This->lpLcl->dwProcessId = 0;
+ This->lpLcl->dwUnused0 = 0;
+ This->lpLcl->hD3DInstance = NULL;
+ This->lpLcl->hDC = 0;
+ This->lpLcl->hDDVxd = 0;
+ This->lpLcl->hFocusWnd = 0;
+ This->lpLcl->hGammaCalibrator = 0;
+ This->lpLcl->hWnd = 0;
+ This->lpLcl->hWndPopup = 0;
+ This->lpLcl->lpCB = NULL;
+ This->lpLcl->lpDDCB = NULL;
+ This->lpLcl->lpDDMore = 0;
+ This->lpLcl->lpGammaCalibrator = 0;
This->lpLcl->lpGbl = &ddgbl;
- This->lpLcl->dwLocalRefCnt = 0;
- This->lpLcl->dwLocalFlags = DDRAWILCL_DIRECTDRAW7;
+ This->lpLcl->lpPrimary = NULL;
+ This->lpLcl->pD3DIUnknown = NULL;
+ This->lpLcl->pUnkOuter = NULL;
*pIface = (LPDIRECTDRAW)This;
@@ -955,7 +989,7 @@
if (StartDirectDraw((LPDIRECTDRAW*)This, pGUID) == DD_OK);
{
-
+ This->lpLcl->hDD = ddgbl.hDD;
return DD_OK;
}
Author: greatlrd
Date: Sat Dec 2 22:26:55 2006
New Revision: 25019
URL: http://svn.reactos.org/svn/reactos?rev=25019&view=rev
Log:
fixed so only NULL and DDCREATE_HARDWAREONLY are accpect when you linking two directdraw interface.
Modified:
trunk/reactos/dll/directx/ddraw/startup.c
Modified: trunk/reactos/dll/directx/ddraw/startup.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/startup.…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/startup.c (original)
+++ trunk/reactos/dll/directx/ddraw/startup.c Sat Dec 2 22:26:55 2006
@@ -912,12 +912,24 @@
else
{
/* We got the DirectDraw interface alloc and we need create the link */
- LPDDRAWI_DIRECTDRAW_INT newThis;
+
+ LPDDRAWI_DIRECTDRAW_INT newThis;
newThis = DxHeapMemAlloc(sizeof(DDRAWI_DIRECTDRAW_INT));
if (newThis == NULL)
{
return DDERR_OUTOFMEMORY;
}
+
+ /* we need check the GUID lpGUID what type it is */
+ if (pGUID != DDCREATE_HARDWAREONLY)
+ {
+ if (pGUID !=NULL)
+ {
+ This = newThis;
+ return DDERR_INVALIDDIRECTDRAWGUID;
+ }
+ }
+
newThis->lpLink = This;
This = newThis;
}