PATCH for w32api

"Silver Blade" <lists-JCKMKWeByS2j5a8ZAWZ3aFpr/1R2p/[email protected]> Thu, 14 Aug 2003 19:53:34 +0100
Newsgroups gmane.comp.gnu.mingw.patches
Message-ID <03ef01c36295$5eef5c20$0400a8c0@mercury>
This patch includes the previous patch I submitted, as it doesn't seem to
have been applied yet. If it does get applied, you'll just need the winddk.h
portion of the patch.

If I'm doing this the wrong way, someone please tell me!

Regards

Andrew Greenwood


Index: wingdi.h
===================================================================
RCS file: /cvs/src/src/winsup/w32api/include/wingdi.h,v
retrieving revision 1.27
diff -u -r1.27 wingdi.h
--- wingdi.h 5 Jun 2003 00:49:27 -0000 1.27
+++ wingdi.h 14 Aug 2003 18:44:05 -0000
@@ -1295,73 +1295,107 @@
  SHORT caColorfulness;
  SHORT caRedGreenTint;
 } COLORADJUSTMENT,*LPCOLORADJUSTMENT;
-typedef struct _devicemodeA {
- BYTE dmDeviceName[CCHDEVICENAME];
- WORD dmSpecVersion;
- WORD dmDriverVersion;
- WORD dmSize;
- WORD dmDriverExtra;
- DWORD dmFields;
- short dmOrientation;
- short dmPaperSize;
- short dmPaperLength;
- short dmPaperWidth;
- short dmScale;
- short dmCopies;
- short dmDefaultSource;
- short dmPrintQuality;
- short dmColor;
- short dmDuplex;
- short dmYResolution;
- short dmTTOption;
- short dmCollate;
- BYTE dmFormName[CCHFORMNAME];
- WORD dmLogPixels;
- DWORD dmBitsPerPel;
- DWORD dmPelsWidth;
- DWORD dmPelsHeight;
- DWORD dmDisplayFlags;
- DWORD dmDisplayFrequency;
- DWORD dmICMMethod;
- DWORD dmICMIntent;
- DWORD dmMediaType;
- DWORD dmDitherType;
- DWORD dmICCManufacturer;
- DWORD dmICCModel;
+typedef struct _devicemodeA {
+  BYTE   dmDeviceName[CCHDEVICENAME];
+  WORD   dmSpecVersion;
+  WORD   dmDriverVersion;
+  WORD   dmSize;
+  WORD   dmDriverExtra;
+  DWORD  dmFields;
+  union {
+    struct {
+      short dmOrientation;
+      short dmPaperSize;
+      short dmPaperLength;
+      short dmPaperWidth;
+      short dmScale;
+      short dmCopies;
+      short dmDefaultSource;
+      short dmPrintQuality;
+    };
+    POINTL dmPosition;
+    DWORD  dmDisplayOrientation;
+    DWORD  dmDisplayFixedOutput;
+  };
+
+  short  dmColor;
+  short  dmDuplex;
+  short  dmYResolution;
+  short  dmTTOption;
+  short  dmCollate;
+  BYTE   dmFormName[CCHFORMNAME];
+  WORD   dmLogPixels;
+  DWORD  dmBitsPerPel;
+  DWORD  dmPelsWidth;
+  DWORD  dmPelsHeight;
+  union {
+    DWORD  dmDisplayFlags;
+    DWORD  dmNup;
+  };
+  DWORD  dmDisplayFrequency;
+#if(WINVER >= 0x0400)
+  DWORD  dmICMMethod;
+  DWORD  dmICMIntent;
+  DWORD  dmMediaType;
+  DWORD  dmDitherType;
+  DWORD  dmReserved1;
+  DWORD  dmReserved2;
+#if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
+  DWORD  dmPanningWidth;
+  DWORD  dmPanningHeight;
+#endif
+#endif /* WINVER >= 0x0400 */
 } DEVMODEA,*LPDEVMODEA,*PDEVMODEA;
-typedef struct _devicemodeW {
- WCHAR dmDeviceName[CCHDEVICENAME];
- WORD dmSpecVersion;
- WORD dmDriverVersion;
- WORD dmSize;
- WORD dmDriverExtra;
- DWORD dmFields;
- short dmOrientation;
- short dmPaperSize;
- short dmPaperLength;
- short dmPaperWidth;
- short dmScale;
- short dmCopies;
- short dmDefaultSource;
- short dmPrintQuality;
- short dmColor;
- short dmDuplex;
- short dmYResolution;
- short dmTTOption;
- short dmCollate;
- WCHAR dmFormName[CCHFORMNAME];
- WORD dmLogPixels;
- DWORD dmBitsPerPel;
- DWORD dmPelsWidth;
- DWORD dmPelsHeight;
- DWORD dmDisplayFlags;
- DWORD dmDisplayFrequency;
- DWORD dmICMMethod;
- DWORD dmICMIntent;
- DWORD dmMediaType;
- DWORD dmDitherType;
- DWORD dmICCManufacturer;
- DWORD dmICCModel;
+typedef struct _devicemodeW {
+  WCHAR   dmDeviceName[CCHDEVICENAME];
+  WORD   dmSpecVersion;
+  WORD   dmDriverVersion;
+  WORD   dmSize;
+  WORD   dmDriverExtra;
+  DWORD  dmFields;
+  union {
+    struct {
+      short dmOrientation;
+      short dmPaperSize;
+      short dmPaperLength;
+      short dmPaperWidth;
+      short dmScale;
+      short dmCopies;
+      short dmDefaultSource;
+      short dmPrintQuality;
+    };
+    POINTL dmPosition;
+    DWORD  dmDisplayOrientation;
+    DWORD  dmDisplayFixedOutput;
+  };
+
+  short  dmColor;
+  short  dmDuplex;
+  short  dmYResolution;
+  short  dmTTOption;
+  short  dmCollate;
+  WCHAR  dmFormName[CCHFORMNAME];
+  WORD   dmLogPixels;
+  DWORD  dmBitsPerPel;
+  DWORD  dmPelsWidth;
+  DWORD  dmPelsHeight;
+  union {
+    DWORD  dmDisplayFlags;
+    DWORD  dmNup;
+  };
+  DWORD  dmDisplayFrequency;
+#if(WINVER >= 0x0400)
+  DWORD  dmICMMethod;
+  DWORD  dmICMIntent;
+  DWORD  dmMediaType;
+  DWORD  dmDitherType;
+  DWORD  dmReserved1;
+  DWORD  dmReserved2;
+#if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
+  DWORD  dmPanningWidth;
+  DWORD  dmPanningHeight;
+#endif
+#endif /* WINVER >= 0x0400 */
 } DEVMODEW,*LPDEVMODEW,*PDEVMODEW;
 typedef struct tagDIBSECTION {
  BITMAP dsBm;
Index: ddk/ntapi.h
===================================================================
RCS file: /cvs/src/src/winsup/w32api/include/ddk/ntapi.h,v
retrieving revision 1.6
diff -u -r1.6 ntapi.h
--- ddk/ntapi.h 22 Jul 2003 22:21:27 -0000 1.6
+++ ddk/ntapi.h 14 Aug 2003 18:44:06 -0000
@@ -1952,6 +1952,7 @@
  LPC_DEBUG_EVENT,
  LPC_ERROR_EVENT,
  LPC_CONNECTION_REQUEST,
+ LPC_CONNECTION_REFUSED,
   LPC_MAXIMUM
 } LPC_TYPE;

Index: ddk/winddk.h
===================================================================
RCS file: /cvs/src/src/winsup/w32api/include/ddk/winddk.h,v
retrieving revision 1.12
diff -u -r1.12 winddk.h
--- ddk/winddk.h 1 Aug 2003 01:06:26 -0000 1.12
+++ ddk/winddk.h 14 Aug 2003 18:44:07 -0000
@@ -1012,6 +1012,28 @@
 #define DEVICE_TYPE_FROM_CTL_CODE(ctl) (((ULONG) (ctl & 0xffff0000)) >> 16)


+enum
+{
+   IRP_NOCACHE = 0x1,
+   IRP_PAGING_IO = 0x2,
+   IRP_MOUNT_COMPLETION = 0x2,
+   IRP_SYNCHRONOUS_API = 0x4,
+   IRP_ASSOCIATED_IRP = 0x8,
+   IRP_BUFFERED_IO = 0x10,
+   IRP_DEALLOCATE_BUFFER = 0x20,
+   IRP_INPUT_OPERATION = 0x40,
+   IRP_SYNCHRONOUS_PAGING_IO = 0x40,
+   IRP_CREATE_OPERATION = 0x80,
+   IRP_READ_OPERATION = 0x100,
+   IRP_WRITE_OPERATION = 0x200,
+   IRP_CLOSE_OPERATION = 0x400,
+   IRP_DEFER_IO_COMPLETION = 0x800,
+   IRP_OB_QUERY_NAME = 0x1000,
+   IRP_HOLD_DEVICE_QUEUE = 0x2000,
+   IRP_RETRY_IO_COMPLETION = 0x4000
+};
+
+
 typedef struct _DRIVE_LAYOUT_INFORMATION_MBR {
   ULONG  Signature;
 } DRIVE_LAYOUT_INFORMATION_MBR, *PDRIVE_LAYOUT_INFORMATION_MBR;
winddk wingdi ntapi.patch (application/octet-stream, 5.7 KB)
Index: wingdi.h
===================================================================
RCS file: /cvs/src/src/winsup/w32api/include/wingdi.h,v
retrieving revision 1.27
diff -u -r1.27 wingdi.h
--- wingdi.h	5 Jun 2003 00:49:27 -0000	1.27
+++ wingdi.h	14 Aug 2003 18:44:05 -0000
@@ -1295,73 +1295,107 @@
 	SHORT	caColorfulness;
 	SHORT	caRedGreenTint;
 } COLORADJUSTMENT,*LPCOLORADJUSTMENT;
-typedef struct _devicemodeA {
-	BYTE dmDeviceName[CCHDEVICENAME];
-	WORD dmSpecVersion;
-	WORD dmDriverVersion;
-	WORD dmSize;
-	WORD dmDriverExtra;
-	DWORD dmFields;
-	short dmOrientation;
-	short dmPaperSize;
-	short dmPaperLength;
-	short dmPaperWidth;
-	short dmScale;
-	short dmCopies;
-	short dmDefaultSource;
-	short dmPrintQuality;
-	short dmColor;
-	short dmDuplex;
-	short dmYResolution;
-	short dmTTOption;
-	short dmCollate;
-	BYTE dmFormName[CCHFORMNAME];
-	WORD dmLogPixels;
-	DWORD dmBitsPerPel;
-	DWORD dmPelsWidth;
-	DWORD dmPelsHeight;
-	DWORD dmDisplayFlags;
-	DWORD dmDisplayFrequency;
-	DWORD dmICMMethod;
-	DWORD dmICMIntent;
-	DWORD dmMediaType;
-	DWORD dmDitherType;
-	DWORD dmICCManufacturer;
-	DWORD dmICCModel;
+typedef struct _devicemodeA { 
+  BYTE   dmDeviceName[CCHDEVICENAME]; 
+  WORD   dmSpecVersion; 
+  WORD   dmDriverVersion; 
+  WORD   dmSize; 
+  WORD   dmDriverExtra; 
+  DWORD  dmFields; 
+  union {
+    struct {
+      short dmOrientation;
+      short dmPaperSize;
+      short dmPaperLength;
+      short dmPaperWidth;
+      short dmScale; 
+      short dmCopies; 
+      short dmDefaultSource; 
+      short dmPrintQuality; 
+    };
+    POINTL dmPosition;
+    DWORD  dmDisplayOrientation;
+    DWORD  dmDisplayFixedOutput;
+  };
+
+  short  dmColor; 
+  short  dmDuplex; 
+  short  dmYResolution; 
+  short  dmTTOption; 
+  short  dmCollate; 
+  BYTE   dmFormName[CCHFORMNAME]; 
+  WORD   dmLogPixels; 
+  DWORD  dmBitsPerPel; 
+  DWORD  dmPelsWidth; 
+  DWORD  dmPelsHeight; 
+  union {
+    DWORD  dmDisplayFlags; 
+    DWORD  dmNup;
+  };
+  DWORD  dmDisplayFrequency; 
+#if(WINVER >= 0x0400) 
+  DWORD  dmICMMethod;
+  DWORD  dmICMIntent;
+  DWORD  dmMediaType;
+  DWORD  dmDitherType;
+  DWORD  dmReserved1;
+  DWORD  dmReserved2;
+#if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
+  DWORD  dmPanningWidth;
+  DWORD  dmPanningHeight;
+#endif
+#endif /* WINVER >= 0x0400 */
 } DEVMODEA,*LPDEVMODEA,*PDEVMODEA;
-typedef struct _devicemodeW {
-	WCHAR dmDeviceName[CCHDEVICENAME];
-	WORD dmSpecVersion;
-	WORD dmDriverVersion;
-	WORD dmSize;
-	WORD dmDriverExtra;
-	DWORD dmFields;
-	short dmOrientation;
-	short dmPaperSize;
-	short dmPaperLength;
-	short dmPaperWidth;
-	short dmScale;
-	short dmCopies;
-	short dmDefaultSource;
-	short dmPrintQuality;
-	short dmColor;
-	short dmDuplex;
-	short dmYResolution;
-	short dmTTOption;
-	short dmCollate;
-	WCHAR dmFormName[CCHFORMNAME];
-	WORD dmLogPixels;
-	DWORD dmBitsPerPel;
-	DWORD dmPelsWidth;
-	DWORD dmPelsHeight;
-	DWORD dmDisplayFlags;
-	DWORD dmDisplayFrequency;
-	DWORD dmICMMethod;
-	DWORD dmICMIntent;
-	DWORD dmMediaType;
-	DWORD dmDitherType;
-	DWORD dmICCManufacturer;
-	DWORD dmICCModel;
+typedef struct _devicemodeW { 
+  WCHAR   dmDeviceName[CCHDEVICENAME]; 
+  WORD   dmSpecVersion; 
+  WORD   dmDriverVersion; 
+  WORD   dmSize; 
+  WORD   dmDriverExtra; 
+  DWORD  dmFields; 
+  union {
+    struct {
+      short dmOrientation;
+      short dmPaperSize;
+      short dmPaperLength;
+      short dmPaperWidth;
+      short dmScale; 
+      short dmCopies; 
+      short dmDefaultSource; 
+      short dmPrintQuality; 
+    };
+    POINTL dmPosition;
+    DWORD  dmDisplayOrientation;
+    DWORD  dmDisplayFixedOutput;
+  };
+
+  short  dmColor; 
+  short  dmDuplex; 
+  short  dmYResolution; 
+  short  dmTTOption; 
+  short  dmCollate; 
+  WCHAR  dmFormName[CCHFORMNAME]; 
+  WORD   dmLogPixels; 
+  DWORD  dmBitsPerPel; 
+  DWORD  dmPelsWidth; 
+  DWORD  dmPelsHeight; 
+  union {
+    DWORD  dmDisplayFlags; 
+    DWORD  dmNup;
+  };
+  DWORD  dmDisplayFrequency; 
+#if(WINVER >= 0x0400) 
+  DWORD  dmICMMethod;
+  DWORD  dmICMIntent;
+  DWORD  dmMediaType;
+  DWORD  dmDitherType;
+  DWORD  dmReserved1;
+  DWORD  dmReserved2;
+#if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
+  DWORD  dmPanningWidth;
+  DWORD  dmPanningHeight;
+#endif
+#endif /* WINVER >= 0x0400 */
 } DEVMODEW,*LPDEVMODEW,*PDEVMODEW;
 typedef struct tagDIBSECTION {
 	BITMAP dsBm;
Index: ddk/ntapi.h
===================================================================
RCS file: /cvs/src/src/winsup/w32api/include/ddk/ntapi.h,v
retrieving revision 1.6
diff -u -r1.6 ntapi.h
--- ddk/ntapi.h	22 Jul 2003 22:21:27 -0000	1.6
+++ ddk/ntapi.h	14 Aug 2003 18:44:06 -0000
@@ -1952,6 +1952,7 @@
 	LPC_DEBUG_EVENT,
 	LPC_ERROR_EVENT,
 	LPC_CONNECTION_REQUEST,
+	LPC_CONNECTION_REFUSED,
   LPC_MAXIMUM
 } LPC_TYPE;
 
Index: ddk/winddk.h
===================================================================
RCS file: /cvs/src/src/winsup/w32api/include/ddk/winddk.h,v
retrieving revision 1.12
diff -u -r1.12 winddk.h
--- ddk/winddk.h	1 Aug 2003 01:06:26 -0000	1.12
+++ ddk/winddk.h	14 Aug 2003 18:44:07 -0000
@@ -1012,6 +1012,28 @@
 #define DEVICE_TYPE_FROM_CTL_CODE(ctl) (((ULONG) (ctl & 0xffff0000)) >> 16)
 
 
+enum
+{
+   IRP_NOCACHE = 0x1,
+   IRP_PAGING_IO = 0x2,
+   IRP_MOUNT_COMPLETION = 0x2,
+   IRP_SYNCHRONOUS_API = 0x4,
+   IRP_ASSOCIATED_IRP = 0x8,
+   IRP_BUFFERED_IO = 0x10,
+   IRP_DEALLOCATE_BUFFER = 0x20,
+   IRP_INPUT_OPERATION = 0x40,
+   IRP_SYNCHRONOUS_PAGING_IO = 0x40,
+   IRP_CREATE_OPERATION = 0x80,
+   IRP_READ_OPERATION = 0x100,
+   IRP_WRITE_OPERATION = 0x200,
+   IRP_CLOSE_OPERATION = 0x400,
+   IRP_DEFER_IO_COMPLETION = 0x800,
+   IRP_OB_QUERY_NAME = 0x1000,
+   IRP_HOLD_DEVICE_QUEUE = 0x2000,
+   IRP_RETRY_IO_COMPLETION = 0x4000
+};
+
+
 typedef struct _DRIVE_LAYOUT_INFORMATION_MBR {
   ULONG  Signature;
 } DRIVE_LAYOUT_INFORMATION_MBR, *PDRIVE_LAYOUT_INFORMATION_MBR;