Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygennps.c
Go to the documentation of this file.
00001 /* 00002 * MPR Network Provider Services functions 00003 * 00004 * Copyright 1999 Ulrich Weigand 00005 * Copyright 2004 Mike McCormack for CodeWeavers Inc. 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00020 */ 00021 00022 #include "config.h" 00023 00024 #include <stdarg.h> 00025 00026 #include "windef.h" 00027 #include "winbase.h" 00028 #include "winuser.h" 00029 #include "netspi.h" 00030 #include "wine/debug.h" 00031 #include "winerror.h" 00032 00033 WINE_DEFAULT_DEBUG_CHANNEL(mpr); 00034 00035 #include "wine/unicode.h" 00036 00037 #include "mprres.h" 00038 00039 /*********************************************************************** 00040 * NPS_ProxyPasswordDialog 00041 */ 00042 static INT_PTR WINAPI NPS_ProxyPasswordDialog( 00043 HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam ) 00044 { 00045 HWND hitem; 00046 LPAUTHDLGSTRUCTA lpAuthDlgStruct; 00047 00048 if( uMsg == WM_INITDIALOG ) 00049 { 00050 TRACE("WM_INITDIALOG (%08lx)\n", lParam); 00051 00052 /* save the parameter list */ 00053 lpAuthDlgStruct = (LPAUTHDLGSTRUCTA) lParam; 00054 SetWindowLongPtrW( hdlg, GWLP_USERDATA, lParam ); 00055 00056 if( lpAuthDlgStruct->lpExplainText ) 00057 { 00058 hitem = GetDlgItem( hdlg, IDC_EXPLAIN ); 00059 SetWindowTextA( hitem, lpAuthDlgStruct->lpExplainText ); 00060 } 00061 00062 /* extract the Realm from the proxy response and show it */ 00063 if( lpAuthDlgStruct->lpResource ) 00064 { 00065 hitem = GetDlgItem( hdlg, IDC_REALM ); 00066 SetWindowTextA( hitem, lpAuthDlgStruct->lpResource ); 00067 } 00068 00069 return TRUE; 00070 } 00071 00072 lpAuthDlgStruct = (LPAUTHDLGSTRUCTA) GetWindowLongPtrW( hdlg, GWLP_USERDATA ); 00073 00074 switch( uMsg ) 00075 { 00076 case WM_COMMAND: 00077 if( wParam == IDOK ) 00078 { 00079 hitem = GetDlgItem( hdlg, IDC_USERNAME ); 00080 if( hitem ) 00081 GetWindowTextA( hitem, lpAuthDlgStruct->lpUsername, lpAuthDlgStruct->cbUsername ); 00082 00083 hitem = GetDlgItem( hdlg, IDC_PASSWORD ); 00084 if( hitem ) 00085 GetWindowTextA( hitem, lpAuthDlgStruct->lpPassword, lpAuthDlgStruct->cbPassword ); 00086 00087 EndDialog( hdlg, WN_SUCCESS ); 00088 return TRUE; 00089 } 00090 if( wParam == IDCANCEL ) 00091 { 00092 EndDialog( hdlg, WN_CANCEL ); 00093 return TRUE; 00094 } 00095 break; 00096 } 00097 return FALSE; 00098 } 00099 00100 /***************************************************************** 00101 * NPSAuthenticationDialogA [MPR.@] 00102 */ 00103 DWORD WINAPI NPSAuthenticationDialogA( LPAUTHDLGSTRUCTA lpAuthDlgStruct ) 00104 { 00105 HMODULE hwininet = GetModuleHandleA( "mpr.dll" ); 00106 00107 TRACE("%p\n", lpAuthDlgStruct); 00108 00109 if( !lpAuthDlgStruct ) 00110 return WN_BAD_POINTER; 00111 if( lpAuthDlgStruct->cbStructure < sizeof *lpAuthDlgStruct ) 00112 return WN_BAD_POINTER; 00113 00114 TRACE("%s %s %s\n",lpAuthDlgStruct->lpResource, 00115 lpAuthDlgStruct->lpOUTitle, lpAuthDlgStruct->lpExplainText); 00116 00117 return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_PROXYDLG ), 00118 lpAuthDlgStruct->hwndOwner, NPS_ProxyPasswordDialog, 00119 (LPARAM) lpAuthDlgStruct ); 00120 } 00121 00122 /***************************************************************** 00123 * NPSGetProviderHandleA [MPR.@] 00124 */ 00125 DWORD WINAPI NPSGetProviderHandleA( PHPROVIDER phProvider ) 00126 { 00127 FIXME( "(%p): stub\n", phProvider ); 00128 return WN_NOT_SUPPORTED; 00129 } 00130 00131 /***************************************************************** 00132 * NPSGetProviderNameA [MPR.@] 00133 */ 00134 DWORD WINAPI NPSGetProviderNameA( HPROVIDER hProvider, LPCSTR *lpszProviderName ) 00135 { 00136 FIXME( "(%p, %p): stub\n", hProvider, lpszProviderName ); 00137 return WN_NOT_SUPPORTED; 00138 } 00139 00140 /***************************************************************** 00141 * NPSGetSectionNameA [MPR.@] 00142 */ 00143 DWORD WINAPI NPSGetSectionNameA( HPROVIDER hProvider, LPCSTR *lpszSectionName ) 00144 { 00145 FIXME( "(%p, %p): stub\n", hProvider, lpszSectionName ); 00146 return WN_NOT_SUPPORTED; 00147 } 00148 00149 /***************************************************************** 00150 * NPSSetExtendedErrorA [MPR.@] 00151 */ 00152 DWORD WINAPI NPSSetExtendedErrorA( DWORD NetSpecificError, LPSTR lpExtendedErrorText ) 00153 { 00154 FIXME( "(%08x, %s): stub\n", NetSpecificError, debugstr_a(lpExtendedErrorText) ); 00155 return WN_NOT_SUPPORTED; 00156 } 00157 00158 /***************************************************************** 00159 * NPSSetCustomTextA [MPR.@] 00160 */ 00161 VOID WINAPI NPSSetCustomTextA( LPSTR lpCustomErrorText ) 00162 { 00163 FIXME( "(%s): stub\n", debugstr_a(lpCustomErrorText) ); 00164 } 00165 00166 /***************************************************************** 00167 * NPSCopyStringA [MPR.@] 00168 */ 00169 DWORD WINAPI NPSCopyStringA( LPCSTR lpString, LPVOID lpBuffer, LPDWORD lpdwBufferSize ) 00170 { 00171 FIXME( "(%s, %p, %p): stub\n", debugstr_a(lpString), lpBuffer, lpdwBufferSize ); 00172 return WN_NOT_SUPPORTED; 00173 } 00174 00175 /***************************************************************** 00176 * NPSDeviceGetNumberA [MPR.@] 00177 */ 00178 DWORD WINAPI NPSDeviceGetNumberA( LPSTR lpLocalName, LPDWORD lpdwNumber, LPDWORD lpdwType ) 00179 { 00180 FIXME( "(%s, %p, %p): stub\n", debugstr_a(lpLocalName), lpdwNumber, lpdwType ); 00181 return WN_NOT_SUPPORTED; 00182 } 00183 00184 /***************************************************************** 00185 * NPSDeviceGetStringA [MPR.@] 00186 */ 00187 DWORD WINAPI NPSDeviceGetStringA( DWORD dwNumber, DWORD dwType, LPSTR lpLocalName, LPDWORD lpdwBufferSize ) 00188 { 00189 FIXME( "(%d, %d, %p, %p): stub\n", dwNumber, dwType, lpLocalName, lpdwBufferSize ); 00190 return WN_NOT_SUPPORTED; 00191 } 00192 00193 /***************************************************************** 00194 * NPSNotifyRegisterA [MPR.@] 00195 */ 00196 DWORD WINAPI NPSNotifyRegisterA( enum NOTIFYTYPE NotifyType, NOTIFYCALLBACK pfNotifyCallBack ) 00197 { 00198 FIXME( "(%d, %p): stub\n", NotifyType, pfNotifyCallBack ); 00199 return WN_NOT_SUPPORTED; 00200 } 00201 00202 /***************************************************************** 00203 * NPSNotifyGetContextA [MPR.@] 00204 */ 00205 LPVOID WINAPI NPSNotifyGetContextA( NOTIFYCALLBACK pfNotifyCallBack ) 00206 { 00207 FIXME( "(%p): stub\n", pfNotifyCallBack ); 00208 return NULL; 00209 } 00210 00211 /***************************************************************** 00212 * PwdGetPasswordStatusA [MPR.@] 00213 */ 00214 DWORD WINAPI PwdGetPasswordStatusA( LPCSTR lpProvider, DWORD dwIndex, LPDWORD status ) 00215 { 00216 FIXME("%s %d %p\n", debugstr_a(lpProvider), dwIndex, status ); 00217 *status = 0; 00218 return WN_SUCCESS; 00219 } 00220 00221 /***************************************************************** 00222 * PwdGetPasswordStatusA [MPR.@] 00223 */ 00224 DWORD WINAPI PwdGetPasswordStatusW( LPCWSTR lpProvider, DWORD dwIndex, LPDWORD status ) 00225 { 00226 FIXME("%s %d %p\n", debugstr_w(lpProvider), dwIndex, status ); 00227 *status = 0; 00228 return WN_SUCCESS; 00229 } 00230 00231 /***************************************************************** 00232 * PwdSetPasswordStatusA [MPR.@] 00233 */ 00234 DWORD WINAPI PwdSetPasswordStatusA( LPCSTR lpProvider, DWORD dwIndex, DWORD status ) 00235 { 00236 FIXME("%s %d %d\n", debugstr_a(lpProvider), dwIndex, status ); 00237 return WN_SUCCESS; 00238 } 00239 00240 /***************************************************************** 00241 * PwdSetPasswordStatusW [MPR.@] 00242 */ 00243 DWORD WINAPI PwdSetPasswordStatusW( LPCWSTR lpProvider, DWORD dwIndex, DWORD status ) 00244 { 00245 FIXME("%s %d %d\n", debugstr_w(lpProvider), dwIndex, status ); 00246 return WN_SUCCESS; 00247 } 00248 00249 typedef struct _CHANGEPWDINFOA { 00250 LPSTR lpUsername; 00251 LPSTR lpPassword; 00252 DWORD cbPassword; 00253 } CHANGEPWDINFOA, *LPCHANGEPWDINFOA; 00254 00255 typedef struct _CHANGEPWDINFOW { 00256 LPWSTR lpUsername; 00257 LPWSTR lpPassword; 00258 DWORD cbPassword; 00259 } CHANGEPWDINFOW, *LPCHANGEPWDINFOW; 00260 00261 /***************************************************************** 00262 * PwdChangePasswordA [MPR.@] 00263 */ 00264 DWORD WINAPI PwdChangePasswordA( LPCSTR lpProvider, HWND hWnd, DWORD flags, LPCHANGEPWDINFOA info ) 00265 { 00266 FIXME("%s %p %x %p\n", debugstr_a(lpProvider), hWnd, flags, info ); 00267 return WN_SUCCESS; 00268 } 00269 00270 /***************************************************************** 00271 * PwdChangePasswordA [MPR.@] 00272 */ 00273 DWORD WINAPI PwdChangePasswordW( LPCWSTR lpProvider, HWND hWnd, DWORD flags, LPCHANGEPWDINFOW info ) 00274 { 00275 FIXME("%s %p %x %p\n", debugstr_w(lpProvider), hWnd, flags, info ); 00276 return WN_SUCCESS; 00277 } Generated on Sat May 19 2012 04:22:30 for ReactOS by
1.7.6.1
|