Discussion:
How to get correct handle from InternetConnect?
(too old to reply)
MilanB
2005-05-06 18:02:04 UTC
Permalink
Hello

I want to avoid IE authentication dialog, that raises when connect to
some site that requires authentication. So I intend to use ActiveX or .NET
control, and pass these parameters insted manual entry. Control will call
function:
InternetSetOption - and set username and password.

But I need correct handle from InternetConnect function as parameter in
InternetSetOption.

How I can retrive correct handle to InternetConnect that refers to opened IE?
Stephen Sulzer
2005-05-11 17:02:05 UTC
Permalink
You cannot access the WinInet InternetConnect handle that Internet Explorer
uses. However, you should not need to anyway. You can pass NULL as the
HINTERNET handle to InternetSetOption for the username and password options.
WinInet implements a global (process-wide) username-password cache, and
passing a NULL handle for these options indicates that the username &
password should go into the process cache--where IE should be able to access
them.

- Stephen
Post by MilanB
Hello
I want to avoid IE authentication dialog, that raises when connect to
some site that requires authentication. So I intend to use ActiveX or .NET
control, and pass these parameters insted manual entry. Control will call
InternetSetOption - and set username and password.
But I need correct handle from InternetConnect function as parameter in
InternetSetOption.
How I can retrive correct handle to InternetConnect that refers to opened IE?
Loading...