|
|
1.1 ! root 1: /*++ BUILD Version: 0003 // Increment this if a change has global effects ! 2: ! 3: Copyright (c) 1991-1993 Microsoft Corporation ! 4: ! 5: Module Name: ! 6: ! 7: alert.h ! 8: ! 9: Abstract: ! 10: ! 11: This file contains structures for communication with the Alerter ! 12: service. ! 13: ! 14: Author: ! 15: ! 16: Dan Lafferty (danl) 12-Mar-1991 ! 17: ! 18: Environment: ! 19: ! 20: User Mode - Win32 ! 21: ! 22: Notes: ! 23: ! 24: You must include LmCons.H before this file, since this file depends ! 25: on values defined in LmCons.H. ! 26: ! 27: ALERT.H includes ALERTMSG.H which defines the alert message numbers ! 28: ! 29: Revision History: ! 30: ! 31: 12-Mar-1991 danl ! 32: Created from LM2.0 header files and NT-LAN API Spec. ! 33: 14-Mar-1991 JohnRo ! 34: Temporarily commented-out include of "alertmsg.h". ! 35: 22-July-1991 ritaw ! 36: Removed NetAlert API prototypes. ! 37: STD_ALERT structure holds offsets to strings rather than string ! 38: pointers. ! 39: Renamed file from lmalert.h back to alert.h and put in the net inc ! 40: directory since this file is private to LAN Man components. ! 41: 24-July-1990 ritaw ! 42: Due to LAN Man 2.0 assumptions, the event and service names of the ! 43: STD_ALERT structure must be embedded strings. All LAN Man 2.0 code ! 44: which write to alert structures can be ported without additional ! 45: changes. ! 46: 04-Apr-1992 JohnRo ! 47: Added NetAlertRaise and NetAlertRaiseEx APIs. ! 48: Changed ALERT_xxx_EVENT equates to be TCHAR strings. ! 49: Fixed definition of LPSTD_ALERT (used by NetAlertRaise API). ! 50: ! 51: --*/ ! 52: ! 53: ! 54: #ifndef _ALERT_ ! 55: #define _ALERT_ ! 56: ! 57: ! 58: #ifdef __cplusplus ! 59: extern "C" { ! 60: #endif ! 61: ! 62: // ! 63: // Function Prototypes ! 64: // ! 65: ! 66: NET_API_STATUS NET_API_FUNCTION ! 67: NetAlertRaise( ! 68: IN LPTSTR AlertEventName, ! 69: IN LPVOID Buffer, ! 70: IN DWORD BufferSize ! 71: ); ! 72: ! 73: NET_API_STATUS NET_API_FUNCTION ! 74: NetAlertRaiseEx( ! 75: IN LPTSTR AlertEventName, ! 76: IN LPVOID VariableInfo, ! 77: IN DWORD VariableInfoSize, ! 78: IN LPTSTR ServiceName ! 79: ); ! 80: ! 81: ! 82: // ! 83: // Data Structures ! 84: // ! 85: ! 86: typedef struct _STD_ALERT { ! 87: DWORD alrt_timestamp; ! 88: TCHAR alrt_eventname[EVLEN + 1]; ! 89: TCHAR alrt_servicename[SNLEN + 1]; ! 90: }STD_ALERT, *PSTD_ALERT, *LPSTD_ALERT; ! 91: ! 92: typedef struct _ADMIN_OTHER_INFO { ! 93: DWORD alrtad_errcode; ! 94: DWORD alrtad_numstrings; ! 95: }ADMIN_OTHER_INFO, *PADMIN_OTHER_INFO, *LPADMIN_OTHER_INFO; ! 96: ! 97: typedef struct _ERRLOG_OTHER_INFO { ! 98: DWORD alrter_errcode; ! 99: DWORD alrter_offset; ! 100: }ERRLOG_OTHER_INFO, *PERRLOG_OTHER_INFO, *LPERRLOG_OTHER_INFO; ! 101: ! 102: typedef struct _PRINT_OTHER_INFO { ! 103: DWORD alrtpr_jobid; ! 104: DWORD alrtpr_status; ! 105: DWORD alrtpr_submitted; ! 106: DWORD alrtpr_size; ! 107: }PRINT_OTHER_INFO, *PPRINT_OTHER_INFO, *LPPRINT_OTHER_INFO; ! 108: ! 109: typedef struct _USER_OTHER_INFO { ! 110: DWORD alrtus_errcode; ! 111: DWORD alrtus_numstrings; ! 112: }USER_OTHER_INFO, *PUSER_OTHER_INFO, *LPUSER_OTHER_INFO; ! 113: ! 114: // ! 115: // Special Values and Constants ! 116: // ! 117: ! 118: // ! 119: // Name of mailslot to send alert notifications ! 120: // ! 121: #define ALERTER_MAILSLOT TEXT("\\\\.\\MAILSLOT\\Alerter") ! 122: ! 123: // ! 124: // The following macro gives a pointer to the other_info data. ! 125: // It takes an alert structure and returns a pointer to structure ! 126: // beyond the standard portion. ! 127: // ! 128: ! 129: #define ALERT_OTHER_INFO(x) ((LPBYTE)(x) + sizeof(STD_ALERT)) ! 130: ! 131: // ! 132: // The following macro gives a pointer to the variable-length data. ! 133: // It takes a pointer to one of the other-info structs and returns a ! 134: // pointer to the variable data portion. ! 135: // ! 136: ! 137: #define ALERT_VAR_DATA(p) ((LPBYTE)(p) + sizeof(*p)) ! 138: ! 139: // ! 140: // Names of standard Microsoft-defined alert events. ! 141: // ! 142: ! 143: #define ALERT_PRINT_EVENT TEXT("PRINTING") ! 144: #define ALERT_MESSAGE_EVENT TEXT("MESSAGE") ! 145: #define ALERT_ERRORLOG_EVENT TEXT("ERRORLOG") ! 146: #define ALERT_ADMIN_EVENT TEXT("ADMIN") ! 147: #define ALERT_USER_EVENT TEXT("USER") ! 148: ! 149: // ! 150: // Bitmap masks for prjob_status field of PRINTJOB. ! 151: // ! 152: ! 153: // 2-7 bits also used in device status ! 154: ! 155: #define PRJOB_QSTATUS 0x3 // Bits 0,1 ! 156: #define PRJOB_DEVSTATUS 0x1fc // 2-8 bits ! 157: #define PRJOB_COMPLETE 0x4 // Bit 2 ! 158: #define PRJOB_INTERV 0x8 // Bit 3 ! 159: #define PRJOB_ERROR 0x10 // Bit 4 ! 160: #define PRJOB_DESTOFFLINE 0x20 // Bit 5 ! 161: #define PRJOB_DESTPAUSED 0x40 // Bit 6 ! 162: #define PRJOB_NOTIFY 0x80 // BIT 7 ! 163: #define PRJOB_DESTNOPAPER 0x100 // BIT 8 ! 164: #define PRJOB_DELETED 0x8000 // BIT 15 ! 165: ! 166: // ! 167: // Values of PRJOB_QSTATUS bits in prjob_status field of PRINTJOB. ! 168: // ! 169: ! 170: #define PRJOB_QS_QUEUED 0 ! 171: #define PRJOB_QS_PAUSED 1 ! 172: #define PRJOB_QS_SPOOLING 2 ! 173: #define PRJOB_QS_PRINTING 3 ! 174: ! 175: ! 176: #ifdef __cplusplus ! 177: } ! 178: #endif ! 179: ! 180: #endif // _ALERT_
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.