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
28 #include "wine/debug.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(mpr
);
36 /***********************************************************************
37 * NPS_ProxyPasswordDialog
39 static INT_PTR WINAPI
NPS_ProxyPasswordDialog(
40 HWND hdlg
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
)
43 LPAUTHDLGSTRUCTA lpAuthDlgStruct
;
45 if( uMsg
== WM_INITDIALOG
)
47 TRACE("WM_INITDIALOG (%08Ix)\n", lParam
);
49 /* save the parameter list */
50 lpAuthDlgStruct
= (LPAUTHDLGSTRUCTA
) lParam
;
51 SetWindowLongPtrW( hdlg
, GWLP_USERDATA
, lParam
);
53 if( lpAuthDlgStruct
->lpExplainText
)
55 hitem
= GetDlgItem( hdlg
, IDC_EXPLAIN
);
56 SetWindowTextA( hitem
, lpAuthDlgStruct
->lpExplainText
);
59 /* extract the Realm from the proxy response and show it */
60 if( lpAuthDlgStruct
->lpResource
)
62 hitem
= GetDlgItem( hdlg
, IDC_REALM
);
63 SetWindowTextA( hitem
, lpAuthDlgStruct
->lpResource
);
69 lpAuthDlgStruct
= (LPAUTHDLGSTRUCTA
) GetWindowLongPtrW( hdlg
, GWLP_USERDATA
);
76 hitem
= GetDlgItem( hdlg
, IDC_USERNAME
);
78 GetWindowTextA( hitem
, lpAuthDlgStruct
->lpUsername
, lpAuthDlgStruct
->cbUsername
);
80 hitem
= GetDlgItem( hdlg
, IDC_PASSWORD
);
82 GetWindowTextA( hitem
, lpAuthDlgStruct
->lpPassword
, lpAuthDlgStruct
->cbPassword
);
84 EndDialog( hdlg
, WN_SUCCESS
);
87 if( wParam
== IDCANCEL
)
89 EndDialog( hdlg
, WN_CANCEL
);
97 /*****************************************************************
98 * NPSAuthenticationDialogA [MPR.@]
100 DWORD WINAPI
NPSAuthenticationDialogA( LPAUTHDLGSTRUCTA lpAuthDlgStruct
)
102 HMODULE hwininet
= GetModuleHandleA( "mpr.dll" );
104 TRACE("%p\n", lpAuthDlgStruct
);
106 if( !lpAuthDlgStruct
)
107 return WN_BAD_POINTER
;
108 if( lpAuthDlgStruct
->cbStructure
< sizeof *lpAuthDlgStruct
)
109 return WN_BAD_POINTER
;
111 TRACE("%s %s %s\n",lpAuthDlgStruct
->lpResource
,
112 lpAuthDlgStruct
->lpOUTitle
, lpAuthDlgStruct
->lpExplainText
);
114 return DialogBoxParamW( hwininet
, MAKEINTRESOURCEW( IDD_PROXYDLG
),
115 lpAuthDlgStruct
->hwndOwner
, NPS_ProxyPasswordDialog
,
116 (LPARAM
) lpAuthDlgStruct
);
119 /*****************************************************************
120 * NPSGetProviderHandleA [MPR.@]
122 DWORD WINAPI
NPSGetProviderHandleA( PHPROVIDER phProvider
)
124 FIXME( "(%p): stub\n", phProvider
);
125 return WN_NOT_SUPPORTED
;
128 /*****************************************************************
129 * NPSGetProviderNameA [MPR.@]
131 DWORD WINAPI
NPSGetProviderNameA( HPROVIDER hProvider
, LPCSTR
*lpszProviderName
)
133 FIXME( "(%p, %p): stub\n", hProvider
, lpszProviderName
);
134 return WN_NOT_SUPPORTED
;
137 /*****************************************************************
138 * NPSGetSectionNameA [MPR.@]
140 DWORD WINAPI
NPSGetSectionNameA( HPROVIDER hProvider
, LPCSTR
*lpszSectionName
)
142 FIXME( "(%p, %p): stub\n", hProvider
, lpszSectionName
);
143 return WN_NOT_SUPPORTED
;
146 /*****************************************************************
147 * NPSSetExtendedErrorA [MPR.@]
149 DWORD WINAPI
NPSSetExtendedErrorA( DWORD NetSpecificError
, LPSTR lpExtendedErrorText
)
151 FIXME( "(%08lx, %s): stub\n", NetSpecificError
, debugstr_a(lpExtendedErrorText
) );
152 return WN_NOT_SUPPORTED
;
155 /*****************************************************************
156 * NPSSetCustomTextA [MPR.@]
158 VOID WINAPI
NPSSetCustomTextA( LPSTR lpCustomErrorText
)
160 FIXME( "(%s): stub\n", debugstr_a(lpCustomErrorText
) );
163 /*****************************************************************
164 * NPSCopyStringA [MPR.@]
166 DWORD WINAPI
NPSCopyStringA( LPCSTR lpString
, LPVOID lpBuffer
, LPDWORD lpdwBufferSize
)
168 FIXME( "(%s, %p, %p): stub\n", debugstr_a(lpString
), lpBuffer
, lpdwBufferSize
);
169 return WN_NOT_SUPPORTED
;
172 /*****************************************************************
173 * NPSDeviceGetNumberA [MPR.@]
175 DWORD WINAPI
NPSDeviceGetNumberA( LPSTR lpLocalName
, LPDWORD lpdwNumber
, LPDWORD lpdwType
)
177 FIXME( "(%s, %p, %p): stub\n", debugstr_a(lpLocalName
), lpdwNumber
, lpdwType
);
178 return WN_NOT_SUPPORTED
;
181 /*****************************************************************
182 * NPSDeviceGetStringA [MPR.@]
184 DWORD WINAPI
NPSDeviceGetStringA( DWORD dwNumber
, DWORD dwType
, LPSTR lpLocalName
, LPDWORD lpdwBufferSize
)
186 FIXME( "(%ld, %ld, %p, %p): stub\n", dwNumber
, dwType
, lpLocalName
, lpdwBufferSize
);
187 return WN_NOT_SUPPORTED
;
190 /*****************************************************************
191 * NPSNotifyRegisterA [MPR.@]
193 DWORD WINAPI
NPSNotifyRegisterA( enum NOTIFYTYPE NotifyType
, NOTIFYCALLBACK pfNotifyCallBack
)
195 FIXME( "(%d, %p): stub\n", NotifyType
, pfNotifyCallBack
);
196 return WN_NOT_SUPPORTED
;
199 /*****************************************************************
200 * NPSNotifyGetContextA [MPR.@]
202 LPVOID WINAPI
NPSNotifyGetContextA( NOTIFYCALLBACK pfNotifyCallBack
)
204 FIXME( "(%p): stub\n", pfNotifyCallBack
);
208 /*****************************************************************
209 * PwdGetPasswordStatusA [MPR.@]
211 DWORD WINAPI
PwdGetPasswordStatusA( LPCSTR lpProvider
, DWORD dwIndex
, LPDWORD status
)
213 FIXME("%s %ld %p\n", debugstr_a(lpProvider
), dwIndex
, status
);
218 /*****************************************************************
219 * PwdGetPasswordStatusA [MPR.@]
221 DWORD WINAPI
PwdGetPasswordStatusW( LPCWSTR lpProvider
, DWORD dwIndex
, LPDWORD status
)
223 FIXME("%s %ld %p\n", debugstr_w(lpProvider
), dwIndex
, status
);
228 /*****************************************************************
229 * PwdSetPasswordStatusA [MPR.@]
231 DWORD WINAPI
PwdSetPasswordStatusA( LPCSTR lpProvider
, DWORD dwIndex
, DWORD status
)
233 FIXME("%s %ld %ld\n", debugstr_a(lpProvider
), dwIndex
, status
);
237 /*****************************************************************
238 * PwdSetPasswordStatusW [MPR.@]
240 DWORD WINAPI
PwdSetPasswordStatusW( LPCWSTR lpProvider
, DWORD dwIndex
, DWORD status
)
242 FIXME("%s %ld %ld\n", debugstr_w(lpProvider
), dwIndex
, status
);
246 typedef struct _CHANGEPWDINFOA
{
250 } CHANGEPWDINFOA
, *LPCHANGEPWDINFOA
;
252 typedef struct _CHANGEPWDINFOW
{
256 } CHANGEPWDINFOW
, *LPCHANGEPWDINFOW
;
258 /*****************************************************************
259 * PwdChangePasswordA [MPR.@]
261 DWORD WINAPI
PwdChangePasswordA( LPCSTR lpProvider
, HWND hWnd
, DWORD flags
, LPCHANGEPWDINFOA info
)
263 FIXME("%s %p %lx %p\n", debugstr_a(lpProvider
), hWnd
, flags
, info
);
267 /*****************************************************************
268 * PwdChangePasswordA [MPR.@]
270 DWORD WINAPI
PwdChangePasswordW( LPCWSTR lpProvider
, HWND hWnd
, DWORD flags
, LPCHANGEPWDINFOW info
)
272 FIXME("%s %p %lx %p\n", debugstr_w(lpProvider
), hWnd
, flags
, info
);