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