About WinHTTP API behavior with multiple network interfaces

tubasaokym 1 Reputation point
2021-01-15T05:35:24.687+00:00

I'm currently developing a tool(by VC++) to access a web server using the WinHttp API below.
WinHttpOpen
WinHttpConnect
WinHttpOpenRequest
WinHttpSendRequest
WinHttpReceiveResponse

If multiple network interfaces (NICs) exist, the above API is supposed to automatically select the network interface to use.
If the above API cannot access the target web server using the first selected NIC (URL does not exist, timeout, etc.), will it automatically retry using a different network interface?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,634 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,742 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Drake Wu - MSFT 991 Reputation points
    2021-01-19T01:33:19.353+00:00

    Hi @tubasaokym , The access type WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY of WinHttpOpen will automatically attempts to handle failover between multiple proxies, different proxy configurations per interface, and authentication.


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.