summaryrefslogtreecommitdiffstats
path: root/private/net/svcdlls/alrsvc/almain.h
blob: 1df994aa04d15bd03b4257c0c33576715e3b43fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*++

Copyright (c) 1991 Microsoft Corporation

Module Name:

    almain.h

Abstract:

    Private header file which defines the global data used for communication
    between the service control handler and the rest of the Alerter service.

Author:

    Rita Wong (ritaw) 01-July-1991

Revision History:

--*/

#ifndef _ALMAIN_INCLUDED_
#define _ALMAIN_INCLUDED_

#include "al.h"                   // Common include file for Alerter service
#include <winsvc.h>               // Service control APIs
#include <lmsname.h>              // SERVICE_ALERTER
#include <lmerrlog.h>             // Error log codes

//
// Maximum incoming mailslot message size in number of bytes
//
#define MAX_MAILSLOT_MESSAGE_SIZE       512

//
// Size of error message buffer
//
#define STRINGS_MAXIMUM                 256

//
// Call AlHandleError with the appropriate error condition
//
#define AL_HANDLE_ERROR(ErrorCondition)                        \
    AlHandleError(                                             \
        ErrorCondition,                                        \
        status                                                 \
        );

//
// Call AlShutdownWorkstation with the appropriate termination code
//
#define AL_SHUTDOWN_WORKSTATION(TerminationCode)               \
    AlShutdownWorkstation(                                     \
        TerminationCode                                        \
        );


//-------------------------------------------------------------------//
//                                                                   //
// Type definitions                                                  //
//                                                                   //
//-------------------------------------------------------------------//

typedef struct _AL_GLOBAL_DATA {

    //
    // Alerter service status
    //
    SERVICE_STATUS Status;

    //
    // Handle to set service status
    //
    SERVICE_STATUS_HANDLE StatusHandle;

    //
    // Handle to the Alerter service mailslot which receives alert
    // notifications from the Server service and Spooler
    //
    HANDLE MailslotHandle;

} AL_GLOBAL_DATA, *PAL_GLOBAL_DATA;


#endif // ifndef _ALMAIN_INCLUDED_