VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/npapi.h@ 20793

最後變更 在這個檔案從20793是 16477,由 vboxsync 提交於 16 年 前

LGPL disclaimer by filemuncher

  • 屬性 svn:eol-style 設為 native
檔案大小: 7.7 KB
 
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 St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19/*
20 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
21 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
22 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
23 * a choice of LGPL license versions is made available with the language indicating
24 * that LGPLv2 or any later version may be used, or where a choice of which version
25 * of the LGPL is applied is otherwise unspecified.
26 */
27#ifndef __WINE_NPAPI_H__
28#define __WINE_NPAPI_H__
29
30/* capabilities */
31#define WNNC_SPEC_VERSION 0x00000001
32#define WNNC_SPEC_VERSION51 0x00050001
33#define WNNC_NET_TYPE 0x00000002
34#define WNNC_NET_NONE 0x00000000
35
36#define WNNC_DRIVER_VERSION 0x00000003
37
38#define WNNC_USER 0x00000004
39#define WNNC_USR_GETUSER 0x00000001
40
41#define WNNC_CONNECTION 0x00000006
42#define WNNC_CON_ADDCONNECTION 0x00000001
43#define WNNC_CON_CANCELCONNECTION 0x00000002
44#define WNNC_CON_GETCONNECTIONS 0x00000004
45#define WNNC_CON_ADDCONNECTION3 0x00000008
46#define WNNC_CON_GETPERFORMANCE 0x00000040
47#define WNNC_CON_DEFER 0x00000080
48
49#define WNNC_DIALOG 0x00000008
50#define WNNC_DLG_DEVICEMODE 0x00000001
51#define WNNC_DLG_PROPERTYDIALOG 0x00000020
52#define WNNC_DLG_SEARCHDIALOG 0x00000040
53#define WNNC_DLG_FORMATNETWORKNAME 0x00000080
54#define WNNC_DLG_PERMISSIONEDITOR 0x00000100
55#define WNNC_DLG_GETRESOURCEPARENT 0x00000200
56#define WNNC_DLG_GETRESOURCEINFORMATION 0x00000800
57
58#define WNNC_ADMIN 0x00000009
59#define WNNC_ADM_GETDIRECTORYTYPE 0x00000001
60#define WNNC_ADM_DIRECTORYNOTIFY 0x00000002
61
62#define WNNC_ENUMERATION 0x0000000b
63#define WNNC_ENUM_GLOBAL 0x00000001
64#define WNNC_ENUM_LOCAL 0x00000002
65#define WNNC_ENUM_CONTEXT 0x00000004
66
67#define WNNC_START 0x0000000c
68#define WNNC_WAIT_FOR_START 0x00000001
69
70typedef DWORD (APIENTRY *PF_NPGetCaps)(DWORD ndex);
71
72/* get user */
73typedef DWORD (APIENTRY *PF_NPGetUser)(LPWSTR lpName, LPWSTR lpUserName,
74 LPDWORD lpnBufferLen);
75
76/* enumeration-related */
77typedef DWORD (APIENTRY *PF_NPOpenEnum)(DWORD dwScope, DWORD dwType, DWORD dwUsage,
78 LPNETRESOURCEW lpNetResource, LPHANDLE lphEnum);
79typedef DWORD (APIENTRY *PF_NPEnumResource)(HANDLE hEnum, LPDWORD lpcCount,
80 LPVOID lpBuffer, LPDWORD lpBufferSize);
81typedef DWORD (APIENTRY *PF_NPCloseEnum)(HANDLE hEnum);
82typedef DWORD (APIENTRY *PF_NPGetResourceInformation)(LPNETRESOURCEW lpNetResource,
83 LPVOID lpBuffer, LPDWORD lpcbBuffer, LPWSTR* lplpSystem);
84
85/* connection-related */
86typedef DWORD (APIENTRY *PF_NPAddConnection)(LPNETRESOURCEW lpNetResource,
87 LPWSTR lpPassword, LPWSTR lpUserName);
88typedef DWORD (APIENTRY *PF_NPAddConnection3)(HWND hwndOwner,
89 LPNETRESOURCEW lpNetResource, LPWSTR lpPassword, LPWSTR lpUserName,
90 DWORD dwFlags);
91typedef DWORD (APIENTRY *PF_NPCancelConnection)(LPWSTR lpName, BOOL fForce);
92typedef DWORD (APIENTRY *PF_NPGetConnection)(LPWSTR lpLocalName,
93 LPWSTR lpRemoteName, LPDWORD lpnBufferLen);
94
95/* network name manipulation */
96typedef DWORD (APIENTRY *PF_NPGetUniversalName)(LPWSTR lpLocalPath,
97 DWORD dwInfoLevel, LPVOID lpBuffer, LPDWORD lpnBufferSize);
98typedef DWORD (APIENTRY *PF_NPFormatNetworkName)(LPWSTR lpRemoteName,
99 LPWSTR lpFormattedName, LPDWORD lpnLength, DWORD dwFlags,
100 DWORD dwAveCharPerLine);
101
102/* dialogs */
103typedef DWORD (APIENTRY *PF_NPDeviceMode)(HWND hParent);
104
105/* search dialog */
106#define WNSRCH_REFRESH_FIRST_LEVEL 0x00000001
107
108typedef DWORD (APIENTRY *PF_NPSearchDialog)(HWND hwndParent,
109 LPNETRESOURCEW lpNetResource, LPVOID lpBuffer, DWORD cbBuffer,
110 LPDWORD lpnFlags);
111
112/* property dialog */
113
114#define WNTYPE_DRIVE 1
115#define WNTYPE_FILE 2
116#define WNTYPE_PRINTER 3
117#define WNTYPE_COMM 4
118
119#define WNPS_FILE 0
120#define WNPS_DIR 1
121#define WNPS_MULT 2
122
123typedef DWORD (APIENTRY *PF_NPGetPropertyText)(DWORD iButton, DWORD nPropSel,
124 LPWSTR lpName, LPWSTR lpButtonName, DWORD nButtonNameLen, DWORD nType);
125
126typedef DWORD (APIENTRY *PF_NPPropertyDialog)(HWND hwndParent, DWORD iButtonDlg,
127 DWORD nPropSel, LPWSTR lpFileName, DWORD nType);
128
129/* admin */
130#define WNDT_NORMAL 0
131#define WNDT_NETWORK 1
132
133#define WNDN_MKDIR 1
134#define WNDN_RMDIR 2
135#define WNDN_MVDIR 3
136
137typedef DWORD (APIENTRY *PF_NPGetDirectoryType)(LPWSTR lpName, LPINT lpType,
138 BOOL bFlushCache);
139typedef DWORD (APIENTRY *PF_NPDirectoryNotify)(HWND hwnd, LPWSTR lpDir,
140 DWORD dwOper);
141
142/* permission editor dialogs */
143#define WNPERMC_PERM 0x00000001
144#define WNPERMC_AUDIT 0x00000002
145#define WNPERMC_OWNER 0x00000004
146
147typedef DWORD (APIENTRY *PF_NPFMXGetPermCaps)(LPWSTR lpDriveName);
148
149#define WNPERM_DLG_PERM 0
150#define WNPERM_DLG_AUDIT 1
151#define WNPERM_DLG_OWNER 2
152
153typedef DWORD (APIENTRY *PF_NPFMXEditPerm)(LPWSTR lpDriveName, HWND hwndFMX,
154 DWORD nDialogType);
155
156typedef DWORD (APIENTRY *PF_NPFMXGetPermHelp)(LPWSTR lpDriveName,
157 DWORD nDialogType, BOOL fDirectory, LPVOID lpFileNameBuffer,
158 LPDWORD lpBufferSize, LPDWORD lpnHelpContext);
159
160VOID WINAPI WNetSetLastErrorA(DWORD err, LPSTR lpError, LPSTR lpProviders);
161VOID WINAPI WNetSetLastErrorW(DWORD err, LPWSTR lpError, LPWSTR lpProviders);
162#define WNetSetLastError WINELIB_NAME_AW(WNetSetLastError)
163
164/* provider classes */
165#define WN_NETWORK_CLASS 0x00000001
166#define WN_CREDENTIAL_CLASS 0x00000002
167#define WN_PRIMARY_AUTHENT_CLASS 0x00000004
168#define WN_SERVICE_CLASS 0x00000008
169
170#define WN_VALID_LOGON_ACCOUNT 0x00000001
171#define WN_NT_PASSWORD_CHANGED 0x00000002
172
173/* notifications */
174typedef DWORD (APIENTRY *PF_NPLogonNotify)(PLUID lpLogonId,
175 LPCWSTR lpAuthentInfoType, LPVOID lpAuthentInfo,
176 LPCWSTR lpPreviousAuthentInfoType, LPVOID lpPreviousAuthentInfo,
177 LPWSTR lpStationName, LPVOID StationHandle, LPWSTR *lpLogonScript);
178typedef DWORD (APIENTRY *PF_NPPasswordChangeNotify)(LPCWSTR lpAuthentInfoType,
179 LPVOID lpAuthentInfo, LPCWSTR lpPreviousAuthentInfoType,
180 LPVOID lpPreviousAuthentInfo, LPWSTR lpStationName, LPVOID StationHandle,
181 DWORD dwChangeInfo);
182
183#define NOTIFY_PRE 0x00000001
184#define NOTIFY_POST 0x00000002
185
186typedef struct _NOTIFYINFO
187{
188 DWORD dwNotifyStatus;
189 DWORD dwOperationStatus;
190 LPVOID lpContext;
191} NOTIFYINFO, *LPNOTIFYINFO;
192
193/* FIXME: NetResource is declared as a NETRESOURCE in psdk, not a NETRESOURCEW,
194 * but how can the type change in a service provider? Defaulting to wide-char
195 * for consistency with the rest of the api.
196 */
197typedef struct _NOTIFYADD
198{
199 HWND hwndOwner;
200 NETRESOURCEW NetResource;
201 DWORD dwAddFlags;
202} NOTIFYADD, *LPNOTIFYADD;
203
204/* FIXME: lpName and lpProvider are declared as LPTSTRs in psdk, but again
205 * for consistency with rest of api defaulting to LPWSTRs.
206 */
207typedef struct _NOTIFYCANCEL
208{
209 LPWSTR lpName;
210 LPWSTR lpProvider;
211 DWORD dwFlags;
212 BOOL fForce;
213} NOTIFYCANCEL, *LPNOTIFYCANCEL;
214
215typedef DWORD (APIENTRY *PF_AddConnectNotify)(LPNOTIFYINFO lpNotifyInfo,
216 LPNOTIFYADD lpAddInfo);
217typedef DWORD (APIENTRY *PF_CancelConnectNotify)(LPNOTIFYINFO lpNotifyInfo,
218 LPNOTIFYADD lpAddInfo);
219
220#endif /* ndef __WINE_NPAPI_H__ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette