Wine-20050111 vendor drop Added: vendor/wine/dlls/mpr/Wine-20050111/ Modified: vendor/wine/dlls/mpr/Wine-20050111/mpr.rc Modified: vendor/wine/dlls/mpr/Wine-20050111/mpr_En.rc Modified: vendor/wine/dlls/mpr/Wine-20050111/mprres.h Modified: vendor/wine/dlls/mpr/Wine-20050111/nps.c Modified: vendor/wine/dlls/mpr/Wine-20050111/wnet.c Modified: vendor/wine/dlls/mpr/current/mpr.rc Modified: vendor/wine/dlls/mpr/current/mpr_En.rc Modified: vendor/wine/dlls/mpr/current/mprres.h Modified: vendor/wine/dlls/mpr/current/nps.c Modified: vendor/wine/dlls/mpr/current/wnet.c _____
Copied: vendor/wine/dlls/mpr/Wine-20050111 (from rev 12927, vendor/wine/dlls/mpr/current) _____
Modified: vendor/wine/dlls/mpr/Wine-20050111/mpr.rc --- vendor/wine/dlls/mpr/current/mpr.rc 2005-01-11 20:23:48 UTC (rev 12927) +++ vendor/wine/dlls/mpr/Wine-20050111/mpr.rc 2005-01-11 23:17:12 UTC (rev 12940) @@ -19,6 +19,7 @@
*/ #include "windef.h" #include "winbase.h" +#include "winuser.h" #include "mprres.h"
#include "version.rc" _____
Modified: vendor/wine/dlls/mpr/Wine-20050111/mpr_En.rc --- vendor/wine/dlls/mpr/current/mpr_En.rc 2005-01-11 20:23:48 UTC (rev 12927) +++ vendor/wine/dlls/mpr/Wine-20050111/mpr_En.rc 2005-01-11 23:17:12 UTC (rev 12940) @@ -24,3 +24,23 @@
{ IDS_ENTIRENETWORK "Entire Network" } + +IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Enter Network Password" +FONT 8, "Helv" +{ + LTEXT "Please enter your username and password:", IDC_EXPLAIN, 40, 6, 150, 15 + LTEXT "Proxy", -1, 40, 26, 50, 10 +/* LTEXT "Realm", -1, 40, 46, 50, 10 */ + LTEXT "User", -1, 40, 66, 50, 10 + LTEXT "Password", -1, 40, 86, 50, 10 + LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0 + LTEXT "" IDC_REALM, 80, 46, 150, 14, 0 + EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP + EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD + CHECKBOX "&Save this password (Insecure)", IDC_SAVEPASSWORD, + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} _____
Modified: vendor/wine/dlls/mpr/Wine-20050111/mprres.h --- vendor/wine/dlls/mpr/current/mprres.h 2005-01-11 20:23:48 UTC (rev 12927) +++ vendor/wine/dlls/mpr/Wine-20050111/mprres.h 2005-01-11 23:17:12 UTC (rev 12940) @@ -20,4 +20,13 @@
#define IDS_ENTIRENETWORK 1
+#define IDD_PROXYDLG 0x400 + +#define IDC_PROXY 0x401 +#define IDC_REALM 0x402 +#define IDC_USERNAME 0x403 +#define IDC_PASSWORD 0x404 +#define IDC_SAVEPASSWORD 0x405 +#define IDC_EXPLAIN 0x406 + #endif /* ndef __WINE_MPRRES_H__ */ _____
Modified: vendor/wine/dlls/mpr/Wine-20050111/nps.c --- vendor/wine/dlls/mpr/current/nps.c 2005-01-11 20:23:48 UTC (rev 12927) +++ vendor/wine/dlls/mpr/Wine-20050111/nps.c 2005-01-11 23:17:12 UTC (rev 12940) @@ -2,6 +2,7 @@
* MPR Network Provider Services functions * * Copyright 1999 Ulrich Weigand + * Copyright 2004 Mike McCormack for CodeWeavers Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,24 +19,109 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include "config.h" + #include <stdarg.h>
#include "windef.h" #include "winbase.h" +#include "winuser.h" #include "winnetwk.h" #include "netspi.h" #include "wine/debug.h" +#include "winerror.h"
WINE_DEFAULT_DEBUG_CHANNEL(mpr);
+#include "wine/unicode.h"
+#include "mprres.h" + +/********************************************************************** * + * NPS_ProxyPasswordDialog + */ +static INT_PTR WINAPI NPS_ProxyPasswordDialog( + HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam ) +{ + HWND hitem; + LPAUTHDLGSTRUCTA lpAuthDlgStruct; + + if( uMsg == WM_INITDIALOG ) + { + TRACE("WM_INITDIALOG (%08lx)\n", lParam); + + /* save the parameter list */ + lpAuthDlgStruct = (LPAUTHDLGSTRUCTA) lParam; + SetWindowLongPtrW( hdlg, GWLP_USERDATA, lParam ); + + if( lpAuthDlgStruct->lpExplainText ) + { + hitem = GetDlgItem( hdlg, IDC_EXPLAIN ); + SetWindowTextA( hitem, lpAuthDlgStruct->lpExplainText ); + } + + /* extract the Realm from the proxy response and show it */ + if( lpAuthDlgStruct->lpResource ) + { + hitem = GetDlgItem( hdlg, IDC_REALM ); + SetWindowTextA( hitem, lpAuthDlgStruct->lpResource ); + } + + return TRUE; + } + + lpAuthDlgStruct = (LPAUTHDLGSTRUCTA) GetWindowLongPtrW( hdlg, GWLP_USERDATA ); + + switch( uMsg ) + { + case WM_COMMAND: + if( wParam == IDOK ) + { + WCHAR username[0x20], password[0x20]; + + username[0] = 0; + hitem = GetDlgItem( hdlg, IDC_USERNAME ); + if( hitem ) + GetWindowTextA( hitem, lpAuthDlgStruct->lpUsername, lpAuthDlgStruct->cbUsername ); + + password[0] = 0; + hitem = GetDlgItem( hdlg, IDC_PASSWORD ); + if( hitem ) + GetWindowTextA( hitem, lpAuthDlgStruct->lpPassword, lpAuthDlgStruct->cbPassword ); + + EndDialog( hdlg, WN_SUCCESS ); + return TRUE; + } + if( wParam == IDCANCEL ) + { + EndDialog( hdlg, WN_CANCEL ); + return TRUE; + } + break; + } + return FALSE; +} + /***************************************************************** * NPSAuthenticationDialogA [MPR.@] */ DWORD WINAPI NPSAuthenticationDialogA( LPAUTHDLGSTRUCTA lpAuthDlgStruct ) { - FIXME( "(%p): stub\n", lpAuthDlgStruct ); - return WN_NOT_SUPPORTED; + HMODULE hwininet = GetModuleHandleA( "mpr.dll" ); + + TRACE("%p\n", lpAuthDlgStruct); + + if( !lpAuthDlgStruct ) + return WN_BAD_POINTER; + if( lpAuthDlgStruct->cbStructure < sizeof *lpAuthDlgStruct ) + return WN_BAD_POINTER; + + TRACE("%s %s %s\n",lpAuthDlgStruct->lpResource, + lpAuthDlgStruct->lpOUTitle, lpAuthDlgStruct->lpExplainText); + + return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_PROXYDLG ), + lpAuthDlgStruct->hwndOwner, NPS_ProxyPasswordDialog, + (LPARAM) lpAuthDlgStruct ); }
/***************************************************************** _____
Modified: vendor/wine/dlls/mpr/Wine-20050111/wnet.c --- vendor/wine/dlls/mpr/current/wnet.c 2005-01-11 20:23:48 UTC (rev 12927) +++ vendor/wine/dlls/mpr/Wine-20050111/wnet.c 2005-01-11 23:17:12 UTC (rev 12940) @@ -197,8 +197,7 @@
{ WARN("Provider %s didn't export NPGetCaps\n", debugstr_w(provider)); - if (name) - HeapFree(GetProcessHeap(), 0, name); + HeapFree(GetProcessHeap(), 0, name); FreeLibrary(hLib); } } @@ -311,8 +310,7 @@ HeapFree(GetProcessHeap(), 0, providerTable->table[i].name); FreeModule(providerTable->table[i].hLib); } - if (providerTable->entireNetwork) - HeapFree(GetProcessHeap(), 0, providerTable->entireNetwork); + HeapFree(GetProcessHeap(), 0, providerTable->entireNetwork); HeapFree(GetProcessHeap(), 0, providerTable); providerTable = NULL; } @@ -371,8 +369,7 @@ { if (lpNet) { - if (lpNet->lpRemoteName) - HeapFree(GetProcessHeap(), 0, lpNet->lpRemoteName); + HeapFree(GetProcessHeap(), 0, lpNet->lpRemoteName); HeapFree(GetProcessHeap(), 0, lpNet); } } _____
Modified: vendor/wine/dlls/mpr/current/mpr.rc --- vendor/wine/dlls/mpr/current/mpr.rc 2005-01-11 23:16:12 UTC (rev 12939) +++ vendor/wine/dlls/mpr/current/mpr.rc 2005-01-11 23:17:12 UTC (rev 12940) @@ -19,6 +19,7 @@
*/ #include "windef.h" #include "winbase.h" +#include "winuser.h" #include "mprres.h"
#include "version.rc" _____
Modified: vendor/wine/dlls/mpr/current/mpr_En.rc --- vendor/wine/dlls/mpr/current/mpr_En.rc 2005-01-11 23:16:12 UTC (rev 12939) +++ vendor/wine/dlls/mpr/current/mpr_En.rc 2005-01-11 23:17:12 UTC (rev 12940) @@ -24,3 +24,23 @@
{ IDS_ENTIRENETWORK "Entire Network" } + +IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Enter Network Password" +FONT 8, "Helv" +{ + LTEXT "Please enter your username and password:", IDC_EXPLAIN, 40, 6, 150, 15 + LTEXT "Proxy", -1, 40, 26, 50, 10 +/* LTEXT "Realm", -1, 40, 46, 50, 10 */ + LTEXT "User", -1, 40, 66, 50, 10 + LTEXT "Password", -1, 40, 86, 50, 10 + LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0 + LTEXT "" IDC_REALM, 80, 46, 150, 14, 0 + EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP + EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD + CHECKBOX "&Save this password (Insecure)", IDC_SAVEPASSWORD, + 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} _____
Modified: vendor/wine/dlls/mpr/current/mprres.h --- vendor/wine/dlls/mpr/current/mprres.h 2005-01-11 23:16:12 UTC (rev 12939) +++ vendor/wine/dlls/mpr/current/mprres.h 2005-01-11 23:17:12 UTC (rev 12940) @@ -20,4 +20,13 @@
#define IDS_ENTIRENETWORK 1
+#define IDD_PROXYDLG 0x400 + +#define IDC_PROXY 0x401 +#define IDC_REALM 0x402 +#define IDC_USERNAME 0x403 +#define IDC_PASSWORD 0x404 +#define IDC_SAVEPASSWORD 0x405 +#define IDC_EXPLAIN 0x406 + #endif /* ndef __WINE_MPRRES_H__ */ _____
Modified: vendor/wine/dlls/mpr/current/nps.c --- vendor/wine/dlls/mpr/current/nps.c 2005-01-11 23:16:12 UTC (rev 12939) +++ vendor/wine/dlls/mpr/current/nps.c 2005-01-11 23:17:12 UTC (rev 12940) @@ -2,6 +2,7 @@
* MPR Network Provider Services functions * * Copyright 1999 Ulrich Weigand + * Copyright 2004 Mike McCormack for CodeWeavers Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,24 +19,109 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include "config.h" + #include <stdarg.h>
#include "windef.h" #include "winbase.h" +#include "winuser.h" #include "winnetwk.h" #include "netspi.h" #include "wine/debug.h" +#include "winerror.h"
WINE_DEFAULT_DEBUG_CHANNEL(mpr);
+#include "wine/unicode.h"
+#include "mprres.h" + +/********************************************************************** * + * NPS_ProxyPasswordDialog + */ +static INT_PTR WINAPI NPS_ProxyPasswordDialog( + HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam ) +{ + HWND hitem; + LPAUTHDLGSTRUCTA lpAuthDlgStruct; + + if( uMsg == WM_INITDIALOG ) + { + TRACE("WM_INITDIALOG (%08lx)\n", lParam); + + /* save the parameter list */ + lpAuthDlgStruct = (LPAUTHDLGSTRUCTA) lParam; + SetWindowLongPtrW( hdlg, GWLP_USERDATA, lParam ); + + if( lpAuthDlgStruct->lpExplainText ) + { + hitem = GetDlgItem( hdlg, IDC_EXPLAIN ); + SetWindowTextA( hitem, lpAuthDlgStruct->lpExplainText ); + } + + /* extract the Realm from the proxy response and show it */ + if( lpAuthDlgStruct->lpResource ) + { + hitem = GetDlgItem( hdlg, IDC_REALM ); + SetWindowTextA( hitem, lpAuthDlgStruct->lpResource ); + } + + return TRUE; + } + + lpAuthDlgStruct = (LPAUTHDLGSTRUCTA) GetWindowLongPtrW( hdlg, GWLP_USERDATA ); + + switch( uMsg ) + { + case WM_COMMAND: + if( wParam == IDOK ) + { + WCHAR username[0x20], password[0x20]; + + username[0] = 0; + hitem = GetDlgItem( hdlg, IDC_USERNAME ); + if( hitem ) + GetWindowTextA( hitem, lpAuthDlgStruct->lpUsername, lpAuthDlgStruct->cbUsername ); + + password[0] = 0; + hitem = GetDlgItem( hdlg, IDC_PASSWORD ); + if( hitem ) + GetWindowTextA( hitem, lpAuthDlgStruct->lpPassword, lpAuthDlgStruct->cbPassword ); + + EndDialog( hdlg, WN_SUCCESS ); + return TRUE; + } + if( wParam == IDCANCEL ) + { + EndDialog( hdlg, WN_CANCEL ); + return TRUE; + } + break; + } + return FALSE; +} + /***************************************************************** * NPSAuthenticationDialogA [MPR.@] */ DWORD WINAPI NPSAuthenticationDialogA( LPAUTHDLGSTRUCTA lpAuthDlgStruct ) { - FIXME( "(%p): stub\n", lpAuthDlgStruct ); - return WN_NOT_SUPPORTED; + HMODULE hwininet = GetModuleHandleA( "mpr.dll" ); + + TRACE("%p\n", lpAuthDlgStruct); + + if( !lpAuthDlgStruct ) + return WN_BAD_POINTER; + if( lpAuthDlgStruct->cbStructure < sizeof *lpAuthDlgStruct ) + return WN_BAD_POINTER; + + TRACE("%s %s %s\n",lpAuthDlgStruct->lpResource, + lpAuthDlgStruct->lpOUTitle, lpAuthDlgStruct->lpExplainText); + + return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_PROXYDLG ), + lpAuthDlgStruct->hwndOwner, NPS_ProxyPasswordDialog, + (LPARAM) lpAuthDlgStruct ); }
/***************************************************************** _____
Modified: vendor/wine/dlls/mpr/current/wnet.c --- vendor/wine/dlls/mpr/current/wnet.c 2005-01-11 23:16:12 UTC (rev 12939) +++ vendor/wine/dlls/mpr/current/wnet.c 2005-01-11 23:17:12 UTC (rev 12940) @@ -197,8 +197,7 @@
{ WARN("Provider %s didn't export NPGetCaps\n", debugstr_w(provider)); - if (name) - HeapFree(GetProcessHeap(), 0, name); + HeapFree(GetProcessHeap(), 0, name); FreeLibrary(hLib); } } @@ -311,8 +310,7 @@ HeapFree(GetProcessHeap(), 0, providerTable->table[i].name); FreeModule(providerTable->table[i].hLib); } - if (providerTable->entireNetwork) - HeapFree(GetProcessHeap(), 0, providerTable->entireNetwork); + HeapFree(GetProcessHeap(), 0, providerTable->entireNetwork); HeapFree(GetProcessHeap(), 0, providerTable); providerTable = NULL; } @@ -371,8 +369,7 @@ { if (lpNet) { - if (lpNet->lpRemoteName) - HeapFree(GetProcessHeap(), 0, lpNet->lpRemoteName); + HeapFree(GetProcessHeap(), 0, lpNet->lpRemoteName); HeapFree(GetProcessHeap(), 0, lpNet); } }