wininet: Make module handle scope global.

This commit is contained in:
David Hedberg 2010-12-19 21:34:27 +01:00 committed by Alexandre Julliard
parent 3ce9304592
commit 46be41271c
3 changed files with 5 additions and 4 deletions

View File

@ -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) &params );
case HTTP_STATUS_DENIED:
return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_AUTHDLG ),
return DialogBoxParamW( WININET_hModule, MAKEINTRESOURCEW( IDD_AUTHDLG ),
hWnd, WININET_PasswordDialog, (LPARAM) &params );
default:
WARN("unhandled status %u\n", dwStatus);

View File

@ -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

View File

@ -47,6 +47,8 @@
#define ioctlsocket ioctl
#endif /* __MINGW32__ */
extern HMODULE WININET_hModule;
/* used for netconnection.c stuff */
typedef struct
{