summaryrefslogtreecommitdiffstats
path: root/private/nw/inc/nwapi.h
blob: 2b34f27b7cfdc79a5f9ebc43427b0352d598b876 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
/*++

Copyright (c) 1993  Microsoft Corporation

Module Name:

    api.h

Abstract:

    This module contains exposed APIs that is used by the
    NetWare Control Panel Applet.

Author:

    Yi-Hsin Sung   15-Jul-1993

Revision History:

--*/

#ifndef _NWAPI_INCLUDED_
#define _NWAPI_INCLUDED_

#include <nwcons.h>

//
// Bitmask for print options
//

#define NW_PRINT_SUPPRESS_FORMFEED    0x08
#define NW_PRINT_PRINT_BANNER         0x80
#define NW_PRINT_PRINT_NOTIFY         0x10

//
// Flags for logon script support.
//

#define NW_LOGONSCRIPT_DISABLED       0x00000000
#define NW_LOGONSCRIPT_ENABLED        0x00000001
#define NW_LOGONSCRIPT_4X_ENABLED     0x00000002
#define NW_LOGONSCRIPT_DEFAULT        NW_LOGONSCRIPT_DISABLED
#define NW_LOGONSCRIPT_DEBUG          0x00000800 

//
// Values for turning on Sync login script flags.
//

#define SYNC_LOGONSCRIPT             0x1
#define RESET_SYNC_LOGONSCRIPT       0x2

//
// Bitmask for gateway redirections
//
#define NW_GW_UPDATE_REGISTRY         0x01
#define NW_GW_CLEANUP_DELETED         0x02


DWORD
NwQueryInfo(
    OUT PDWORD pnPrintOption, 
    OUT LPWSTR *ppszPreferredSrv
    );

DWORD
NwSetInfoInRegistry(
    IN DWORD  nPrintOption,
    IN LPWSTR pszPreferredSrv 
    );

DWORD
NwSetLogonOptionsInRegistry(
    IN DWORD  nLogonScriptOptions
    );

DWORD
NwQueryLogonOptions(
    OUT PDWORD  pnLogonScriptOptions
    );

DWORD
NwSetInfoInWksta(
    IN DWORD  nPrintOption,
    IN LPWSTR pszPreferredSrv
    );

DWORD
NwSetLogonScript(
    IN DWORD  ScriptOptions
    );

DWORD
NwValidateUser(
    IN LPWSTR pszPreferredSrv
);

DWORD
NwEnumGWDevices( 
    LPDWORD Index,
    LPBYTE Buffer,
    DWORD BufferSize,
    LPDWORD BytesNeeded,
    LPDWORD EntriesRead
    ) ;

DWORD
NwAddGWDevice( 
    LPWSTR DeviceName,
    LPWSTR RemoteName,
    LPWSTR AccountName,
    LPWSTR Password,
    DWORD  Flags
    ) ;

DWORD
NwDeleteGWDevice( 
    LPWSTR DeviceName,
    DWORD  Flags
    ) ;

DWORD
NwEnumConnections(
    HANDLE  hEnum,
    LPDWORD lpcCount,
    LPVOID  lpBuffer,
    LPDWORD lpBufferSize,
    BOOL    fImplicitConnections
    );

DWORD
NwLibSetEverybodyPermission(
    HKEY   hKey,
    DWORD  dwAccessPermission
    );

DWORD
NwQueryGatewayAccount(
    LPWSTR   AccountName,
    DWORD    AccountNameLen,
    LPDWORD  AccountCharsNeeded,
    LPWSTR   Password,
    DWORD    PasswordLen,
    LPDWORD  PasswordCharsNeeded
    );

DWORD
NwSetGatewayAccount(
    LPWSTR AccountName,
    LPWSTR Password
    );

DWORD
NwLogonGatewayAccount(
    LPWSTR AccountName,
    LPWSTR Password,
    LPWSTR Server
    );

DWORD
NwRegisterGatewayShare(
    IN LPWSTR ShareName,
    IN LPWSTR DriveName
    );

DWORD
NwClearGatewayShare(
    IN LPWSTR ShareName
    );

DWORD
NwCleanupGatewayShares(
    VOID
    );

    
VOID 
MapSpecialJapaneseChars(
    LPSTR       lpszA,
    WORD        length
    );

VOID 
UnmapSpecialJapaneseChars(
    LPSTR       lpszA,
    WORD        length
    );

LPSTR
NwDupStringA(
    const LPSTR lpszA,
    WORD        length
    );

#define NwFreeStringA(lp) if((lp) != NULL) { (void)LocalFree((lp)); }


#endif