Edit

About WinINet

Important

When to use WinINet — WinINet is the right choice for desktop client applications that need to share the user's Internet Options proxy settings, cookie jar, and credential cache. It provides automatic credential prompting and integrates with Internet Explorer security zones.

Do NOT use WinINet for:

  • Windows services or server-side code — use WinHTTP instead (supports impersonation and session isolation)
  • Modern UWP/WinUI apps — use Windows.Web.Http (C++/WinRT) or System.Net.Http.HttpClient (.NET)
  • Cross-platform applications — use a portable library such as libcurl

WinINet is not supported in services and will fail or behave unexpectedly when called from a service context. See WinINet vs. WinHTTP for a detailed feature comparison.

Note

For app containers since Windows 10, version 1709, HTTP/2 (see RFC7540) is on by default.

The Windows Internet (WinINet) application programming interface (API) enables your application to interact with FTP and HTTP protocols to access Internet resources. As standards evolve, these functions handle the changes in underlying protocols, enabling them to maintain consistent behavior.

Windows XP and Windows Server 2003 R2 and earlier: Also enabled applications to interact with Gopher.

For more information, see:

Internet Protocols

The two primary Internet protocols are FTP and HTTP. For more information about these protocols, see the Request For Comments (RFC) documents for FTP and HTTP:

  • RFC 959, File Transfer Protocol (FTP).
  • RFC 1945, Hypertext Transfer Protocol - HTTP/1.0.
  • RFC 2616, Hypertext Transfer Protocol - HTTP/1.1.

Note

(These resources may not be available in some languages and countries.)

Windows XP and Windows Server 2003 R2 and earlier: The Gopher protocol was also supported. See RFC 1436, The Internet Gopher Protocol.