blob: ff1e996798f99ffd6ddedd0cc2ed35c38e5a408c [file] [log] [blame]
Ulrich Weigandbb1984e1999-08-07 14:32:33 +00001/*
2 * MPR - Network provider services
Alexandre Julliard0799c1a2002-03-09 23:29:33 +00003 *
4 * Copyright (C) 1999 Ulrich Weigand
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Ulrich Weigandbb1984e1999-08-07 14:32:33 +000019 */
20
21#ifndef _NETSPI_H_
22#define _NETSPI_H_
23
Dimitrie O. Paun53f9c212003-08-28 21:43:34 +000024#include <windef.h>
25#include <winnetwk.h>
Ulrich Weigandbb1984e1999-08-07 14:32:33 +000026
27/*
28 * Note: The Unicode variants of all these routines/structures
29 * apparently don't exist, at least not in Win95 ...
30 */
31
32#define HPROVIDER LPVOID
33typedef HPROVIDER *PHPROVIDER;
34
Vincent Béron9a624912002-05-31 23:06:46 +000035typedef struct
Ulrich Weigandbb1984e1999-08-07 14:32:33 +000036{
37 DWORD cbStructure;
38 HWND hwndOwner;
39 LPCSTR lpResource;
40 LPSTR lpUsername;
41 DWORD cbUsername;
42 LPSTR lpPassword;
43 DWORD cbPassword;
44 LPSTR lpOrgUnit;
45 DWORD cbOrgUnit;
46 LPCSTR lpOUTitle;
47 LPCSTR lpExplainText;
48 LPCSTR lpDefaultUserName;
49 DWORD dwFlags;
50
51} AUTHDLGSTRUCTA, *LPAUTHDLGSTRUCTA;
52
53DECL_WINELIB_TYPE_AW(AUTHDLGSTRUCT)
54DECL_WINELIB_TYPE_AW(LPAUTHDLGSTRUCT)
55
56#define AUTHDLG_ENABLECACHE 0x00000001
57#define AUTHDLG_CHECKCACHE 0x00000002
58#define AUTHDLG_CACHEINVALID 0x00000004
59#define AUTHDLG_USE_DEFAULT_NAME 0x00000008
60#define AUTHDLG_CHECKDEFAULT_NAME 0x00000010
61#define AUTHDLG_LOGON 0x00000020
62
63#define AUTHDLG_ENABLECACHE 0x00000001
64#define AUTHDLG_CHECKCACHE 0x00000002
65#define AUTHDLG_CACHEINVALID 0x00000004
66#define AUTHDLG_USE_DEFAULT_NAME 0x00000008
67#define AUTHDLG_CHECKDEFAULT_NAME 0x00000010
68#define AUTHDLG_LOGON 0x00000020
69
70DWORD WINAPI NPSAuthenticationDialogA(LPAUTHDLGSTRUCTA);
71#define NPSAuthenticationDialog WINELIB_NAME_AW(NPSAuthenticationDialog)
72DWORD WINAPI NPSGetProviderHandleA(PHPROVIDER);
73#define NPSGetProviderHandle WINELIB_NAME_AW(NPSGetProviderHandle)
74DWORD WINAPI NPSGetProviderNameA(HPROVIDER,LPCSTR *);
75#define NPSGetProviderName WINELIB_NAME_AW(NPSGetProviderName)
76DWORD WINAPI NPSGetSectionNameA(HPROVIDER,LPCSTR *lpszSectionName);
77#define NPSGetSectionName WINELIB_NAME_AW(NPSGetSectionName)
78DWORD WINAPI NPSSetExtendedErrorA(DWORD,LPSTR);
79#define NPSSetExtendedError WINELIB_NAME_AW(NPSSetExtendedError)
80VOID WINAPI NPSSetCustomTextA(LPSTR);
81#define NPSSetCustomText WINELIB_NAME_AW(NPSSetCustomText)
82DWORD WINAPI NPSCopyStringA(LPCSTR,LPVOID,LPDWORD);
83#define NPSCopyString WINELIB_NAME_AW(NPSCopyString)
84DWORD WINAPI NPSDeviceGetNumberA(LPSTR,LPDWORD,LPDWORD);
85#define NPSDeviceGetNumber WINELIB_NAME_AW(NPSDeviceGetNumber)
86DWORD WINAPI NPSDeviceGetStringA(DWORD,DWORD,LPSTR,LPDWORD);
87#define NPSDeviceGetString WINELIB_NAME_AW(NPSDeviceGetString)
88
89
90enum NOTIFYTYPE { NotifyAddConnection,
91 NotifyCancelConnection,
92 NotifyGetConnectionPerformance };
93
94#define NOTIFY_PRE 0x00
95#define NOTIFY_POST 0x01
96
Vincent Béron9a624912002-05-31 23:06:46 +000097typedef struct
Ulrich Weigandbb1984e1999-08-07 14:32:33 +000098{
99 DWORD cbStructure;
100 DWORD dwNotifyStatus;
101 DWORD dwOperationStatus;
102 LPVOID lpNPContext;
103
104} NOTIFYINFO, *LPNOTIFYINFO;
105
Vincent Béron9a624912002-05-31 23:06:46 +0000106typedef struct
Ulrich Weigandbb1984e1999-08-07 14:32:33 +0000107{
108 DWORD cbStructure;
109 HWND hwndOwner;
110 NETRESOURCEA NetResource;
111 DWORD dwAddFlags;
112 LPSTR lpAccessName;
113 LPDWORD lpBufferSize;
114 DWORD dwResult;
115 DWORD dwAddContext;
116
117} NOTIFYADDA, *LPNOTIFYADDA;
118
119#define CONNECT_CTXT_RESTORE 0x00000001
120#define CONNECT_CTXT_GLOBAL 0x00000002
121#define CONNECT_CTXT_PROVIDER 0x00000004
122#define CONNECT_CTXT_SINGLE 0x00000008
123
Vincent Béron9a624912002-05-31 23:06:46 +0000124typedef struct
Ulrich Weigandbb1984e1999-08-07 14:32:33 +0000125{
126 DWORD cbStructure;
127 LPSTR lpName;
128 LPSTR lpProvider;
129 DWORD dwFlags;
130 BOOL fForce;
131
132} NOTIFYCANCELA, *LPNOTIFYCANCELA;
133
Vincent Béron9a624912002-05-31 23:06:46 +0000134typedef struct
Ulrich Weigandbb1984e1999-08-07 14:32:33 +0000135{
136 DWORD cbStructure;
137 LPSTR lpRemoteName;
138 LPSTR lpProviderName;
139 LPNETCONNECTINFOSTRUCT lpNetConnectInfo;
140
141} NOTIFYPERFORMANCEA, *LPNOTIFYPERFORMANCEA;
142
Patrik Stridvallf94462f2002-01-31 23:22:07 +0000143typedef DWORD (CALLBACK *NOTIFYCALLBACK)(LPNOTIFYINFO,LPVOID);
Ulrich Weigandbb1984e1999-08-07 14:32:33 +0000144
145DWORD WINAPI NPSNotifyRegisterA(enum NOTIFYTYPE,NOTIFYCALLBACK);
146#define NPSNotifyRegister WINELIB_NAME_AW(NPSNotifyRegister)
147LPVOID WINAPI NPSNotifyGetContextA(NOTIFYCALLBACK);
148#define NPSNotifyGetContext WINELIB_NAME_AW(NPSNotifyGetContext)
149
Jeff Garzik3ea0c072001-03-21 20:31:26 +0000150#endif /* _NETSPI_H_ */
Ulrich Weigandbb1984e1999-08-07 14:32:33 +0000151