annotate win32/lmalert.d @ 1:4a9dcbd9e54f

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