xref: /reactos/sdk/include/psdk/lmshare.h (revision c2c66aff)
1 #ifndef _LMSHARE_H
2 #define _LMSHARE_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 #include <lmcons.h>
8 #define SHARE_NETNAME_PARMNUM 1
9 #define SHARE_TYPE_PARMNUM 3
10 #define SHARE_REMARK_PARMNUM 4
11 #define SHARE_PERMISSIONS_PARMNUM 5
12 #define SHARE_MAX_USES_PARMNUM 6
13 #define SHARE_CURRENT_USES_PARMNUM 7
14 #define SHARE_PATH_PARMNUM 8
15 #define SHARE_PASSWD_PARMNUM 9
16 #define SHARE_FILE_SD_PARMNUM 501
17 #define SHARE_REMARK_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SHARE_REMARK_PARMNUM)
18 #define SHARE_MAX_USES_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SHARE_MAX_USES_PARMNUM)
19 #define SHARE_FILE_SD_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SHARE_FILE_SD_PARMNUM)
20 #define SHI1_NUM_ELEMENTS 4
21 #define SHI2_NUM_ELEMENTS 10
22 #define STYPE_DISKTREE 0
23 #define STYPE_PRINTQ 1
24 #define STYPE_DEVICE 2
25 #define STYPE_IPC 3
26 #define STYPE_DFS 100
27 #define STYPE_SPECIAL 0x80000000
28 #define SHI_USES_UNLIMITED (DWORD)(-1)
29 #define SESS_GUEST 1
30 #define SESS_NOENCRYPTION 2
31 #define SESI1_NUM_ELEMENTS 8
32 #define SESI2_NUM_ELEMENTS 9
33 #define PERM_FILE_READ 1
34 #define PERM_FILE_WRITE 2
35 #define PERM_FILE_CREATE 4
36 typedef struct _FILE_INFO_2 { DWORD fi2_id;} FILE_INFO_2,*PFILE_INFO_2,*LPFILE_INFO_2;
37 typedef struct _FILE_INFO_3 {
38 	DWORD fi3_id;
39 	DWORD fi3_permissions;
40 	DWORD fi3_num_locks;
41 	LPTSTR fi3_pathname;
42 	LPTSTR fi3_username;
43 } FILE_INFO_3,*PFILE_INFO_3,*LPFILE_INFO_3;
44 typedef struct _SHARE_INFO_0 { LPTSTR shi0_netname; } SHARE_INFO_0,*PSHARE_INFO_0,*LPSHARE_INFO_0;
45 typedef struct _SHARE_INFO_1 {
46 	LPTSTR shi1_netname;
47 	DWORD shi1_type;
48 	LPTSTR shi1_remark;
49 } SHARE_INFO_1,*PSHARE_INFO_1,*LPSHARE_INFO_1;
50 typedef struct _SHARE_INFO_2 {
51 	LPTSTR shi2_netname;
52 	DWORD shi2_type;
53 	LPTSTR shi2_remark;
54 	DWORD shi2_permissions;
55 	DWORD shi2_max_uses;
56 	DWORD shi2_current_uses;
57 	LPTSTR shi2_path;
58 	LPTSTR shi2_passwd;
59 } SHARE_INFO_2,*PSHARE_INFO_2,*LPSHARE_INFO_2;
60 typedef struct _SHARE_INFO_502 {
61 	LPTSTR shi502_netname;
62 	DWORD shi502_type;
63 	LPTSTR shi502_remark;
64 	DWORD shi502_permissions;
65 	DWORD shi502_max_uses;
66 	DWORD shi502_current_uses;
67 	LPTSTR shi502_path;
68 	LPTSTR shi502_passwd;
69 	DWORD shi502_reserved;
70 	PSECURITY_DESCRIPTOR shi502_security_descriptor;
71 } SHARE_INFO_502,*PSHARE_INFO_502,*LPSHARE_INFO_502;
72 typedef struct _SHARE_INFO_1004 {
73 	LPTSTR shi1004_remark;
74 } SHARE_INFO_1004,*PSHARE_INFO_1004,*LPSHARE_INFO_1004;
75 typedef struct _SHARE_INFO_1006 {
76 	DWORD shi1006_max_uses;
77 } SHARE_INFO_1006,*PSHARE_INFO_1006,*LPSHARE_INFO_1006;
78 typedef struct _SHARE_INFO_1501 {
79 	DWORD shi1501_reserved;
80 	PSECURITY_DESCRIPTOR shi1501_security_descriptor;
81 } SHARE_INFO_1501,*PSHARE_INFO_1501,*LPSHARE_INFO_1501;
82 typedef struct _SESSION_INFO_0 { LPWSTR sesi0_cname; } SESSION_INFO_0,*PSESSION_INFO_0,*LPSESSION_INFO_0;
83 typedef struct _SESSION_INFO_1 {
84 	LPTSTR sesi1_cname;
85 	LPTSTR sesi1_username;
86 	DWORD sesi1_num_opens;
87 	DWORD sesi1_time;
88 	DWORD sesi1_idle_time;
89 	DWORD sesi1_user_flags;
90 } SESSION_INFO_1,*PSESSION_INFO_1,*LPSESSION_INFO_1;
91 typedef struct _SESSION_INFO_2 {
92 	LPTSTR sesi2_cname;
93 	LPTSTR sesi2_username;
94 	DWORD sesi2_num_opens;
95 	DWORD sesi2_time;
96 	DWORD sesi2_idle_time;
97 	DWORD sesi2_user_flags;
98 	LPWSTR sesi2_cltype_name;
99 } SESSION_INFO_2,*PSESSION_INFO_2,*LPSESSION_INFO_2;
100 typedef struct _SESSION_INFO_10 {
101 	LPWSTR sesi10_cname;
102 	LPWSTR sesi10_username;
103 	DWORD sesi10_time;
104 	DWORD sesi10_idle_time;
105 } SESSION_INFO_10,*PSESSION_INFO_10,*LPSESSION_INFO_10;
106 typedef struct _SESSION_INFO_502 {
107 	LPWSTR sesi502_cname;
108 	LPWSTR sesi502_username;
109 	DWORD sesi502_num_opens;
110 	DWORD sesi502_time;
111 	DWORD sesi502_idle_time;
112 	DWORD sesi502_user_flags;
113 	LPWSTR sesi502_cltype_name;
114 	LPWSTR sesi502_transport;
115 } SESSION_INFO_502,*PSESSION_INFO_502,*LPSESSION_INFO_502;
116 typedef struct _CONNECTION_INFO_0 { DWORD coni0_id; } CONNECTION_INFO_0,*PCONNECTION_INFO_0,*LPCONNECTION_INFO_0;
117 typedef struct _CONNECTION_INFO_1 {
118 	DWORD coni1_id;
119 	DWORD coni1_type;
120 	DWORD coni1_num_opens;
121 	DWORD coni1_num_users;
122 	DWORD coni1_time;
123 	LPWSTR coni1_username;
124 	LPWSTR coni1_netname;
125 } CONNECTION_INFO_1,*PCONNECTION_INFO_1,*LPCONNECTION_INFO_1;
126 
127 NET_API_STATUS WINAPI NetShareAdd(LMSTR,DWORD,LPBYTE,LPDWORD);
128 NET_API_STATUS WINAPI NetShareCheck(LMSTR,LMSTR,LPDWORD);
129 NET_API_STATUS WINAPI NetShareDel(LMSTR,LMSTR,DWORD);
130 NET_API_STATUS WINAPI NetShareDelEx(LMSTR,DWORD,LPBYTE);
131 NET_API_STATUS WINAPI NetShareDelSticky(LMSTR,LMSTR,DWORD);
132 NET_API_STATUS WINAPI NetShareEnum(LMSTR,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD);
133 NET_API_STATUS WINAPI NetShareEnumSticky(LMSTR,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD);
134 NET_API_STATUS WINAPI NetShareGetInfo(LMSTR,LMSTR,DWORD,LPBYTE*);
135 NET_API_STATUS WINAPI NetShareSetInfo(LMSTR,LMSTR,DWORD,LPBYTE,LPDWORD);
136 
137 NET_API_STATUS WINAPI NetSessionDel(LMSTR,LMSTR,LMSTR);
138 NET_API_STATUS WINAPI NetSessionEnum(LMSTR,LMSTR,LMSTR,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD);
139 NET_API_STATUS WINAPI NetSessionGetInfo(LMSTR,LMSTR,LMSTR,DWORD,LPBYTE*);
140 
141 NET_API_STATUS WINAPI NetConnectionEnum(LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
142 NET_API_STATUS WINAPI NetFileClose(LPWSTR,DWORD);
143 NET_API_STATUS WINAPI NetFileEnum(LMSTR,LMSTR,LMSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD_PTR);
144 NET_API_STATUS WINAPI NetFileGetInfo(LPWSTR,DWORD,DWORD,PBYTE*);
145 #ifdef __cplusplus
146 }
147 #endif
148 #endif
149