2 * MPR Network Provider Services functions
4 * Copyright 1999 Ulrich Weigand
5 * Copyright 2004 Mike McCormack for CodeWeavers Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
30 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(mpr
);
35 #include "wine/unicode.h"
39 /***********************************************************************
40 * NPS_ProxyPasswordDialog
42 static INT_PTR WINAPI
NPS_ProxyPasswordDialog(
43 HWND hdlg
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
)
46 LPAUTHDLGSTRUCTA lpAuthDlgStruct
;
48 if( uMsg
== WM_INITDIALOG
)
50 TRACE("WM_INITDIALOG (%08lx)\n", lParam
);
52 /* save the parameter list */
53 lpAuthDlgStruct
= (LPAUTHDLGSTRUCTA
) lParam
;
54 SetWindowLongPtrW( hdlg
, GWLP_USERDATA
, lParam
);
56 if( lpAuthDlgStruct
->lpExplainText
)
58 hitem
= GetDlgItem( hdlg
, IDC_EXPLAIN
);
59 SetWindowTextA( hitem
, lpAuthDlgStruct
->lpExplainText
);
62 /* extract the Realm from the proxy response and show it */
63 if( lpAuthDlgStruct
->lpResource
)
65 hitem
= GetDlgItem( hdlg
, IDC_REALM
);
66 SetWindowTextA( hitem
, lpAuthDlgStruct
->lpResource
);
72 lpAuthDlgStruct
= (LPAUTHDLGSTRUCTA
) GetWindowLongPtrW( hdlg
, GWLP_USERDATA
);
79 WCHAR username
[0x20], password
[0x20];
82 hitem
= GetDlgItem( hdlg
, IDC_USERNAME
);
84 GetWindowTextA( hitem
, lpAuthDlgStruct
->lpUsername
, lpAuthDlgStruct
->cbUsername
);
87 hitem
= GetDlgItem( hdlg
, IDC_PASSWORD
);
89 GetWindowTextA( hitem
, lpAuthDlgStruct
->lpPassword
, lpAuthDlgStruct
->cbPassword
);
91 EndDialog( hdlg
, WN_SUCCESS
);
94 if( wParam
== IDCANCEL
)
96 EndDialog( hdlg
, WN_CANCEL
);
104 /*****************************************************************
105 * NPSAuthenticationDialogA [MPR.@]
107 DWORD WINAPI
NPSAuthenticationDialogA( LPAUTHDLGSTRUCTA lpAuthDlgStruct
)
109 HMODULE hwininet
= GetModuleHandleA( "mpr.dll" );
111 TRACE("%p\n", lpAuthDlgStruct
);
113 if( !lpAuthDlgStruct
)
114 return WN_BAD_POINTER
;
115 if( lpAuthDlgStruct
->cbStructure
< sizeof *lpAuthDlgStruct
)
116 return WN_BAD_POINTER
;
118 TRACE("%s %s %s\n",lpAuthDlgStruct
->lpResource
,
119 lpAuthDlgStruct
->lpOUTitle
, lpAuthDlgStruct
->lpExplainText
);
121 return DialogBoxParamW( hwininet
, MAKEINTRESOURCEW( IDD_PROXYDLG
),
122 lpAuthDlgStruct
->hwndOwner
, NPS_ProxyPasswordDialog
,
123 (LPARAM
) lpAuthDlgStruct
);
126 /*****************************************************************
127 * NPSGetProviderHandleA [MPR.@]
129 DWORD WINAPI
NPSGetProviderHandleA( PHPROVIDER phProvider
)
131 FIXME( "(%p): stub\n", phProvider
);
132 return WN_NOT_SUPPORTED
;
135 /*****************************************************************
136 * NPSGetProviderNameA [MPR.@]
138 DWORD WINAPI
NPSGetProviderNameA( HPROVIDER hProvider
, LPCSTR
*lpszProviderName
)
140 FIXME( "(%p, %p): stub\n", hProvider
, lpszProviderName
);
141 return WN_NOT_SUPPORTED
;
144 /*****************************************************************
145 * NPSGetSectionNameA [MPR.@]
147 DWORD WINAPI
NPSGetSectionNameA( HPROVIDER hProvider
, LPCSTR
*lpszSectionName
)
149 FIXME( "(%p, %p): stub\n", hProvider
, lpszSectionName
);
150 return WN_NOT_SUPPORTED
;
153 /*****************************************************************
154 * NPSSetExtendedErrorA [MPR.@]
156 DWORD WINAPI
NPSSetExtendedErrorA( DWORD NetSpecificError
, LPSTR lpExtendedErrorText
)
158 FIXME( "(%08lx, %s): stub\n", NetSpecificError
, debugstr_a(lpExtendedErrorText
) );
159 return WN_NOT_SUPPORTED
;
162 /*****************************************************************
163 * NPSSetCustomTextA [MPR.@]
165 VOID WINAPI
NPSSetCustomTextA( LPSTR lpCustomErrorText
)
167 FIXME( "(%s): stub\n", debugstr_a(lpCustomErrorText
) );
170 /*****************************************************************
171 * NPSCopyStringA [MPR.@]
173 DWORD WINAPI
NPSCopyStringA( LPCSTR lpString
, LPVOID lpBuffer
, LPDWORD lpdwBufferSize
)
175 FIXME( "(%s, %p, %p): stub\n", debugstr_a(lpString
), lpBuffer
, lpdwBufferSize
);
176 return WN_NOT_SUPPORTED
;
179 /*****************************************************************
180 * NPSDeviceGetNumberA [MPR.@]
182 DWORD WINAPI
NPSDeviceGetNumberA( LPSTR lpLocalName
, LPDWORD lpdwNumber
, LPDWORD lpdwType
)
184 FIXME( "(%s, %p, %p): stub\n", debugstr_a(lpLocalName
), lpdwNumber
, lpdwType
);
185 return WN_NOT_SUPPORTED
;
188 /*****************************************************************
189 * NPSDeviceGetStringA [MPR.@]
191 DWORD WINAPI
NPSDeviceGetStringA( DWORD dwNumber
, DWORD dwType
, LPSTR lpLocalName
, LPDWORD lpdwBufferSize
)
193 FIXME( "(%ld, %ld, %p, %p): stub\n", dwNumber
, dwType
, lpLocalName
, lpdwBufferSize
);
194 return WN_NOT_SUPPORTED
;
197 /*****************************************************************
198 * NPSNotifyRegisterA [MPR.@]
200 DWORD WINAPI
NPSNotifyRegisterA( enum NOTIFYTYPE NotifyType
, NOTIFYCALLBACK pfNotifyCallBack
)
202 FIXME( "(%d, %p): stub\n", NotifyType
, pfNotifyCallBack
);
203 return WN_NOT_SUPPORTED
;
206 /*****************************************************************
207 * NPSNotifyGetContextA [MPR.@]
209 LPVOID WINAPI
NPSNotifyGetContextA( NOTIFYCALLBACK pfNotifyCallBack
)
211 FIXME( "(%p): stub\n", pfNotifyCallBack
);
215 /*****************************************************************
216 * PwdGetPasswordStatusA [MPR.@]
218 DWORD WINAPI
PwdGetPasswordStatusA( LPCSTR lpProvider
, DWORD dwIndex
, LPDWORD status
)
220 FIXME("%s %ld %p\n", debugstr_a(lpProvider
), dwIndex
, status
);
225 /*****************************************************************
226 * PwdGetPasswordStatusA [MPR.@]
228 DWORD WINAPI
PwdGetPasswordStatusW( LPCWSTR lpProvider
, DWORD dwIndex
, LPDWORD status
)
230 FIXME("%s %ld %p\n", debugstr_w(lpProvider
), dwIndex
, status
);
235 /*****************************************************************
236 * PwdSetPasswordStatusA [MPR.@]
238 DWORD WINAPI
PwdSetPasswordStatusA( LPCSTR lpProvider
, DWORD dwIndex
, DWORD status
)
240 FIXME("%s %ld %ld\n", debugstr_a(lpProvider
), dwIndex
, status
);
244 /*****************************************************************
245 * PwdSetPasswordStatusW [MPR.@]
247 DWORD WINAPI
PwdSetPasswordStatusW( LPCWSTR lpProvider
, DWORD dwIndex
, DWORD status
)
249 FIXME("%s %ld %ld\n", debugstr_w(lpProvider
), dwIndex
, status
);
253 typedef struct _CHANGEPWDINFOA
{
257 } CHANGEPWDINFOA
, *LPCHANGEPWDINFOA
;
259 typedef struct _CHANGEPWDINFOW
{
263 } CHANGEPWDINFOW
, *LPCHANGEPWDINFOW
;
265 /*****************************************************************
266 * PwdChangePasswordA [MPR.@]
268 DWORD WINAPI
PwdChangePasswordA( LPCSTR lpProvider
, HWND hWnd
, DWORD flags
, LPCHANGEPWDINFOA info
)
270 FIXME("%s %p %lx %p\n", debugstr_a(lpProvider
), hWnd
, flags
, info
);
274 /*****************************************************************
275 * PwdChangePasswordA [MPR.@]
277 DWORD WINAPI
PwdChangePasswordW( LPCWSTR lpProvider
, HWND hWnd
, DWORD flags
, LPCHANGEPWDINFOW info
)
279 FIXME("%s %p %lx %p\n", debugstr_w(lpProvider
), hWnd
, flags
, info
);