1 /***********************************************************************\ 2 * lmalert.d * 3 * * 4 * Windows API header module * 5 * * 6 * Translated from MinGW Windows headers * 7 * * 8 * Placed into public domain * 9 \***********************************************************************/ 10 module win32.lmalert; 11 pragma(lib, "netapi32.lib"); 12 13 private import win32.lmcons, win32.windef; 14 15 const TCHAR[] 16 ALERTER_MAILSLOT = `\\.\MAILSLOT\Alerter`, 17 ALERT_PRINT_EVENT = "PRINTING", 18 ALERT_MESSAGE_EVENT = "MESSAGE", 19 ALERT_ERRORLOG_EVENT = "ERRORLOG", 20 ALERT_ADMIN_EVENT = "ADMIN", 21 ALERT_USER_EVENT = "USER"; 22 //MACRO #define ALERT_OTHER_INFO(x) ((PBYTE)(x)+sizeof(STD_ALERT)) 23 24 //MACRO #define ALERT_VAR_DATA(p) ((PBYTE)(p)+sizeof(*p)) 25 26 const PRJOB_QSTATUS = 3; 27 const PRJOB_DEVSTATUS = 508; 28 const PRJOB_COMPLETE = 4; 29 const PRJOB_INTERV = 8; 30 const PRJOB_ = 16; 31 const PRJOB_DESTOFFLINE = 32; 32 const PRJOB_DESTPAUSED = 64; 33 const PRJOB_NOTIFY = 128; 34 const PRJOB_DESTNOPAPER = 256; 35 const PRJOB_DELETED = 32768; 36 const PRJOB_QS_QUEUED = 0; 37 const PRJOB_QS_PAUSED = 1; 38 const PRJOB_QS_SPOOLING = 2; 39 const PRJOB_QS_PRINTING = 3; 40 41 struct ADMIN_OTHER_INFO{ 42 DWORD alrtad_errcode; 43 DWORD alrtad_numstrings; 44 } 45 alias ADMIN_OTHER_INFO* PADMIN_OTHER_INFO, LPADMIN_OTHER_INFO; 46 47 struct STD_ALERT{ 48 DWORD alrt_timestamp; 49 TCHAR alrt_eventname[EVLEN+1]; 50 TCHAR alrt_servicename[SNLEN+1]; 51 } 52 alias STD_ALERT* PSTD_ALERT, LPSTD_ALERT; 53 54 struct ERRLOG_OTHER_INFO{ 55 DWORD alrter_errcode; 56 DWORD alrter_offset; 57 } 58 alias ERRLOG_OTHER_INFO* PERRLOG_OTHER_INFO, LPERRLOG_OTHER_INFO; 59 60 struct PRINT_OTHER_INFO{ 61 DWORD alrtpr_jobid; 62 DWORD alrtpr_status; 63 DWORD alrtpr_submitted; 64 DWORD alrtpr_size; 65 } 66 alias PRINT_OTHER_INFO* PPRINT_OTHER_INFO, LPPRINT_OTHER_INFO; 67 68 struct USER_OTHER_INFO{ 69 DWORD alrtus_errcode; 70 DWORD alrtus_numstrings; 71 } 72 alias USER_OTHER_INFO* PUSER_OTHER_INFO, LPUSER_OTHER_INFO; 73 74 extern (Windows) { 75 NET_API_STATUS NetAlertRaise(LPCWSTR,PVOID,DWORD); 76 NET_API_STATUS NetAlertRaiseEx(LPCWSTR,PVOID,DWORD,LPCWSTR); 77 }