David Hedberg : wininet: Make module handle scope global.
Alexandre Julliard
julliard at winehq.org
Mon Dec 20 17:49:49 CST 2010
Module: wine
Branch: master
Commit: 46be41271cd6f4d6264e751ab72c9f5400c90e5e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=46be41271cd6f4d6264e751ab72c9f5400c90e5e
Author: David Hedberg <dhedberg at codeweavers.com>
Date: Sun Dec 19 21:34:27 2010 +0100
wininet: Make module handle scope global.
---
dlls/wininet/dialogs.c | 5 ++---
dlls/wininet/internet.c | 2 +-
dlls/wininet/internet.h | 2 ++
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/wininet/dialogs.c b/dlls/wininet/dialogs.c
index 2c4a527..b3713a5 100644
--- a/dlls/wininet/dialogs.c
+++ b/dlls/wininet/dialogs.c
@@ -490,7 +490,6 @@ DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest,
DWORD dwError, DWORD dwFlags, LPVOID* lppvData)
{
struct WININET_ErrorDlgParams params;
- HMODULE hwininet = GetModuleHandleA( "wininet.dll" );
INT dwStatus;
TRACE("%p %p %d %08x %p\n", hWnd, hRequest, dwError, dwFlags, lppvData);
@@ -512,10 +511,10 @@ DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest,
switch (dwStatus)
{
case HTTP_STATUS_PROXY_AUTH_REQ:
- return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_PROXYDLG ),
+ return DialogBoxParamW( WININET_hModule, MAKEINTRESOURCEW( IDD_PROXYDLG ),
hWnd, WININET_ProxyPasswordDialog, (LPARAM) ¶ms );
case HTTP_STATUS_DENIED:
- return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_AUTHDLG ),
+ return DialogBoxParamW( WININET_hModule, MAKEINTRESOURCEW( IDD_AUTHDLG ),
hWnd, WININET_PasswordDialog, (LPARAM) ¶ms );
default:
WARN("unhandled status %u\n", dwStatus);
diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index 95776df..002f4e4 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -88,7 +88,7 @@ typedef struct
} WITHREADERROR, *LPWITHREADERROR;
static DWORD g_dwTlsErrIndex = TLS_OUT_OF_INDEXES;
-static HMODULE WININET_hModule;
+HMODULE WININET_hModule;
#define HANDLE_CHUNK_SIZE 0x10
diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h
index 86b16bd..3963578 100644
--- a/dlls/wininet/internet.h
+++ b/dlls/wininet/internet.h
@@ -47,6 +47,8 @@
#define ioctlsocket ioctl
#endif /* __MINGW32__ */
+extern HMODULE WININET_hModule;
+
/* used for netconnection.c stuff */
typedef struct
{
More information about the wine-cvs
mailing list