|
|
1.1 ! root 1: /******************************************************************************\ ! 2: * ! 3: * ENUMPRT.H ! 4: * ! 5: \******************************************************************************/ ! 6: ! 7: ! 8: ! 9: /******************************************************************************\ ! 10: * SYMBOLIC CONSTANTS ! 11: \******************************************************************************/ ! 12: ! 13: #define MAX_NUM_PRT_ATTRIBUTES 4 ! 14: #define MAX_NUM_PRT_PRIORITIES 4 ! 15: #define MAX_NUM_PRT_STATUS 3 ! 16: ! 17: ! 18: ! 19: /******************************************************************************\ ! 20: * GLOBAL VARIABLES ! 21: \******************************************************************************/ ! 22: ! 23: static LPSTR enumstr[] = { "PRINTER_INFO_1", ! 24: " pDescription: \t%s", ! 25: " pName: \t%s", ! 26: " pComment: \t%s", ! 27: "PRINTER_INFO_2", ! 28: " pServerName: \t%s", // 5 ! 29: " pPrinterName: \t%s", ! 30: " pShareName: \t%s", ! 31: " pPortName: \t%s", ! 32: " pDriverName: \t%s", ! 33: " pComment: \t%s", // 10 ! 34: " pLocation: \t%s", ! 35: " pDevMode \t", ! 36: " dmDeviceName: \t%s", ! 37: " dmSpecVersion: \t", ! 38: " dmDriverVersion: \t", // 15 ! 39: " dmSize: \t", ! 40: " dmDriverExtra: \t", ! 41: " dmFields: \t", ! 42: " dmOrientation: \t", ! 43: " dmPaperSize: \t", // 20 ! 44: " dmPaperLength: \t", ! 45: " dmPaperWidth: \t", ! 46: " dmScale: \t", ! 47: " dmCopies: \t", ! 48: " dmDefaultSource: \t", // 25 ! 49: " dmPrintQuality: \t", ! 50: " dmColor: \t", ! 51: " pSepFile: \t%s", ! 52: " pPrintProcessor: \t%s", ! 53: " pDatatype: \t%s", // 30 ! 54: " pParameters: \t%s", ! 55: " Attributes: \t", ! 56: " Priority: \t%s", ! 57: " Priority: \t%ld", ! 58: " DefaultPriority: \t%ld", // 35 ! 59: " StartTime: \t%ld", ! 60: " UntilTime: \t%ld", ! 61: " Status: \t", ! 62: " cJobs: \t%ld", ! 63: " AveragePPM: \t%ld" }; // 40 ! 64: ! 65: LOOKUPENTRY attributes[] = ! 66: ! 67: { { PRINTER_ATTRIBUTE_QUEUED, 0, "PRINTER_ATTRIBUTE_QUEUED " }, ! 68: { PRINTER_ATTRIBUTE_DIRECT, 0, "PRINTER_ATTRIBUTE_DIRECT " }, ! 69: { PRINTER_ATTRIBUTE_DEFAULT, 0, "PRINTER_ATTRIBUTE_DEFAULT " }, ! 70: { PRINTER_ATTRIBUTE_SHARED, 0, "PRINTER_ATTRIBUTE_SHARED " } }; ! 71: ! 72: LOOKUPENTRY priorities[] = ! 73: ! 74: { { NO_PRIORITY, 0, "NO_PRIORITY " }, ! 75: { MAX_PRIORITY, 0, "MAX_PRIORITY " }, ! 76: { MIN_PRIORITY, 0, "MIN_PRIORITY " }, ! 77: { DEF_PRIORITY, 0, "DEF_PRIORITY " } }; ! 78: ! 79: LOOKUPENTRY status[] = ! 80: ! 81: { { PRINTER_STATUS_PAUSED, 0, "PRINTER_STATUS_PAUSED " }, ! 82: { PRINTER_STATUS_ERROR, 0, "PRINTER_STATUS_ERROR " }, ! 83: { PRINTER_STATUS_PENDING_DELETION, 0, "PRINTER_STATUS_PENDING_DELETION "}}; ! 84: ! 85: ! 86: ! 87: /******************************************************************************\ ! 88: * MACROS ! 89: \******************************************************************************/ ! 90: ! 91: #define outstr(fmt,arg) wsprintf(buf,fmt,arg?arg:"(null)"); \ ! 92: SendDlgItemMessage (hDlg, DID_LISTBOX, \ ! 93: LB_INSERTSTRING, (UINT)-1, \ ! 94: (LONG) buf); ! 95: ! 96: #define outstr2(buf) SendDlgItemMessage (hDlg, DID_LISTBOX, \ ! 97: LB_INSERTSTRING, (UINT)-1, \ ! 98: (LONG) buf); ! 99: ! 100: #define outnum(fmt,arg) wsprintf(buf,fmt,arg); \ ! 101: SendDlgItemMessage (hDlg, DID_LISTBOX, \ ! 102: LB_INSERTSTRING, (UINT)-1, \ ! 103: (LONG) buf); ! 104: ! 105: ! 106: ! 107: /******************************************************************************\ ! 108: * FUNCTION PROTOTYPES ! 109: \******************************************************************************/ ! 110: ! 111: void SetEnumPrtDlgFields (HWND, DWORD, LPPRINTER_INFO_1, LPPRINTER_INFO_2);
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.