source: Daodan/MinGW/include/lmshare.h@ 1131

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

Daodan: Added Windows MinGW and build batch file

File size: 5.1 KB
Line 
1#ifndef _LMSHARE_H
2#define _LMSHARE_H
3#if __GNUC__ >=3
4#pragma GCC system_header
5#endif
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10#include <lmcons.h>
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
28#define STYPE_IPC 3
29#define STYPE_DFS 100
30#define STYPE_SPECIAL 0x80000000
31#define SHI_USES_UNLIMITED (DWORD)(-1)
32#define SESS_GUEST 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
39typedef struct _FILE_INFO_2 { DWORD fi2_id;} FILE_INFO_2,*PFILE_INFO_2,*LPFILE_INFO_2;
40typedef struct _FILE_INFO_3 {
41 DWORD fi3_id;
42 DWORD fi3_permissions;
43 DWORD fi3_num_locks;
44 LPTSTR fi3_pathname;
45 LPTSTR fi3_username;
46} FILE_INFO_3,*PFILE_INFO_3,*LPFILE_INFO_3;
47typedef struct _SHARE_INFO_0 { LPTSTR shi0_netname; } SHARE_INFO_0,*PSHARE_INFO_0,*LPSHARE_INFO_0;
48typedef struct _SHARE_INFO_1 {
49 LPTSTR shi1_netname;
50 DWORD shi1_type;
51 LPTSTR shi1_remark;
52} SHARE_INFO_1,*PSHARE_INFO_1,*LPSHARE_INFO_1;
53typedef struct _SHARE_INFO_2 {
54 LPTSTR shi2_netname;
55 DWORD shi2_type;
56 LPTSTR shi2_remark;
57 DWORD shi2_permissions;
58 DWORD shi2_max_uses;
59 DWORD shi2_current_uses;
60 LPTSTR shi2_path;
61 LPTSTR shi2_passwd;
62} SHARE_INFO_2,*PSHARE_INFO_2,*LPSHARE_INFO_2;
63typedef struct _SHARE_INFO_502 {
64 LPTSTR shi502_netname;
65 DWORD shi502_type;
66 LPTSTR shi502_remark;
67 DWORD shi502_permissions;
68 DWORD shi502_max_uses;
69 DWORD shi502_current_uses;
70 LPTSTR shi502_path;
71 LPTSTR shi502_passwd;
72 DWORD shi502_reserved;
73 PSECURITY_DESCRIPTOR shi502_security_descriptor;
74} SHARE_INFO_502,*PSHARE_INFO_502,*LPSHARE_INFO_502;
75typedef struct _SHARE_INFO_1004 {
76 LPTSTR shi1004_remark;
77} SHARE_INFO_1004,*PSHARE_INFO_1004,*LPSHARE_INFO_1004;
78typedef struct _SHARE_INFO_1006 {
79 DWORD shi1006_max_uses;
80} SHARE_INFO_1006,*PSHARE_INFO_1006,*LPSHARE_INFO_1006;
81typedef struct _SHARE_INFO_1501 {
82 DWORD shi1501_reserved;
83 PSECURITY_DESCRIPTOR shi1501_security_descriptor;
84} SHARE_INFO_1501,*PSHARE_INFO_1501,*LPSHARE_INFO_1501;
85typedef struct _SESSION_INFO_0 { LPWSTR sesi0_cname; } SESSION_INFO_0,*PSESSION_INFO_0,*LPSESSION_INFO_0;
86typedef struct _SESSION_INFO_1 {
87 LPTSTR sesi1_cname;
88 LPTSTR sesi1_username;
89 DWORD sesi1_num_opens;
90 DWORD sesi1_time;
91 DWORD sesi1_idle_time;
92 DWORD sesi1_user_flags;
93} SESSION_INFO_1,*PSESSION_INFO_1,*LPSESSION_INFO_1;
94typedef struct _SESSION_INFO_2 {
95 LPTSTR sesi2_cname;
96 LPTSTR sesi2_username;
97 DWORD sesi2_num_opens;
98 DWORD sesi2_time;
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;
103typedef struct _SESSION_INFO_10 {
104 LPWSTR sesi10_cname;
105 LPWSTR sesi10_username;
106 DWORD sesi10_time;
107 DWORD sesi10_idle_time;
108} SESSION_INFO_10,*PSESSION_INFO_10,*LPSESSION_INFO_10;
109typedef struct _SESSION_INFO_502 {
110 LPWSTR sesi502_cname;
111 LPWSTR sesi502_username;
112 DWORD sesi502_num_opens;
113 DWORD sesi502_time;
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;
119typedef struct _CONNECTION_INFO_0 { DWORD coni0_id; } CONNECTION_INFO_0,*PCONNECTION_INFO_0,*LPCONNECTION_INFO_0;
120typedef struct _CONNECTION_INFO_1 {
121 DWORD coni1_id;
122 DWORD coni1_type;
123 DWORD coni1_num_opens;
124 DWORD coni1_num_users;
125 DWORD coni1_time;
126 LPWSTR coni1_username;
127 LPWSTR coni1_netname;
128} CONNECTION_INFO_1,*PCONNECTION_INFO_1,*LPCONNECTION_INFO_1;
129NET_API_STATUS WINAPI NetShareAdd(LPWSTR,DWORD,PBYTE,PDWORD);
130NET_API_STATUS WINAPI NetShareEnum(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
131NET_API_STATUS WINAPI NetShareEnumSticky(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD resume_handle);
132NET_API_STATUS WINAPI NetShareGetInfo(LPWSTR,LPWSTR,DWORD,PBYTE*);
133NET_API_STATUS WINAPI NetShareSetInfo(LPWSTR,LPWSTR,DWORD,PBYTE,PDWORD);
134NET_API_STATUS WINAPI NetShareDel(LPWSTR,LPWSTR,DWORD);
135NET_API_STATUS WINAPI NetShareDelSticky(LPWSTR,LPWSTR,DWORD);
136NET_API_STATUS WINAPI NetShareCheck(LPWSTR,LPWSTR,PDWORD);
137NET_API_STATUS WINAPI NetSessionEnum(LPWSTR,LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
138NET_API_STATUS WINAPI NetSessionDel(LPWSTR,LPWSTR,LPWSTR);
139NET_API_STATUS WINAPI NetSessionGetInfo(LPWSTR,LPWSTR,LPWSTR,DWORD,PBYTE*);
140NET_API_STATUS WINAPI NetConnectionEnum(LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
141NET_API_STATUS WINAPI NetFileClose(LPWSTR,DWORD);
142NET_API_STATUS WINAPI NetFileEnum(LPWSTR,LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
143NET_API_STATUS WINAPI NetFileGetInfo(LPWSTR,DWORD,DWORD,PBYTE*);
144#ifdef __cplusplus
145}
146#endif
147#endif
Note: See TracBrowser for help on using the repository browser.