|
|
1.1 root 1: /*++ BUILD Version: 0001 // Increment this if a change has global effects
2:
3: Copyright (c) 1991-1993 Microsoft Corporation
4:
5: Module Name:
6:
7: lmuse.c
8:
9: Abstract:
10:
11: This file contains structures, function prototypes, and definitions
12: for the NetUse API.
13:
14: Author:
15:
16: Dan Lafferty (danl) 10-Mar-1991
17:
18:
19: Environment:
20:
21: User Mode - Win32
22: Portable to any flat, 32-bit environment. (Uses Win32 typedefs.)
23: Requires ANSI C extensions: slash-slash comments, long external names.
24:
25: Notes:
26:
27: You must include NETCONS.H before this file, since this file depends
28: on values defined in NETCONS.H.
29:
30: Revision History:
31:
32: 10-Mar-1991 danl
33: Created from LM2.0 header files and NT-LAN API Spec.
34: 14-Mar-91 JohnRo
35: Put OPTIONAL keywords back in.
36: 19-Mar-91 ritaw
37: Added info structure for level 2, and indicies to the parameters in
38: this info structure.
39: 10-Apr-1991 JohnRo
40: Clarify argument names for NetpSetParmError use.
41: 12-Jun-1991 JohnRo
42: Changed to use UNICODE types. Clarify parameter names.
43:
44: --*/
45:
46: #ifndef _LMUSE_
47: #define _LMUSE_
48:
49: #ifdef __cplusplus
50: extern "C" {
51: #endif
52:
53: #include <lmuseflg.h> // Deletion force level flags
54:
55: //
56: // Function Prototypes
57: //
58:
59: NET_API_STATUS NET_API_FUNCTION
60: NetUseAdd (
61: IN LPTSTR UncServerName OPTIONAL,
62: IN DWORD Level,
63: IN LPBYTE Buf,
64: OUT LPDWORD ParmError OPTIONAL
65: );
66:
67: NET_API_STATUS NET_API_FUNCTION
68: NetUseDel (
69: IN LPTSTR UncServerName OPTIONAL,
70: IN LPTSTR UseName,
71: IN DWORD ForceCond
72: );
73:
74: NET_API_STATUS NET_API_FUNCTION
75: NetUseEnum (
76: IN LPTSTR UncServerName OPTIONAL,
77: IN DWORD Level,
78: OUT LPBYTE *BufPtr,
79: IN DWORD PreferedMaximumSize,
80: OUT LPDWORD EntriesRead,
81: OUT LPDWORD TotalEntries,
82: IN OUT LPDWORD ResumeHandle
83: );
84:
85: NET_API_STATUS NET_API_FUNCTION
86: NetUseGetInfo (
87: IN LPTSTR UncServerName OPTIONAL,
88: IN LPTSTR UseName,
89: IN DWORD Level,
90: OUT LPBYTE *BufPtr
91: );
92:
93: //
94: // Data Structures
95: //
96:
97: typedef struct _USE_INFO_0 {
98: LPTSTR ui0_local;
99: LPTSTR ui0_remote;
100: }USE_INFO_0, *PUSE_INFO_0, *LPUSE_INFO_0;
101:
102: typedef struct _USE_INFO_1 {
103: LPTSTR ui1_local;
104: LPTSTR ui1_remote;
105: LPTSTR ui1_password;
106: DWORD ui1_status;
107: DWORD ui1_asg_type;
108: DWORD ui1_refcount;
109: DWORD ui1_usecount;
110: }USE_INFO_1, *PUSE_INFO_1, *LPUSE_INFO_1;
111:
112: typedef struct _USE_INFO_2 {
113: LPTSTR ui2_local;
114: LPTSTR ui2_remote;
115: LPTSTR ui2_password;
116: DWORD ui2_status;
117: DWORD ui2_asg_type;
118: DWORD ui2_refcount;
119: DWORD ui2_usecount;
120: LPTSTR ui2_username;
121: LPTSTR ui2_domainname;
122: }USE_INFO_2, *PUSE_INFO_2, *LPUSE_INFO_2;
123:
124:
125: //
126: // Special Values and Constants
127: //
128:
129: //
130: // One of these values indicates the parameter within an information
131: // structure that is invalid when ERROR_INVALID_PARAMETER is returned by
132: // NetUseAdd.
133: //
134:
135: #define USE_LOCAL_PARMNUM 1
136: #define USE_REMOTE_PARMNUM 2
137: #define USE_PASSWORD_PARMNUM 3
138: #define USE_ASGTYPE_PARMNUM 4
139: #define USE_USERNAME_PARMNUM 5
140: #define USE_DOMAINNAME_PARMNUM 6
141:
142: //
143: // Values appearing in the ui1_status field of use_info_1 structure.
144: // Note that USE_SESSLOST and USE_DISCONN are synonyms.
145: //
146:
147: #define USE_OK 0
148: #define USE_PAUSED 1
149: #define USE_SESSLOST 2
150: #define USE_DISCONN 2
151: #define USE_NETERR 3
152: #define USE_CONN 4
153: #define USE_RECONN 5
154:
155:
156: //
157: // Values of the ui1_asg_type field of use_info_1 structure
158: //
159:
160: #define USE_WILDCARD ( (DWORD) (-1) )
161: #define USE_DISKDEV 0
162: #define USE_SPOOLDEV 1
163: #define USE_CHARDEV 2
164: #define USE_IPC 3
165:
166: #ifdef __cplusplus
167: }
168: #endif
169:
170: #endif // _LMUSE_
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.