source: Daodan/MinGW/include/lmsvc.h@ 1070

Last change on this file since 1070 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 5.3 KB
Line 
1#ifndef _LMSVC_H
2#define _LMSVC_H
3#if __GNUC__ >=3
4#pragma GCC system_header
5#endif
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10#include <lmsname.h>
11#define SERVICE_DOS_ENCRYPTION TEXT("ENCRYPT")
12#define SERVICE_UNINSTALLED 0
13#define SERVICE_INSTALL_PENDING 1
14#define SERVICE_UNINSTALL_PENDING 2
15#define SERVICE_INSTALLED 3
16#define SERVICE_INSTALL_STATE 3
17#define SERVICE_PAUSE_STATE 18
18#define LM20_SERVICE_ACTIVE 0
19#define LM20_SERVICE_CONTINUE_PENDING 4
20#define LM20_SERVICE_PAUSE_PENDING 8
21#define LM20_SERVICE_PAUSED 18
22#define SERVICE_NOT_UNINSTALLABLE 0
23#define SERVICE_UNINSTALLABLE 16
24#define SERVICE_NOT_PAUSABLE 0
25#define SERVICE_PAUSABLE 32
26#define SERVICE_REDIR_PAUSED 0x700
27#define SERVICE_REDIR_DISK_PAUSED 256
28#define SERVICE_REDIR_PRINT_PAUSED 512
29#define SERVICE_REDIR_COMM_PAUSED 1024
30#define SERVICE_CTRL_INTERROGATE 0
31#define SERVICE_CTRL_PAUSE 1
32#define SERVICE_CTRL_CONTINUE 2
33#define SERVICE_CTRL_UNINSTALL 3
34#define SERVICE_CTRL_REDIR_DISK 1
35#define SERVICE_CTRL_REDIR_PRINT 2
36#define SERVICE_CTRL_REDIR_COMM 4
37#define SERVICE_IP_NO_HINT 0
38#define SERVICE_CCP_NO_HINT 0
39#define SERVICE_IP_QUERY_HINT 0x10000
40#define SERVICE_CCP_QUERY_HINT 0x10000
41#define SERVICE_IP_CHKPT_NUM 255
42#define SERVICE_CCP_CHKPT_NUM 255
43#define SERVICE_IP_WAIT_TIME 0xFF00
44#define SERVICE_CCP_WAIT_TIME 0xFF00
45#define SERVICE_IP_WAITTIME_SHIFT 8
46#define SERVICE_NTIP_WAITTIME_SHIFT 12
47#define UPPER_HINT_MASK 0xFF00
48#define LOWER_HINT_MASK 255
49#define UPPER_GET_HINT_MASK 0xFF00000
50#define LOWER_GET_HINT_MASK 0xFF00
51#define SERVICE_NT_MAXTIME 0xFFFF
52#define SERVICE_RESRV_MASK 0x1FFFF
53#define SERVICE_MAXTIME 255
54#define SERVICE_BASE 3050
55#define SERVICE_UIC_NORMAL 0
56#define SERVICE_UIC_BADPARMVAL (SERVICE_BASE+1)
57#define SERVICE_UIC_MISSPARM (SERVICE_BASE+2)
58#define SERVICE_UIC_UNKPARM (SERVICE_BASE+3)
59#define SERVICE_UIC_RESOURCE (SERVICE_BASE+4)
60#define SERVICE_UIC_CONFIG (SERVICE_BASE+5)
61#define SERVICE_UIC_SYSTEM (SERVICE_BASE+6)
62#define SERVICE_UIC_INTERNAL (SERVICE_BASE+7)
63#define SERVICE_UIC_AMBIGPARM (SERVICE_BASE+8)
64#define SERVICE_UIC_DUPPARM (SERVICE_BASE+9)
65#define SERVICE_UIC_KILL (SERVICE_BASE+10)
66#define SERVICE_UIC_EXEC (SERVICE_BASE+11)
67#define SERVICE_UIC_SUBSERV (SERVICE_BASE+12)
68#define SERVICE_UIC_CONFLPARM (SERVICE_BASE+13)
69#define SERVICE_UIC_FILE (SERVICE_BASE+14)
70#define SERVICE_UIC_M_NULL 0
71#define SERVICE_UIC_M_MEMORY (SERVICE_BASE+20)
72#define SERVICE_UIC_M_DISK (SERVICE_BASE+21)
73#define SERVICE_UIC_M_THREADS (SERVICE_BASE+22)
74#define SERVICE_UIC_M_PROCESSES (SERVICE_BASE+23)
75#define SERVICE_UIC_M_SECURITY (SERVICE_BASE+24)
76#define SERVICE_UIC_M_LANROOT (SERVICE_BASE+25)
77#define SERVICE_UIC_M_REDIR (SERVICE_BASE+26)
78#define SERVICE_UIC_M_SERVER (SERVICE_BASE+27)
79#define SERVICE_UIC_M_SEC_FILE_ERR (SERVICE_BASE+28)
80#define SERVICE_UIC_M_FILES (SERVICE_BASE+29)
81#define SERVICE_UIC_M_LOGS (SERVICE_BASE+30)
82#define SERVICE_UIC_M_LANGROUP (SERVICE_BASE+31)
83#define SERVICE_UIC_M_MSGNAME (SERVICE_BASE+32)
84#define SERVICE_UIC_M_ANNOUNCE (SERVICE_BASE+33)
85#define SERVICE_UIC_M_UAS (SERVICE_BASE+34)
86#define SERVICE_UIC_M_SERVER_SEC_ERR (SERVICE_BASE+35)
87#define SERVICE_UIC_M_WKSTA (SERVICE_BASE+37)
88#define SERVICE_UIC_M_ERRLOG (SERVICE_BASE+38)
89#define SERVICE_UIC_M_FILE_UW (SERVICE_BASE+39)
90#define SERVICE_UIC_M_ADDPAK (SERVICE_BASE+40)
91#define SERVICE_UIC_M_LAZY (SERVICE_BASE+41)
92#define SERVICE_UIC_M_UAS_MACHINE_ACCT (SERVICE_BASE+42)
93#define SERVICE_UIC_M_UAS_SERVERS_NMEMB (SERVICE_BASE+43)
94#define SERVICE_UIC_M_UAS_SERVERS_NOGRP (SERVICE_BASE+44)
95#define SERVICE_UIC_M_UAS_INVALID_ROLE (SERVICE_BASE+45)
96#define SERVICE_UIC_M_NETLOGON_NO_DC (SERVICE_BASE+46)
97#define SERVICE_UIC_M_NETLOGON_DC_CFLCT (SERVICE_BASE+47)
98#define SERVICE_UIC_M_NETLOGON_AUTH (SERVICE_BASE+48)
99#define SERVICE_UIC_M_UAS_PROLOG (SERVICE_BASE+49)
100#define SERVICE2_BASE 5600
101#define SERVICE_UIC_M_NETLOGON_MPATH (SERVICE2_BASE+0)
102#define SERVICE_UIC_M_LSA_MACHINE_ACCT (SERVICE2_BASE+1)
103#define SERVICE_UIC_M_DATABASE_ERROR (SERVICE2_BASE+2)
104
105typedef struct _SERVICE_INFO_0 { LPWSTR svci0_name;} SERVICE_INFO_0,*PSERVICE_INFO_0,* LPSERVICE_INFO_0;
106typedef struct _SERVICE_INFO_1 {
107 LPWSTR svci1_name;
108 DWORD svci1_status;
109 DWORD svci1_code;
110 DWORD svci1_pid;
111} SERVICE_INFO_1,*PSERVICE_INFO_1,* LPSERVICE_INFO_1;
112typedef struct _SERVICE_INFO_2 {
113 LPWSTR svci2_name;
114 DWORD svci2_status;
115 DWORD svci2_code;
116 DWORD svci2_pid;
117 LPWSTR svci2_text;
118 DWORD svci2_specific_error;
119 LPWSTR svci2_display_name;
120} SERVICE_INFO_2,*PSERVICE_INFO_2,* LPSERVICE_INFO_2;
121
122NET_API_STATUS WINAPI NetServiceControl(LPCWSTR,LPCWSTR,DWORD,DWORD,PBYTE*);
123NET_API_STATUS WINAPI NetServiceEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
124NET_API_STATUS WINAPI NetServiceGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*);
125NET_API_STATUS WINAPI NetServiceInstall(LPCWSTR,LPCWSTR,DWORD,LPCWSTR*,PBYTE*);
126#define SERVICE_IP_CODE(t,n) ((long)SERVICE_IP_QUERY_HINT|(long)(n|(t<<SERVICE_IP_WAITTIME_SHIFT)))
127#define SERVICE_CCP_CODE(t,n) ((long)SERVICE_CCP_QUERY_HINT|(long)(n|(t<<SERVICE_IP_WAITTIME_SHIFT)))
128#define SERVICE_UIC_CODE(c,m) ((long)(((long)c<<16)|(long)(USHORT)m))
129#define SERVICE_NT_CCP_CODE(t,n) (((long)SERVICE_CCP_QUERY_HINT)|((long)(n))|(((t)&LOWER_HINT_MASK)<<SERVICE_IP_WAITTIME_SHIFT)|(((t)&UPPER_HINT_MASK)<<SERVICE_NTIP_WAITTIME_SHIFT))
130#define SERVICE_NT_WAIT_GET(c) ((((c)&UPPER_GET_HINT_MASK)>>SERVICE_NTIP_WAITTIME_SHIFT)|(((c)&LOWER_GET_HINT_MASK)>>SERVICE_IP_WAITTIME_SHIFT))
131#ifdef __cplusplus
132}
133#endif
134#endif
Note: See TracBrowser for help on using the repository browser.