ReactOS 0.4.15-dev-8093-g3285f69
npapi.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2004 Juan Lang
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18#ifndef __WINE_NPAPI_H__
19#define __WINE_NPAPI_H__
20
21/* capabilities */
22#define WNNC_SPEC_VERSION 0x00000001
23#define WNNC_SPEC_VERSION51 0x00050001
24#define WNNC_NET_TYPE 0x00000002
25#define WNNC_NET_NONE 0x00000000
26
27#define WNNC_DRIVER_VERSION 0x00000003
28
29#define WNNC_USER 0x00000004
30#define WNNC_USR_GETUSER 0x00000001
31
32#define WNNC_CONNECTION 0x00000006
33#define WNNC_CON_ADDCONNECTION 0x00000001
34#define WNNC_CON_CANCELCONNECTION 0x00000002
35#define WNNC_CON_GETCONNECTIONS 0x00000004
36#define WNNC_CON_ADDCONNECTION3 0x00000008
37
38#define WNNC_DIALOG 0x00000008
39#define WNNC_DLG_DEVICEMODE 0x00000001
40#define WNNC_DLG_PROPERTYDIALOG 0x00000020
41#define WNNC_DLG_SEARCHDIALOG 0x00000040
42#define WNNC_DLG_FORMATNETWORKNAME 0x00000080
43#define WNNC_DLG_PERMISSIONEDITOR 0x00000100
44#define WNNC_DLG_GETRESOURCEPARENT 0x00000200
45#define WNNC_DLG_GETRESOURCEINFORMATION 0x00000800
46
47#define WNNC_ADMIN 0x00000009
48#define WNNC_ADM_GETDIRECTORYTYPE 0x00000001
49#define WNNC_ADM_DIRECTORYNOTIFY 0x00000002
50
51#define WNNC_ENUMERATION 0x0000000b
52#define WNNC_ENUM_GLOBAL 0x00000001
53#define WNNC_ENUM_LOCAL 0x00000002
54#define WNNC_ENUM_CONTEXT 0x00000004
55
56#define WNNC_START 0x0000000c
57#define WNNC_WAIT_FOR_START 0x00000001
58
60
61/* get user */
63 LPDWORD lpnBufferLen);
64
65/* enumeration-related */
66typedef DWORD (APIENTRY *PF_NPOpenEnum)(DWORD dwScope, DWORD dwType, DWORD dwUsage,
67 LPNETRESOURCEW lpNetResource, LPHANDLE lphEnum);
68typedef DWORD (APIENTRY *PF_NPEnumResource)(HANDLE hEnum, LPDWORD lpcCount,
69 LPVOID lpBuffer, LPDWORD lpBufferSize);
72 LPVOID lpBuffer, LPDWORD lpcbBuffer, LPWSTR* lplpSystem);
73
74/* connection-related */
76 LPWSTR lpPassword, LPWSTR lpUserName);
78 LPNETRESOURCEW lpNetResource, LPWSTR lpPassword, LPWSTR lpUserName,
81typedef DWORD (APIENTRY *PF_NPGetConnection)(LPWSTR lpLocalName,
82 LPWSTR lpRemoteName, LPDWORD lpnBufferLen);
83
84/* network name manipulation */
86 DWORD dwInfoLevel, LPVOID lpBuffer, LPDWORD lpnBufferSize);
88 LPWSTR lpFormattedName, LPDWORD lpnLength, DWORD dwFlags,
89 DWORD dwAveCharPerLine);
90
91/* dialogs */
92typedef DWORD (APIENTRY *PF_NPDeviceMode)(HWND hParent);
93
94/* search dialog */
95#define WNSRCH_REFRESH_FIRST_LEVEL 0x00000001
96
98 LPNETRESOURCEW lpNetResource, LPVOID lpBuffer, DWORD cbBuffer,
99 LPDWORD lpnFlags);
100
101/* property dialog */
102
103#define WNTYPE_DRIVE 1
104#define WNTYPE_FILE 2
105#define WNTYPE_PRINTER 3
106#define WNTYPE_COMM 4
107
108#define WNPS_FILE 0
109#define WNPS_DIR 1
110#define WNPS_MULT 2
111
112typedef DWORD (APIENTRY *PF_NPGetPropertyText)(DWORD iButton, DWORD nPropSel,
113 LPWSTR lpName, LPWSTR lpButtonName, DWORD nButtonNameLen, DWORD nType);
114
116 DWORD nPropSel, LPWSTR lpFileName, DWORD nType);
117
118/* admin */
119#define WNDT_NORMAL 0
120#define WNDT_NETWORK 1
121
122#define WNDN_MKDIR 1
123#define WNDN_RMDIR 2
124#define WNDN_MVDIR 3
125
127 BOOL bFlushCache);
129 DWORD dwOper);
130
131/* permission editor dialogs */
132#define WNPERMC_PERM 0x00000001
133#define WNPERMC_AUDIT 0x00000002
134#define WNPERMC_OWNER 0x00000004
135
136typedef DWORD (APIENTRY *PF_NPFMXGetPermCaps)(LPWSTR lpDriveName);
137
138#define WNPERM_DLG_PERM 0
139#define WNPERM_DLG_AUDIT 1
140#define WNPERM_DLG_OWNER 2
141
142typedef DWORD (APIENTRY *PF_NPFMXEditPerm)(LPWSTR lpDriveName, HWND hwndFMX,
143 DWORD nDialogType);
144
146 DWORD nDialogType, BOOL fDirectory, LPVOID lpFileNameBuffer,
147 LPDWORD lpBufferSize, LPDWORD lpnHelpContext);
148
151#define WNetSetLastError WINELIB_NAME_AW(WNetSetLastError)
152
153/* provider classes */
154#define WN_NETWORK_CLASS 0x00000001
155#define WN_CREDENTIAL_CLASS 0x00000002
156#define WN_PRIMARY_AUTHENT_CLASS 0x00000004
157#define WN_SERVICE_CLASS 0x00000008
158
159#define WN_VALID_LOGON_ACCOUNT 0x00000001
160#define WN_NT_PASSWORD_CHANGED 0x00000002
161
162/* notifications */
164 LPCWSTR lpAuthentInfoType, LPVOID lpAuthentInfo,
165 LPCWSTR lpPreviousAuthentInfoType, LPVOID lpPreviousAuthentInfo,
166 LPWSTR lpStationName, LPVOID StationHandle, LPWSTR *lpLogonScript);
167typedef DWORD (APIENTRY *PF_NPPasswordChangeNotify)(LPCWSTR lpAuthentInfoType,
168 LPVOID lpAuthentInfo, LPCWSTR lpPreviousAuthentInfoType,
169 LPVOID lpPreviousAuthentInfo, LPWSTR lpStationName, LPVOID StationHandle,
170 DWORD dwChangeInfo);
171
172#define NOTIFY_PRE 0x00000001
173#define NOTIFY_POST 0x00000002
174
175typedef struct _NOTIFYINFO
176{
181
182/* FIXME: NetResource is declared as a NETRESOURCE in psdk, not a NETRESOURCEW,
183 * but how can the type change in a service provider? Defaulting to wide-char
184 * for consistency with the rest of the api.
185 */
186typedef struct _NOTIFYADD
187{
192
193/* FIXME: lpName and lpProvider are declared as LPTSTRs in psdk, but again
194 * for consistency with rest of api defaulting to LPWSTRs.
195 */
196typedef struct _NOTIFYCANCEL
197{
203
205 LPNOTIFYADD lpAddInfo);
207 LPNOTIFYADD lpAddInfo);
208
209#endif /* ndef __WINE_NPAPI_H__ */
static HWND hwndParent
Definition: cryptui.c:300
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:175
#define APIENTRY
Definition: api.h:79
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD(APIENTRY * PF_NPLogonNotify)(PLUID lpLogonId, LPCWSTR lpAuthentInfoType, LPVOID lpAuthentInfo, LPCWSTR lpPreviousAuthentInfoType, LPVOID lpPreviousAuthentInfo, LPWSTR lpStationName, LPVOID StationHandle, LPWSTR *lpLogonScript)
Definition: npapi.h:163
DWORD(APIENTRY * PF_NPPasswordChangeNotify)(LPCWSTR lpAuthentInfoType, LPVOID lpAuthentInfo, LPCWSTR lpPreviousAuthentInfoType, LPVOID lpPreviousAuthentInfo, LPWSTR lpStationName, LPVOID StationHandle, DWORD dwChangeInfo)
Definition: npapi.h:167
DWORD(APIENTRY * PF_NPEnumResource)(HANDLE hEnum, LPDWORD lpcCount, LPVOID lpBuffer, LPDWORD lpBufferSize)
Definition: npapi.h:68
DWORD(APIENTRY * PF_NPGetConnection)(LPWSTR lpLocalName, LPWSTR lpRemoteName, LPDWORD lpnBufferLen)
Definition: npapi.h:81
DWORD(APIENTRY * PF_NPAddConnection)(LPNETRESOURCEW lpNetResource, LPWSTR lpPassword, LPWSTR lpUserName)
Definition: npapi.h:75
DWORD(APIENTRY * PF_NPOpenEnum)(DWORD dwScope, DWORD dwType, DWORD dwUsage, LPNETRESOURCEW lpNetResource, LPHANDLE lphEnum)
Definition: npapi.h:66
VOID WINAPI WNetSetLastErrorW(DWORD err, LPWSTR lpError, LPWSTR lpProviders)
DWORD(APIENTRY * PF_CancelConnectNotify)(LPNOTIFYINFO lpNotifyInfo, LPNOTIFYADD lpAddInfo)
Definition: npapi.h:206
struct _NOTIFYADD * LPNOTIFYADD
DWORD(APIENTRY * PF_NPFMXGetPermHelp)(LPWSTR lpDriveName, DWORD nDialogType, BOOL fDirectory, LPVOID lpFileNameBuffer, LPDWORD lpBufferSize, LPDWORD lpnHelpContext)
Definition: npapi.h:145
DWORD(APIENTRY * PF_NPGetCaps)(DWORD ndex)
Definition: npapi.h:59
DWORD(APIENTRY * PF_NPFMXEditPerm)(LPWSTR lpDriveName, HWND hwndFMX, DWORD nDialogType)
Definition: npapi.h:142
DWORD(APIENTRY * PF_NPGetPropertyText)(DWORD iButton, DWORD nPropSel, LPWSTR lpName, LPWSTR lpButtonName, DWORD nButtonNameLen, DWORD nType)
Definition: npapi.h:112
DWORD(APIENTRY * PF_NPFormatNetworkName)(LPWSTR lpRemoteName, LPWSTR lpFormattedName, LPDWORD lpnLength, DWORD dwFlags, DWORD dwAveCharPerLine)
Definition: npapi.h:87
VOID WINAPI WNetSetLastErrorA(DWORD err, LPSTR lpError, LPSTR lpProviders)
struct _NOTIFYCANCEL * LPNOTIFYCANCEL
DWORD(APIENTRY * PF_NPGetUser)(LPWSTR lpName, LPWSTR lpUserName, LPDWORD lpnBufferLen)
Definition: npapi.h:62
DWORD(APIENTRY * PF_AddConnectNotify)(LPNOTIFYINFO lpNotifyInfo, LPNOTIFYADD lpAddInfo)
Definition: npapi.h:204
DWORD(APIENTRY * PF_NPDirectoryNotify)(HWND hwnd, LPWSTR lpDir, DWORD dwOper)
Definition: npapi.h:128
DWORD(APIENTRY * PF_NPGetDirectoryType)(LPWSTR lpName, LPINT lpType, BOOL bFlushCache)
Definition: npapi.h:126
DWORD(APIENTRY * PF_NPSearchDialog)(HWND hwndParent, LPNETRESOURCEW lpNetResource, LPVOID lpBuffer, DWORD cbBuffer, LPDWORD lpnFlags)
Definition: npapi.h:97
DWORD(APIENTRY * PF_NPFMXGetPermCaps)(LPWSTR lpDriveName)
Definition: npapi.h:136
struct _NOTIFYCANCEL NOTIFYCANCEL
DWORD(APIENTRY * PF_NPGetResourceInformation)(LPNETRESOURCEW lpNetResource, LPVOID lpBuffer, LPDWORD lpcbBuffer, LPWSTR *lplpSystem)
Definition: npapi.h:71
DWORD(APIENTRY * PF_NPAddConnection3)(HWND hwndOwner, LPNETRESOURCEW lpNetResource, LPWSTR lpPassword, LPWSTR lpUserName, DWORD dwFlags)
Definition: npapi.h:77
DWORD(APIENTRY * PF_NPCancelConnection)(LPWSTR lpName, BOOL fForce)
Definition: npapi.h:80
DWORD(APIENTRY * PF_NPPropertyDialog)(HWND hwndParent, DWORD iButtonDlg, DWORD nPropSel, LPWSTR lpFileName, DWORD nType)
Definition: npapi.h:115
DWORD(APIENTRY * PF_NPCloseEnum)(HANDLE hEnum)
Definition: npapi.h:70
struct _NOTIFYADD NOTIFYADD
struct _NOTIFYINFO NOTIFYINFO
DWORD(APIENTRY * PF_NPGetUniversalName)(LPWSTR lpLocalPath, DWORD dwInfoLevel, LPVOID lpBuffer, LPDWORD lpnBufferSize)
Definition: npapi.h:85
DWORD(APIENTRY * PF_NPDeviceMode)(HWND hParent)
Definition: npapi.h:92
struct _NOTIFYINFO * LPNOTIFYINFO
#define DWORD
Definition: nt_native.h:44
#define err(...)
HWND hwndOwner
Definition: npapi.h:188
NETRESOURCEW NetResource
Definition: npapi.h:189
DWORD dwAddFlags
Definition: npapi.h:190
DWORD dwFlags
Definition: npapi.h:200
LPWSTR lpProvider
Definition: npapi.h:199
BOOL fForce
Definition: npapi.h:201
LPWSTR lpName
Definition: npapi.h:198
DWORD dwOperationStatus
Definition: npapi.h:178
LPVOID lpContext
Definition: npapi.h:179
DWORD dwNotifyStatus
Definition: npapi.h:177
uint32_t * LPDWORD
Definition: typedefs.h:59
_In_ LPCSTR lpFileName
Definition: winbase.h:3071
_In_ LPCSTR lpName
Definition: winbase.h:2789
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
int * LPINT
Definition: windef.h:178
#define WINAPI
Definition: msvc.h:6
_In_ DWORD dwInfoLevel
Definition: winsvc.h:422
char * LPSTR
Definition: xmlstorage.h:182
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185