>*|typedef struct _devicemode { >*| BCHAR dmDeviceName[CCHDEVICENAME]; 0:32 >*| WORD dmSpecVersion; 32:2 >*| WORD dmDriverVersion; 34:2 >*| WORD dmSize; 36:2 >*| WORD dmDriverExtra; 38:2 >*| DWORD dmFields; 40:4 >*| union { >*| struct { >*| short dmOrientation; 44:2 >*| short dmPaperSize; 46:2 >*| short dmPaperLength; 48:2 >*| short dmPaperWidth; 50:2 >*| short dmScale; 52:2 >*| short dmCopies; 54:2 >*| short dmDefaultSource; 56:2 >*| short dmPrintQuality; 58:2 >*| }; >*| POINTL dmPosition; 44:8 >*| DWORD dmDisplayOrientation; 44:4 >*| DWORD dmDisplayFixedOutput; 44:4 >*| }; >*| short dmColor; 60:2 >*| short dmDuplex; 62:2 >*| short dmYResolution; 64:2 >*| short dmTTOption; 66:2 >*| short dmCollate; 68:2 >*| BYTE dmFormName[CCHFORMNAME]; 70:32 >*| WORD dmLogPixels; 102:2 >*| DWORD dmBitsPerPel; 104:4 >*| DWORD dmPelsWidth; 108:4 >*| DWORD dmPelsHeight; 112:4 >*| union { >*| DWORD dmDisplayFlags; 116:4 >*| DWORD dmNup; 116:4 >*| } >*| DWORD dmDisplayFrequency; 120:4 >*|#if(WINVER >= 0x0400) >*| DWORD dmICMMethod; 124:4 >*| DWORD dmICMIntent; 128:4 >*| DWORD dmMediaType; 132:4 >*| DWORD dmDitherType; 136:4 >*| DWORD dmReserved1; 140:4 >*| DWORD dmReserved2; 144:4 >*|#if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400) >*| DWORD dmPanningWidth; 148:4 >*| DWORD dmPanningHeight; 152:4 >*|#endif >*|#endif /* WINVER >= 0x0400 */ >*|} DEVMODE; >>If DocumentProperties is declared in this way:
>DECLARE INTEGER DocumentProperties IN winspool.drv; > INTEGER hWnd, INTEGER hPrinter, STRING pDeviceName,; > STRING @pDevModeOutput, STRING @pDevModeInput, INTEGER fMode >>the modified device mode is returned in a string buffer. Knowing WORD and DWORD byte ordering it is possible to retrieve all parameters.