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 hitem
= GetDlgItem( hdlg
, IDC_USERNAME
);
81 GetWindowTextA( hitem
, lpAuthDlgStruct
->lpUsername
, lpAuthDlgStruct
->cbUsername
);
83 hitem
= GetDlgItem( hdlg
, IDC_PASSWORD
);
85 GetWindowTextA( hitem
, lpAuthDlgStruct
->lpPassword
, lpAuthDlgStruct
->cbPassword
);
87 EndDialog( hdlg
, WN_SUCCESS
);
90 if( wParam
== IDCANCEL
)
92 EndDialog( hdlg
, WN_CANCEL
);
100 /*****************************************************************
101 * NPSAuthenticationDialogA [MPR.@]
103 DWORD WINAPI
NPSAuthenticationDialogA( LPAUTHDLGSTRUCTA lpAuthDlgStruct
)
105 HMODULE hwininet
= GetModuleHandleA( "mpr.dll" );
107 TRACE("%p\n", lpAuthDlgStruct
);
109 if( !lpAuthDlgStruct
)
110 return WN_BAD_POINTER
;
111 if( lpAuthDlgStruct
->cbStructure
< sizeof *lpAuthDlgStruct
)
112 return WN_BAD_POINTER
;
114 TRACE("%s %s %s\n",lpAuthDlgStruct
->lpResource
,
115 lpAuthDlgStruct
->lpOUTitle
, lpAuthDlgStruct
->lpExplainText
);
117 return DialogBoxParamW( hwininet
, MAKEINTRESOURCEW( IDD_PROXYDLG
),
118 lpAuthDlgStruct
->hwndOwner
, NPS_ProxyPasswordDialog
,
119 (LPARAM
) lpAuthDlgStruct
);
122 /*****************************************************************
123 * NPSGetProviderHandleA [MPR.@]
125 DWORD WINAPI
NPSGetProviderHandleA( PHPROVIDER phProvider
)
127 FIXME( "(%p): stub\n", phProvider
);
128 return WN_NOT_SUPPORTED
;
131 /*****************************************************************
132 * NPSGetProviderNameA [MPR.@]
134 DWORD WINAPI
NPSGetProviderNameA( HPROVIDER hProvider
, LPCSTR
*lpszProviderName
)
136 FIXME( "(%p, %p): stub\n", hProvider
, lpszProviderName
);
137 return WN_NOT_SUPPORTED
;
140 /*****************************************************************
141 * NPSGetSectionNameA [MPR.@]
143 DWORD WINAPI
NPSGetSectionNameA( HPROVIDER hProvider
, LPCSTR
*lpszSectionName
)
145 FIXME( "(%p, %p): stub\n", hProvider
, lpszSectionName
);
146 return WN_NOT_SUPPORTED
;
149 /*****************************************************************
150 * NPSSetExtendedErrorA [MPR.@]
152 DWORD WINAPI
NPSSetExtendedErrorA( DWORD NetSpecificError
, LPSTR lpExtendedErrorText
)
154 FIXME( "(%08x, %s): stub\n", NetSpecificError
, debugstr_a(lpExtendedErrorText
) );
155 return WN_NOT_SUPPORTED
;
158 /*****************************************************************
159 * NPSSetCustomTextA [MPR.@]
161 VOID WINAPI
NPSSetCustomTextA( LPSTR lpCustomErrorText
)
163 FIXME( "(%s): stub\n", debugstr_a(lpCustomErrorText
) );
166 /*****************************************************************
167 * NPSCopyStringA [MPR.@]
169 DWORD WINAPI
NPSCopyStringA( LPCSTR lpString
, LPVOID lpBuffer
, LPDWORD lpdwBufferSize
)
171 FIXME( "(%s, %p, %p): stub\n", debugstr_a(lpString
), lpBuffer
, lpdwBufferSize
);
172 return WN_NOT_SUPPORTED
;
175 /*****************************************************************
176 * NPSDeviceGetNumberA [MPR.@]
178 DWORD WINAPI
NPSDeviceGetNumberA( LPSTR lpLocalName
, LPDWORD lpdwNumber
, LPDWORD lpdwType
)
180 FIXME( "(%s, %p, %p): stub\n", debugstr_a(lpLocalName
), lpdwNumber
, lpdwType
);
181 return WN_NOT_SUPPORTED
;
184 /*****************************************************************
185 * NPSDeviceGetStringA [MPR.@]
187 DWORD WINAPI
NPSDeviceGetStringA( DWORD dwNumber
, DWORD dwType
, LPSTR lpLocalName
, LPDWORD lpdwBufferSize
)
189 FIXME( "(%d, %d, %p, %p): stub\n", dwNumber
, dwType
, lpLocalName
, lpdwBufferSize
);
190 return WN_NOT_SUPPORTED
;
193 /*****************************************************************
194 * NPSNotifyRegisterA [MPR.@]
196 DWORD WINAPI
NPSNotifyRegisterA( enum NOTIFYTYPE NotifyType
, NOTIFYCALLBACK pfNotifyCallBack
)
198 FIXME( "(%d, %p): stub\n", NotifyType
, pfNotifyCallBack
);
199 return WN_NOT_SUPPORTED
;
202 /*****************************************************************
203 * NPSNotifyGetContextA [MPR.@]
205 LPVOID WINAPI
NPSNotifyGetContextA( NOTIFYCALLBACK pfNotifyCallBack
)
207 FIXME( "(%p): stub\n", pfNotifyCallBack
);
211 /*****************************************************************
212 * PwdGetPasswordStatusA [MPR.@]
214 DWORD WINAPI
PwdGetPasswordStatusA( LPCSTR lpProvider
, DWORD dwIndex
, LPDWORD status
)
216 FIXME("%s %d %p\n", debugstr_a(lpProvider
), dwIndex
, status
);
221 /*****************************************************************
222 * PwdGetPasswordStatusA [MPR.@]
224 DWORD WINAPI
PwdGetPasswordStatusW( LPCWSTR lpProvider
, DWORD dwIndex
, LPDWORD status
)
226 FIXME("%s %d %p\n", debugstr_w(lpProvider
), dwIndex
, status
);
231 /*****************************************************************
232 * PwdSetPasswordStatusA [MPR.@]
234 DWORD WINAPI
PwdSetPasswordStatusA( LPCSTR lpProvider
, DWORD dwIndex
, DWORD status
)
236 FIXME("%s %d %d\n", debugstr_a(lpProvider
), dwIndex
, status
);
240 /*****************************************************************
241 * PwdSetPasswordStatusW [MPR.@]
243 DWORD WINAPI
PwdSetPasswordStatusW( LPCWSTR lpProvider
, DWORD dwIndex
, DWORD status
)
245 FIXME("%s %d %d\n", debugstr_w(lpProvider
), dwIndex
, status
);
249 typedef struct _CHANGEPWDINFOA
{
253 } CHANGEPWDINFOA
, *LPCHANGEPWDINFOA
;
255 typedef struct _CHANGEPWDINFOW
{
259 } CHANGEPWDINFOW
, *LPCHANGEPWDINFOW
;
261 /*****************************************************************
262 * PwdChangePasswordA [MPR.@]
264 DWORD WINAPI
PwdChangePasswordA( LPCSTR lpProvider
, HWND hWnd
, DWORD flags
, LPCHANGEPWDINFOA info
)
266 FIXME("%s %p %x %p\n", debugstr_a(lpProvider
), hWnd
, flags
, info
);
270 /*****************************************************************
271 * PwdChangePasswordA [MPR.@]
273 DWORD WINAPI
PwdChangePasswordW( LPCWSTR lpProvider
, HWND hWnd
, DWORD flags
, LPCHANGEPWDINFOW info
)
275 FIXME("%s %p %x %p\n", debugstr_w(lpProvider
), hWnd
, flags
, info
);