According to the MSDN, you can specify an access type parameter to InternetOpen. Two of the options for the dwAccessType parameter are:
INTERNET_OPEN_TYPE_DIRECT – Resolves all host names locally.
INTERNET_OPEN_TYPE_PRECONFIG – Retrieves the proxy or direct configuration from the registry.
Which of these should I use? I don’t know which would be “better”. We don’t want our application to do anything clever, all we want it to do is access the internet in a normal way.
INTERNET_OPEN_TYPE_PRECONFIGis what you normally want.INTERNET_OPEN_TYPE_DIRECTmeans it should bypass any proxy that is configured. It can be useful for things like some trouble shooting, but it’s ignoring how the user has things configured, which is rarely a good idea.