locked
Wininet vs WinHTTP RRS feed

  • Question

  • Hi all,

    From MSDN, the functionalities of Wininet API seem identical to WinHTTP API in terms of HTTP support. But, Wininet is having more APIs to check the internet connectivity, to setup the configuration, and etc. Is it correct? Will it beneficial to use Wininet api if I want to minimize the timeout frequency in the case of no server return call?

    Thanks.

    Colin

     

     

    Monday, December 20, 2010 5:36 PM

Answers

  • On 12/20/2010 12:36 PM, kccpac wrote:

    From MSDN, the functionalities of Wininet API seem identical to
    WinHTTP API in terms of HTTP support.

    WinInet is designed for client use, for cases where there's a human sitting in front of the monitor. It may display messages on screen, unless you are careful to install all the right callbacks. The application has limited control over caching behavior and cookie store, which are shared system-wide (well, actually, user account-wide). WinInet by default limits the number of connections it makes to the same remote host (to four, if I recall correctly). It supports a number of protocols beyond HTTP[S] (e.g. FTP).

    WinHTTP is designed for use by servers (that for whatever reason need to make HTTP requests to other servers). It never displays any UI. It doesn't limit the number of connections. The calling application has full control (and extra responsibility) for maintaining cache and cookie store. WinHTTP only supports HTTP[S].


    Igor Tandetnik

    • Proposed as answer by Yi Feng Li Monday, December 27, 2010 5:23 AM
    • Marked as answer by Yi Feng Li Wednesday, December 29, 2010 1:50 AM
    Monday, December 20, 2010 5:50 PM

All replies

  • On 12/20/2010 12:36 PM, kccpac wrote:

    From MSDN, the functionalities of Wininet API seem identical to
    WinHTTP API in terms of HTTP support.

    WinInet is designed for client use, for cases where there's a human sitting in front of the monitor. It may display messages on screen, unless you are careful to install all the right callbacks. The application has limited control over caching behavior and cookie store, which are shared system-wide (well, actually, user account-wide). WinInet by default limits the number of connections it makes to the same remote host (to four, if I recall correctly). It supports a number of protocols beyond HTTP[S] (e.g. FTP).

    WinHTTP is designed for use by servers (that for whatever reason need to make HTTP requests to other servers). It never displays any UI. It doesn't limit the number of connections. The calling application has full control (and extra responsibility) for maintaining cache and cookie store. WinHTTP only supports HTTP[S].


    Igor Tandetnik

    • Proposed as answer by Yi Feng Li Monday, December 27, 2010 5:23 AM
    • Marked as answer by Yi Feng Li Wednesday, December 29, 2010 1:50 AM
    Monday, December 20, 2010 5:50 PM
  • Hello,

    Would you mind letting me know the result of the suggestions? If you need further assistance, feel free to let me know. I will be more than happy to be of assistance.

    Regards,

    Yi Feng Li


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, December 27, 2010 5:23 AM