Author: greatlrd
Date: Mon Mar 5 18:10:26 2007
New Revision: 25998
URL:
http://svn.reactos.org/svn/reactos?rev=25998&view=rev
Log:
tempary fix for CreateDC("DISPLAY","DISPLAY",....) until I figout some
thing better
Modified:
trunk/reactos/subsystems/win32/win32k/objects/dc.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Mon Mar 5 18:10:26 2007
@@ -811,6 +811,26 @@
RtlInitUnicodeString(&StdDriver, L"DISPLAY");
+ if (Driver != NULL)
+ {
+ DPRINT1("NAME Driver: %wZ\n", Driver);
+ }
+ else
+ {
+ DPRINT1("NAME Driver: NULL\n", Driver);
+ }
+
+
+ if (Driver != NULL)
+ {
+ DPRINT1("NAME Device: %wZ\n", Device);
+ }
+ else
+ {
+ DPRINT1("NAME Device: NULL\n", Device);
+ }
+
+
if (NULL == Driver || 0 == RtlCompareUnicodeString(Driver, &StdDriver, TRUE))
{
if (CreateAsIC)
@@ -853,7 +873,8 @@
if (Driver != NULL && Driver->Buffer != NULL)
{
- DPRINT("NAME: %wZ\n", Driver); // FIXME: Should not crash if NULL
+ if (Driver!=NULL)
+ DPRINT1("NAME: %wZ\n", Driver);
}
/* Allocate a DC object */
@@ -962,9 +983,12 @@
Status = IntSafeCopyUnicodeString(&SafeDevice, Device);
if(!NT_SUCCESS(Status))
{
- RtlFreeUnicodeString(&SafeDriver);
- SetLastNtError(Status);
- return NULL;
+ /* FIXME workaround for a real bug */
+ // RtlFreeUnicodeString(&SafeDriver);
+ // SetLastNtError(Status);
+ // DPRINT1("fail3\n");
+ // return NULL;
+ Device = NULL;
}
}