source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/lmshare.h@ 1172

Last change on this file since 1172 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 7.3 KB
Line 
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef _LMSHARE_
7#define _LMSHARE_
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13#include <lmcons.h>
14
15 NET_API_STATUS WINAPI NetShareAdd(LMSTR servername,DWORD level,LPBYTE buf,LPDWORD parm_err);
16 NET_API_STATUS WINAPI NetShareEnum(LMSTR servername,DWORD level,LPBYTE *bufptr,DWORD prefmaxlen,LPDWORD entriesread,LPDWORD totalentries,LPDWORD resume_handle);
17 NET_API_STATUS WINAPI NetShareEnumSticky(LMSTR servername,DWORD level,LPBYTE *bufptr,DWORD prefmaxlen,LPDWORD entriesread,LPDWORD totalentries,LPDWORD resume_handle);
18 NET_API_STATUS WINAPI NetShareGetInfo(LMSTR servername,LMSTR netname,DWORD level,LPBYTE *bufptr);
19 NET_API_STATUS WINAPI NetShareSetInfo(LMSTR servername,LMSTR netname,DWORD level,LPBYTE buf,LPDWORD parm_err);
20 NET_API_STATUS WINAPI NetShareDel(LMSTR servername,LMSTR netname,DWORD reserved);
21 NET_API_STATUS WINAPI NetShareDelSticky(LMSTR servername,LMSTR netname,DWORD reserved);
22 NET_API_STATUS WINAPI NetShareCheck(LMSTR servername,LMSTR device,LPDWORD type);
23
24 typedef struct _SHARE_INFO_0 {
25 LMSTR shi0_netname;
26 } SHARE_INFO_0,*PSHARE_INFO_0,*LPSHARE_INFO_0;
27
28 typedef struct _SHARE_INFO_1 {
29 LMSTR shi1_netname;
30 DWORD shi1_type;
31 LMSTR shi1_remark;
32 } SHARE_INFO_1,*PSHARE_INFO_1,*LPSHARE_INFO_1;
33
34 typedef struct _SHARE_INFO_2 {
35 LMSTR shi2_netname;
36 DWORD shi2_type;
37 LMSTR shi2_remark;
38 DWORD shi2_permissions;
39 DWORD shi2_max_uses;
40 DWORD shi2_current_uses;
41 LMSTR shi2_path;
42 LMSTR shi2_passwd;
43 } SHARE_INFO_2,*PSHARE_INFO_2,*LPSHARE_INFO_2;
44
45 typedef struct _SHARE_INFO_501 {
46 LMSTR shi501_netname;
47 DWORD shi501_type;
48 LMSTR shi501_remark;
49 DWORD shi501_flags;
50 } SHARE_INFO_501,*PSHARE_INFO_501,*LPSHARE_INFO_501;
51
52 typedef struct _SHARE_INFO_502 {
53 LMSTR shi502_netname;
54 DWORD shi502_type;
55 LMSTR shi502_remark;
56 DWORD shi502_permissions;
57 DWORD shi502_max_uses;
58 DWORD shi502_current_uses;
59 LMSTR shi502_path;
60 LMSTR shi502_passwd;
61 DWORD shi502_reserved;
62 PSECURITY_DESCRIPTOR shi502_security_descriptor;
63 } SHARE_INFO_502,*PSHARE_INFO_502,*LPSHARE_INFO_502;
64
65 typedef struct _SHARE_INFO_1004 {
66 LMSTR shi1004_remark;
67 } SHARE_INFO_1004,*PSHARE_INFO_1004,*LPSHARE_INFO_1004;
68
69 typedef struct _SHARE_INFO_1005 {
70 DWORD shi1005_flags;
71 } SHARE_INFO_1005,*PSHARE_INFO_1005,*LPSHARE_INFO_1005;
72
73 typedef struct _SHARE_INFO_1006 {
74 DWORD shi1006_max_uses;
75 } SHARE_INFO_1006,*PSHARE_INFO_1006,*LPSHARE_INFO_1006;
76
77 typedef struct _SHARE_INFO_1501 {
78 DWORD shi1501_reserved;
79 PSECURITY_DESCRIPTOR shi1501_security_descriptor;
80 } SHARE_INFO_1501,*PSHARE_INFO_1501,*LPSHARE_INFO_1501;
81
82#define SHARE_NETNAME_PARMNUM 1
83#define SHARE_TYPE_PARMNUM 3
84#define SHARE_REMARK_PARMNUM 4
85#define SHARE_PERMISSIONS_PARMNUM 5
86#define SHARE_MAX_USES_PARMNUM 6
87#define SHARE_CURRENT_USES_PARMNUM 7
88#define SHARE_PATH_PARMNUM 8
89#define SHARE_PASSWD_PARMNUM 9
90#define SHARE_FILE_SD_PARMNUM 501
91
92#define SHARE_REMARK_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + SHARE_REMARK_PARMNUM)
93#define SHARE_MAX_USES_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + SHARE_MAX_USES_PARMNUM)
94#define SHARE_FILE_SD_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + SHARE_FILE_SD_PARMNUM)
95
96#define SHI1_NUM_ELEMENTS 4
97#define SHI2_NUM_ELEMENTS 10
98
99#define STYPE_DISKTREE 0
100#define STYPE_PRINTQ 1
101#define STYPE_DEVICE 2
102#define STYPE_IPC 3
103
104#define STYPE_TEMPORARY 0x40000000
105#define STYPE_SPECIAL 0x80000000
106
107#define SHI_USES_UNLIMITED (DWORD)-1
108
109#define SHI1005_FLAGS_DFS 0x01
110#define SHI1005_FLAGS_DFS_ROOT 0x02
111
112#define CSC_MASK 0x30
113
114#define CSC_CACHE_MANUAL_REINT 0x00
115#define CSC_CACHE_AUTO_REINT 0x10
116#define CSC_CACHE_VDO 0x20
117#define CSC_CACHE_NONE 0x30
118
119#define SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS 0x0100
120#define SHI1005_FLAGS_FORCE_SHARED_DELETE 0x0200
121#define SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING 0x0400
122#define SHI1005_FLAGS_ACCESS_BASED_DIRECTORY_ENUM 0x0800
123
124#define SHI1005_VALID_FLAGS_SET (CSC_MASK| SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS| SHI1005_FLAGS_FORCE_SHARED_DELETE| SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING| SHI1005_FLAGS_ACCESS_BASED_DIRECTORY_ENUM)
125#endif
126
127#ifndef _LMSESSION_
128#define _LMSESSION_
129
130 NET_API_STATUS WINAPI NetSessionEnum(LMSTR servername,LMSTR UncClientName,LMSTR username,DWORD level,LPBYTE *bufptr,DWORD prefmaxlen,LPDWORD entriesread,LPDWORD totalentries,LPDWORD resume_handle);
131 NET_API_STATUS WINAPI NetSessionDel(LMSTR servername,LMSTR UncClientName,LMSTR username);
132 NET_API_STATUS WINAPI NetSessionGetInfo(LMSTR servername,LMSTR UncClientName,LMSTR username,DWORD level,LPBYTE *bufptr);
133
134 typedef struct _SESSION_INFO_0 {
135 LMSTR sesi0_cname;
136 } SESSION_INFO_0,*PSESSION_INFO_0,*LPSESSION_INFO_0;
137
138 typedef struct _SESSION_INFO_1 {
139 LMSTR sesi1_cname;
140 LMSTR sesi1_username;
141 DWORD sesi1_num_opens;
142 DWORD sesi1_time;
143 DWORD sesi1_idle_time;
144 DWORD sesi1_user_flags;
145 } SESSION_INFO_1,*PSESSION_INFO_1,*LPSESSION_INFO_1;
146
147 typedef struct _SESSION_INFO_2 {
148 LMSTR sesi2_cname;
149 LMSTR sesi2_username;
150 DWORD sesi2_num_opens;
151 DWORD sesi2_time;
152 DWORD sesi2_idle_time;
153 DWORD sesi2_user_flags;
154 LMSTR sesi2_cltype_name;
155 } SESSION_INFO_2,*PSESSION_INFO_2,*LPSESSION_INFO_2;
156
157 typedef struct _SESSION_INFO_10 {
158 LMSTR sesi10_cname;
159 LMSTR sesi10_username;
160 DWORD sesi10_time;
161 DWORD sesi10_idle_time;
162 } SESSION_INFO_10,*PSESSION_INFO_10,*LPSESSION_INFO_10;
163
164 typedef struct _SESSION_INFO_502 {
165 LMSTR sesi502_cname;
166 LMSTR sesi502_username;
167 DWORD sesi502_num_opens;
168 DWORD sesi502_time;
169 DWORD sesi502_idle_time;
170 DWORD sesi502_user_flags;
171 LMSTR sesi502_cltype_name;
172 LMSTR sesi502_transport;
173 } SESSION_INFO_502,*PSESSION_INFO_502,*LPSESSION_INFO_502;
174
175#define SESS_GUEST 0x00000001
176#define SESS_NOENCRYPTION 0x00000002
177
178#define SESI1_NUM_ELEMENTS 8
179#define SESI2_NUM_ELEMENTS 9
180#endif
181
182#ifndef _LMCONNECTION_
183
184#define _LMCONNECTION_
185
186 NET_API_STATUS WINAPI NetConnectionEnum(LMSTR servername,LMSTR qualifier,DWORD level,LPBYTE *bufptr,DWORD prefmaxlen,LPDWORD entriesread,LPDWORD totalentries,LPDWORD resume_handle);
187
188 typedef struct _CONNECTION_INFO_0 {
189 DWORD coni0_id;
190 } CONNECTION_INFO_0,*PCONNECTION_INFO_0,*LPCONNECTION_INFO_0;
191
192 typedef struct _CONNECTION_INFO_1 {
193 DWORD coni1_id;
194 DWORD coni1_type;
195 DWORD coni1_num_opens;
196 DWORD coni1_num_users;
197 DWORD coni1_time;
198 LMSTR coni1_username;
199 LMSTR coni1_netname;
200 } CONNECTION_INFO_1,*PCONNECTION_INFO_1,*LPCONNECTION_INFO_1;
201#endif
202
203#ifndef _LMFILE_
204#define _LMFILE_
205
206 NET_API_STATUS WINAPI NetFileClose(LMSTR servername,DWORD fileid);
207 NET_API_STATUS WINAPI NetFileEnum(LMSTR servername,LMSTR basepath,LMSTR username,DWORD level,LPBYTE *bufptr,DWORD prefmaxlen,LPDWORD entriesread,LPDWORD totalentries,PDWORD_PTR resume_handle);
208 NET_API_STATUS WINAPI NetFileGetInfo(LMSTR servername,DWORD fileid,DWORD level,LPBYTE *bufptr);
209
210 typedef struct _FILE_INFO_2 {
211 DWORD fi2_id;
212 } FILE_INFO_2,*PFILE_INFO_2,*LPFILE_INFO_2;
213
214 typedef struct _FILE_INFO_3 {
215 DWORD fi3_id;
216 DWORD fi3_permissions;
217 DWORD fi3_num_locks;
218 LMSTR fi3_pathname;
219 LMSTR fi3_username;
220 } FILE_INFO_3,*PFILE_INFO_3,*LPFILE_INFO_3;
221
222#define PERM_FILE_READ 0x1
223#define PERM_FILE_WRITE 0x2
224#define PERM_FILE_CREATE 0x4
225
226#ifdef __cplusplus
227}
228#endif
229#endif
Note: See TracBrowser for help on using the repository browser.