4 #pragma GCC system_header
11 #define SHARE_NETNAME_PARMNUM 1
12 #define SHARE_TYPE_PARMNUM 3
13 #define SHARE_REMARK_PARMNUM 4
14 #define SHARE_PERMISSIONS_PARMNUM 5
15 #define SHARE_MAX_USES_PARMNUM 6
16 #define SHARE_CURRENT_USES_PARMNUM 7
17 #define SHARE_PATH_PARMNUM 8
18 #define SHARE_PASSWD_PARMNUM 9
19 #define SHARE_FILE_SD_PARMNUM 501
20 #define SHARE_REMARK_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SHARE_REMARK_PARMNUM)
21 #define SHARE_MAX_USES_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SHARE_MAX_USES_PARMNUM)
22 #define SHARE_FILE_SD_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SHARE_FILE_SD_PARMNUM)
23 #define SHI1_NUM_ELEMENTS 4
24 #define SHI2_NUM_ELEMENTS 10
25 #define STYPE_DISKTREE 0
26 #define STYPE_PRINTQ 1
27 #define STYPE_DEVICE 2
30 #define STYPE_SPECIAL 0x80000000
31 #define SHI_USES_UNLIMITED (DWORD)(-1)
33 #define SESS_NOENCRYPTION 2
34 #define SESI1_NUM_ELEMENTS 8
35 #define SESI2_NUM_ELEMENTS 9
36 #define PERM_FILE_READ 1
37 #define PERM_FILE_WRITE 2
38 #define PERM_FILE_CREATE 4
39 typedef struct _FILE_INFO_2
{ DWORD fi2_id
;} FILE_INFO_2
,*PFILE_INFO_2
,*LPFILE_INFO_2
;
40 typedef struct _FILE_INFO_3
{
42 DWORD fi3_permissions
;
46 } FILE_INFO_3
,*PFILE_INFO_3
,*LPFILE_INFO_3
;
47 typedef struct _SHARE_INFO_0
{ LPTSTR shi0_netname
; } SHARE_INFO_0
,*PSHARE_INFO_0
,*LPSHARE_INFO_0
;
48 typedef struct _SHARE_INFO_1
{
52 } SHARE_INFO_1
,*PSHARE_INFO_1
,*LPSHARE_INFO_1
;
53 typedef struct _SHARE_INFO_2
{
57 DWORD shi2_permissions
;
59 DWORD shi2_current_uses
;
62 } SHARE_INFO_2
,*PSHARE_INFO_2
,*LPSHARE_INFO_2
;
63 typedef struct _SHARE_INFO_502
{
64 LPTSTR shi502_netname
;
67 DWORD shi502_permissions
;
68 DWORD shi502_max_uses
;
69 DWORD shi502_current_uses
;
72 DWORD shi502_reserved
;
73 PSECURITY_DESCRIPTOR shi502_security_descriptor
;
74 } SHARE_INFO_502
,*PSHARE_INFO_502
,*LPSHARE_INFO_502
;
75 typedef struct _SHARE_INFO_1004
{
76 LPTSTR shi1004_remark
;
77 } SHARE_INFO_1004
,*PSHARE_INFO_1004
,*LPSHARE_INFO_1004
;
78 typedef struct _SHARE_INFO_1006
{
79 DWORD shi1006_max_uses
;
80 } SHARE_INFO_1006
,*PSHARE_INFO_1006
,*LPSHARE_INFO_1006
;
81 typedef struct _SHARE_INFO_1501
{
82 DWORD shi1501_reserved
;
83 PSECURITY_DESCRIPTOR shi1501_security_descriptor
;
84 } SHARE_INFO_1501
,*PSHARE_INFO_1501
,*LPSHARE_INFO_1501
;
85 typedef struct _SESSION_INFO_0
{ LPWSTR sesi0_cname
; } SESSION_INFO_0
,*PSESSION_INFO_0
,*LPSESSION_INFO_0
;
86 typedef struct _SESSION_INFO_1
{
88 LPTSTR sesi1_username
;
89 DWORD sesi1_num_opens
;
91 DWORD sesi1_idle_time
;
92 DWORD sesi1_user_flags
;
93 } SESSION_INFO_1
,*PSESSION_INFO_1
,*LPSESSION_INFO_1
;
94 typedef struct _SESSION_INFO_2
{
96 LPTSTR sesi2_username
;
97 DWORD sesi2_num_opens
;
99 DWORD sesi2_idle_time
;
100 DWORD sesi2_user_flags
;
101 LPWSTR sesi2_cltype_name
;
102 } SESSION_INFO_2
,*PSESSION_INFO_2
,*LPSESSION_INFO_2
;
103 typedef struct _SESSION_INFO_10
{
105 LPWSTR sesi10_username
;
107 DWORD sesi10_idle_time
;
108 } SESSION_INFO_10
,*PSESSION_INFO_10
,*LPSESSION_INFO_10
;
109 typedef struct _SESSION_INFO_502
{
110 LPWSTR sesi502_cname
;
111 LPWSTR sesi502_username
;
112 DWORD sesi502_num_opens
;
114 DWORD sesi502_idle_time
;
115 DWORD sesi502_user_flags
;
116 LPWSTR sesi502_cltype_name
;
117 LPWSTR sesi502_transport
;
118 } SESSION_INFO_502
,*PSESSION_INFO_502
,*LPSESSION_INFO_502
;
119 typedef struct _CONNECTION_INFO_0
{ DWORD coni0_id
; } CONNECTION_INFO_0
,*PCONNECTION_INFO_0
,*LPCONNECTION_INFO_0
;
120 typedef struct _CONNECTION_INFO_1
{
123 DWORD coni1_num_opens
;
124 DWORD coni1_num_users
;
126 LPWSTR coni1_username
;
127 LPWSTR coni1_netname
;
128 } CONNECTION_INFO_1
,*PCONNECTION_INFO_1
,*LPCONNECTION_INFO_1
;
129 NET_API_STATUS WINAPI
NetShareAdd(LPWSTR
,DWORD
,PBYTE
,PDWORD
);
130 NET_API_STATUS WINAPI
NetShareEnum(LPWSTR
,DWORD
,PBYTE
*,DWORD
,PDWORD
,PDWORD
,PDWORD
);
131 NET_API_STATUS WINAPI
NetShareEnumSticky(LPWSTR
,DWORD
,PBYTE
*,DWORD
,PDWORD
,PDWORD
,PDWORD resume_handle
);
132 NET_API_STATUS WINAPI
NetShareGetInfo(LPWSTR
,LPWSTR
,DWORD
,PBYTE
*);
133 NET_API_STATUS WINAPI
NetShareSetInfo(LPWSTR
,LPWSTR
,DWORD
,PBYTE
,PDWORD
);
134 NET_API_STATUS WINAPI
NetShareDel(LPWSTR
,LPWSTR
,DWORD
);
135 NET_API_STATUS WINAPI
NetShareDelSticky(LPWSTR
,LPWSTR
,DWORD
);
136 NET_API_STATUS WINAPI
NetShareCheck(LPWSTR
,LPWSTR
,PDWORD
);
137 NET_API_STATUS WINAPI
NetSessionEnum(LPWSTR
,LPWSTR
,LPWSTR
,DWORD
,PBYTE
*,DWORD
,PDWORD
,PDWORD
,PDWORD
);
138 NET_API_STATUS WINAPI
NetSessionDel(LPWSTR
,LPWSTR
,LPWSTR
);
139 NET_API_STATUS WINAPI
NetSessionGetInfo(LPWSTR
,LPWSTR
,LPWSTR
,DWORD
,PBYTE
*);
140 NET_API_STATUS WINAPI
NetConnectionEnum(LPWSTR
,LPWSTR
,DWORD
,PBYTE
*,DWORD
,PDWORD
,PDWORD
,PDWORD
);
141 NET_API_STATUS WINAPI
NetFileClose(LPWSTR
,DWORD
);
142 NET_API_STATUS WINAPI
NetFileEnum(LPWSTR
,LPWSTR
,LPWSTR
,DWORD
,PBYTE
*,DWORD
,PDWORD
,PDWORD
,PDWORD
);
143 NET_API_STATUS WINAPI
NetFileGetInfo(LPWSTR
,DWORD
,DWORD
,PBYTE
*);