Work around lack of MSG_PEEK
Modified: trunk/reactos/lib/wininet/http.c
_____
Modified: trunk/reactos/lib/wininet/http.c
--- trunk/reactos/lib/wininet/http.c 2005-12-09 21:50:59 UTC (rev
20023)
+++ trunk/reactos/lib/wininet/http.c 2005-12-09 21:51:50 UTC (rev
20024)
@@ -2024,7 +2024,11 @@
/*
* HACK peek at the buffer
*/
+#if 0
+ /* This is Wine code, we don't support MSG_PEEK yet so we have to
do it
+ a bit different */
NETCON_recv(&lpwhr->netConnection, buffer, buflen, MSG_PEEK, &rc);
+#endif
/*
* We should first receive 'HTTP/1.x nnn OK' where nnn is the
status code.
@@ -2033,6 +2037,9 @@
memset(buffer, 0, MAX_REPLY_LEN);
if (!NETCON_getNextLine(&lpwhr->netConnection, bufferA, &buflen))
goto lend;
+#if 1
+ rc = buflen;
+#endif
MultiByteToWideChar( CP_ACP, 0, bufferA, buflen, buffer,
MAX_REPLY_LEN );
/* regenerate raw headers */
@@ -2073,6 +2080,9 @@
{
LPWSTR * pFieldAndValue;
+#if 1
+ rc += buflen;
+#endif
TRACE("got line %s, now interpreting\n",
debugstr_a(bufferA));
MultiByteToWideChar( CP_ACP, 0, bufferA, buflen, buffer,
MAX_REPLY_LEN );
take care of NtGdiDdDeleteDirectDrawObject Attempted to lock object
0x8d1f9ad8 that is deleted! problem.
Modified: trunk/reactos/subsys/win32k/ntddraw/ddraw.c
_____
Modified: trunk/reactos/subsys/win32k/ntddraw/ddraw.c
--- trunk/reactos/subsys/win32k/ntddraw/ddraw.c 2005-12-09 20:58:32 UTC
(rev 20018)
+++ trunk/reactos/subsys/win32k/ntddraw/ddraw.c 2005-12-09 21:25:39 UTC
(rev 20019)
@@ -210,7 +210,7 @@
if (pDirectDraw == NULL)
{
- DPRINT1("NtGdiDdGetDriverInfo DDHAL_DRIVER_NOTHANDLED\n");
+ DPRINT1("Can not lock DirectDraw handle \n");
return DDHAL_DRIVER_NOTHANDLED;
}
@@ -799,7 +799,11 @@
)
{
DPRINT1("NtGdiDdDeleteSurfaceObject\n");
- return GDIOBJ_FreeObj(hSurface, GDI_OBJECT_TYPE_DD_SURFACE);
+ /* FIXME add right GDI_OBJECT_TYPE_ for everthing for now
+ we are using same type */
+ /* return GDIOBJ_FreeObj(hSurface, GDI_OBJECT_TYPE_DD_SURFACE);
*/
+ return GDIOBJ_FreeObj(hSurface, GDI_OBJECT_TYPE_DIRECTDRAW);
+
}
Take care of one BSOD in NtGdiDdCreateDirectDrawObject, it is not
correct fix, it is a work around, the HDC can be NULL. it prevent some
bsod for my new test apps for directx
Modified: trunk/reactos/subsys/win32k/ntddraw/ddraw.c
_____
Modified: trunk/reactos/subsys/win32k/ntddraw/ddraw.c
--- trunk/reactos/subsys/win32k/ntddraw/ddraw.c 2005-12-09 19:28:04 UTC
(rev 20016)
+++ trunk/reactos/subsys/win32k/ntddraw/ddraw.c 2005-12-09 20:40:52 UTC
(rev 20017)
@@ -48,7 +48,13 @@
RtlZeroMemory(&palette_callbacks, sizeof(DD_PALETTECALLBACKS));
palette_callbacks.dwSize = sizeof(DD_PALETTECALLBACKS);
-
+ /* FIXME hdc can be zero for d3d9 */
+ /* we need create it, if in that case */
+ if (hdc == NULL)
+ {
+ return NULL;
+ }
+
DC *pDC = DC_LockDc(hdc);
if (!pDC)
return NULL;