Better NtUserEnumDisplayDevices stub
Modified: trunk/reactos/subsys/win32k/ntuser/stubs.c

Modified: trunk/reactos/subsys/win32k/ntuser/stubs.c
--- trunk/reactos/subsys/win32k/ntuser/stubs.c	2005-03-16 22:19:12 UTC (rev 14147)
+++ trunk/reactos/subsys/win32k/ntuser/stubs.c	2005-03-16 22:27:47 UTC (rev 14148)
@@ -237,9 +237,24 @@
   PDISPLAY_DEVICE lpDisplayDevice, /* device information */
   DWORD dwFlags ) /* reserved */
 {
-  UNIMPLEMENTED
+  DPRINT1("NtUserEnumDisplayDevices() is UNIMPLEMENTED!\n");
+  if (lpDevice->Length == 0 && iDevNum > 0)
+  {
+  	 /* Only one display device present */
+    return FALSE;
+  }
+  if (lpDisplayDevice->cb < sizeof(DISPLAY_DEVICE))
+    return FALSE;
 
-  return 0;
+  swprintf(lpDisplayDevice->DeviceName, L"\\\\.\\DISPLAY1");
+  swprintf(lpDisplayDevice->DeviceString, L"<Unknown>");
+  lpDisplayDevice->StateFlags = DISPLAY_DEVICE_ATTACHED_TO_DESKTOP
+                              | DISPLAY_DEVICE_MODESPRUNED
+                              | DISPLAY_DEVICE_PRIMARY_DEVICE
+                              | DISPLAY_DEVICE_VGA_COMPATIBLE;
+  lpDisplayDevice->DeviceID[0] = L'0';
+  lpDisplayDevice->DeviceKey[0] = L'0';
+  return TRUE;
 }
 
 DWORD