home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / WIN_NT / LMAPI.ZIP / H / LMALERT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-07  |  2.6 KB  |  117 lines

  1. /*
  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. Notes:
  15.  
  16.     You must include LmCons.H before this file, since this file depends
  17.     on values defined in LmCons.H.
  18.  
  19.     ALERT.H includes ALERTMSG.H which defines the alert message numbers
  20.  
  21. --*/
  22.  
  23.  
  24. #ifndef _ALERT_
  25. #define _ALERT_
  26.  
  27.  
  28. //
  29. // Function Prototypes
  30. //
  31.  
  32. NET_API_STATUS NET_API_FUNCTION
  33. NetAlertRaise(
  34.     IN LPTSTR AlertEventName,
  35.     IN LPVOID Buffer,
  36.     IN DWORD BufferSize
  37.     );
  38.  
  39. NET_API_STATUS NET_API_FUNCTION
  40. NetAlertRaiseEx(
  41.     IN LPTSTR AlertEventName,
  42.     IN LPVOID VariableInfo,
  43.     IN DWORD VariableInfoSize,
  44.     IN LPTSTR ServiceName
  45.     );
  46.  
  47.  
  48. //
  49. //  Data Structures
  50. //
  51.  
  52. typedef struct _STD_ALERT {
  53.     DWORD  alrt_timestamp;
  54.     TCHAR  alrt_eventname[EVLEN + 1];
  55.     TCHAR  alrt_servicename[SNLEN + 1];
  56. }STD_ALERT, *PSTD_ALERT, *LPSTD_ALERT;
  57.  
  58. typedef struct _ADMIN_OTHER_INFO {
  59.     DWORD  alrtad_errcode;
  60.     DWORD  alrtad_numstrings;
  61. }ADMIN_OTHER_INFO, *PADMIN_OTHER_INFO, *LPADMIN_OTHER_INFO;
  62.  
  63. typedef struct _ERRLOG_OTHER_INFO {
  64.     DWORD  alrter_errcode;
  65.     DWORD  alrter_offset;
  66. }ERRLOG_OTHER_INFO, *PERRLOG_OTHER_INFO, *LPERRLOG_OTHER_INFO;
  67.  
  68. typedef struct _PRINT_OTHER_INFO {
  69.     DWORD  alrtpr_jobid;
  70.     DWORD  alrtpr_status;
  71.     DWORD  alrtpr_submitted;
  72.     DWORD  alrtpr_size;
  73. }PRINT_OTHER_INFO, *PPRINT_OTHER_INFO, *LPPRINT_OTHER_INFO;
  74.  
  75. typedef struct _USER_OTHER_INFO {
  76.     DWORD  alrtus_errcode;
  77.     DWORD  alrtus_numstrings;
  78. }USER_OTHER_INFO, *PUSER_OTHER_INFO, *LPUSER_OTHER_INFO;
  79.  
  80. //
  81. // Special Values and Constants
  82. //
  83.  
  84. //
  85. // Name of mailslot to send alert notifications
  86. //
  87. #define ALERTER_MAILSLOT          TEXT("\\\\.\\MAILSLOT\\Alerter")
  88.  
  89. //
  90. // The following macro gives a pointer to the other_info data.
  91. // It takes an alert structure and returns a pointer to structure
  92. // beyond the standard portion.
  93. //
  94.  
  95. #define ALERT_OTHER_INFO(x)    ((LPBYTE)(x) + sizeof(STD_ALERT))
  96.  
  97. //
  98. // The following macro gives a pointer to the variable-length data.
  99. // It takes a pointer to one of the other-info structs and returns a
  100. // pointer to the variable data portion.
  101. //
  102.  
  103. #define ALERT_VAR_DATA(p)      ((LPBYTE)(p) + sizeof(*p))
  104.  
  105. //
  106. //      Names of standard Microsoft-defined alert events.
  107. //
  108.  
  109. #define ALERT_PRINT_EVENT           TEXT("PRINTING")
  110. #define ALERT_MESSAGE_EVENT         TEXT("MESSAGE")
  111. #define ALERT_ERRORLOG_EVENT        TEXT("ERRORLOG")
  112. #define ALERT_ADMIN_EVENT           TEXT("ADMIN")
  113. #define ALERT_USER_EVENT            TEXT("USER")
  114.  
  115. #endif // _ALERT_
  116. 
  117.