Differences From Artifact [fa72ba923e60f447]:
- File
src/win32/winspool.d
- 2015-04-21 10:46:55 - part of checkin [4e2933c620] on branch trunk - Rebased to the latest verson dmd 2.067. Not yet verified the outcome. (user: kinaba) [annotate]
To Artifact [fe52fc6495d0d1f8]:
- File
src/win32/winspool.d
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
The problem was __gshared. Replacing it with TLS fixed the issue. Remaining problem is that "hack.d"'s CloseHandle hack is not working anymore.
(user: kinaba) [annotate]
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
4 * Windows API header module * 4 * Windows API header module *
5 * * 5 * *
6 * Translated from MinGW Windows headers * 6 * Translated from MinGW Windows headers *
7 * * 7 * *
8 * Placed into public domain * 8 * Placed into public domain *
9 \***********************************************************************/ 9 \***********************************************************************/
10 module win32.winspool; 10 module win32.winspool;
11 pragma(lib, "winspool.lib"); | 11 pragma(lib, "winspool");
12 12
13 private import win32.w32api, win32.windef, win32.wingdi; 13 private import win32.w32api, win32.windef, win32.wingdi;
14 private import win32.winbase; // for SYSTEMTIME 14 private import win32.winbase; // for SYSTEMTIME
15 15
16 // FIXME: clean up Windows version support 16 // FIXME: clean up Windows version support
17 17
18 const DI_CHANNEL=1; 18 const DI_CHANNEL=1;
................................................................................................................................................................................
631 631
632 struct PRINTER_NOTIFY_INFO_DATA { 632 struct PRINTER_NOTIFY_INFO_DATA {
633 WORD Type; 633 WORD Type;
634 WORD Field; 634 WORD Field;
635 DWORD Reserved; 635 DWORD Reserved;
636 DWORD Id; 636 DWORD Id;
637 union _NotifyData { 637 union _NotifyData {
638 DWORD adwData[2]; | 638 DWORD[2] adwData;
639 struct Data { 639 struct Data {
640 DWORD cbBuf; 640 DWORD cbBuf;
641 PVOID pBuf; 641 PVOID pBuf;
642 } 642 }
643 } 643 }
644 _NotifyData NotifyData; 644 _NotifyData NotifyData;
645 } 645 }
646 alias PRINTER_NOTIFY_INFO_DATA* PPRINTER_NOTIFY_INFO_DATA, LPPRINTER_NOTIFY_INFO 646 alias PRINTER_NOTIFY_INFO_DATA* PPRINTER_NOTIFY_INFO_DATA, LPPRINTER_NOTIFY_INFO
647 647
648 struct PRINTER_NOTIFY_INFO { 648 struct PRINTER_NOTIFY_INFO {
649 DWORD Version; 649 DWORD Version;
650 DWORD Flags; 650 DWORD Flags;
651 DWORD Count; 651 DWORD Count;
652 PRINTER_NOTIFY_INFO_DATA aData[1]; | 652 PRINTER_NOTIFY_INFO_DATA[1] aData;
653 } 653 }
654 alias PRINTER_NOTIFY_INFO* PPRINTER_NOTIFY_INFO, LPPRINTER_NOTIFY_INFO; 654 alias PRINTER_NOTIFY_INFO* PPRINTER_NOTIFY_INFO, LPPRINTER_NOTIFY_INFO;
655 655
656 struct FORM_INFO_1A { 656 struct FORM_INFO_1A {
657 DWORD Flags; 657 DWORD Flags;
658 LPSTR pName; 658 LPSTR pName;
659 SIZEL Size; 659 SIZEL Size;
................................................................................................................................................................................
749 BOOL EnumPrintProcessorsA(LPSTR, LPSTR, DWORD, PBYTE, DWORD, PDWORD, PDWORD); 749 BOOL EnumPrintProcessorsA(LPSTR, LPSTR, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
750 BOOL EnumPrintProcessorsW(LPWSTR, LPWSTR, DWORD, PBYTE, DWORD, PDWORD, PDWORD); 750 BOOL EnumPrintProcessorsW(LPWSTR, LPWSTR, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
751 BOOL FindClosePrinterChangeNotification(HANDLE); 751 BOOL FindClosePrinterChangeNotification(HANDLE);
752 HANDLE FindFirstPrinterChangeNotification(HANDLE, DWORD, DWORD, PVOID); 752 HANDLE FindFirstPrinterChangeNotification(HANDLE, DWORD, DWORD, PVOID);
753 HANDLE FindNextPrinterChangeNotification(HANDLE, PDWORD, PVOID, PVOID*); 753 HANDLE FindNextPrinterChangeNotification(HANDLE, PDWORD, PVOID, PVOID*);
754 BOOL FreePrinterNotifyInfo(PPRINTER_NOTIFY_INFO); 754 BOOL FreePrinterNotifyInfo(PPRINTER_NOTIFY_INFO);
755 755
756 static if (_WIN32_WINNT >= 0x0500) { | 756 static if (_WIN32_WINNT >= 0x500) {
757 BOOL GetDefaultPrinterA(LPSTR, LPDWORD); 757 BOOL GetDefaultPrinterA(LPSTR, LPDWORD);
758 BOOL GetDefaultPrinterW(LPWSTR, LPDWORD); 758 BOOL GetDefaultPrinterW(LPWSTR, LPDWORD);
759 } 759 }
760 760
761 BOOL GetFormA(HANDLE, LPSTR, DWORD, PBYTE, DWORD, PDWORD); 761 BOOL GetFormA(HANDLE, LPSTR, DWORD, PBYTE, DWORD, PDWORD);
762 BOOL GetFormW(HANDLE, LPWSTR, DWORD, PBYTE, DWORD, PDWORD); 762 BOOL GetFormW(HANDLE, LPWSTR, DWORD, PBYTE, DWORD, PDWORD);
763 BOOL GetJobA(HANDLE, DWORD, DWORD, PBYTE, DWORD, PDWORD); 763 BOOL GetJobA(HANDLE, DWORD, DWORD, PBYTE, DWORD, PDWORD);
................................................................................................................................................................................
843 alias EnumPortsW EnumPorts; 843 alias EnumPortsW EnumPorts;
844 alias EnumPrinterDataW EnumPrinterData; 844 alias EnumPrinterDataW EnumPrinterData;
845 alias EnumPrinterDriversW EnumPrinterDrivers; 845 alias EnumPrinterDriversW EnumPrinterDrivers;
846 alias EnumPrintersW EnumPrinters; 846 alias EnumPrintersW EnumPrinters;
847 alias EnumPrintProcessorDatatypesW EnumPrintProcessorDatatypes; 847 alias EnumPrintProcessorDatatypesW EnumPrintProcessorDatatypes;
848 alias EnumPrintProcessorsW EnumPrintProcessors; 848 alias EnumPrintProcessorsW EnumPrintProcessors;
849 849
850 static if (_WIN32_WINNT >= 0x0500) { | 850 static if (_WIN32_WINNT >= 0x500) {
851 alias GetDefaultPrinterW GetDefaultPrinter; 851 alias GetDefaultPrinterW GetDefaultPrinter;
852 } 852 }
853 853
854 alias GetFormW GetForm; 854 alias GetFormW GetForm;
855 alias GetJobW GetJob; 855 alias GetJobW GetJob;
856 alias GetPrinterW GetPrinter; 856 alias GetPrinterW GetPrinter;
857 alias GetPrinterDataW GetPrinterData; 857 alias GetPrinterDataW GetPrinterData;
................................................................................................................................................................................
915 alias EnumPortsA EnumPorts; 915 alias EnumPortsA EnumPorts;
916 alias EnumPrinterDataA EnumPrinterData; 916 alias EnumPrinterDataA EnumPrinterData;
917 alias EnumPrinterDriversA EnumPrinterDrivers; 917 alias EnumPrinterDriversA EnumPrinterDrivers;
918 alias EnumPrintersA EnumPrinters; 918 alias EnumPrintersA EnumPrinters;
919 alias EnumPrintProcessorDatatypesA EnumPrintProcessorDatatypes; 919 alias EnumPrintProcessorDatatypesA EnumPrintProcessorDatatypes;
920 alias EnumPrintProcessorsA EnumPrintProcessors; 920 alias EnumPrintProcessorsA EnumPrintProcessors;
921 921
922 static if (_WIN32_WINNT >= 0x0500) { | 922 static if (_WIN32_WINNT >= 0x500) {
923 alias GetDefaultPrinterA GetDefaultPrinter; 923 alias GetDefaultPrinterA GetDefaultPrinter;
924 } 924 }
925 925
926 alias GetFormA GetForm; 926 alias GetFormA GetForm;
927 alias GetJobA GetJob; 927 alias GetJobA GetJob;
928 alias GetPrinterA GetPrinter; 928 alias GetPrinterA GetPrinter;
929 alias GetPrinterDataA GetPrinterData; 929 alias GetPrinterDataA GetPrinterData;