WinHttpQueryConnectionGroup function (winhttp.h)

Retrieves a description of the current state of WinHttp's connections.

Syntax

WINHTTPAPI DWORD WinHttpQueryConnectionGroup(
  HINTERNET                              hInternet,
  const GUID                             *pGuidConnection,
  ULONGLONG                              ullFlags,
  PWINHTTP_QUERY_CONNECTION_GROUP_RESULT *ppResult
);

Parameters

hInternet

Type: _In_ HINTERNET

A request handle or a connect handle.

If a connect handle, then WinHttp assumes that the host uses HTTPS by default. But you can pass WINHTTP_QUERY_CONNECTION_GROUP_FLAG_INSECURE (0x0000000000000001ull) in ullFlags to indicate that you want non-HTTPS connections.

pGuidConnection

Type: _In_ GUID*

An optional GUID. If provided, then only connections matching the GUID are returned. Otherwise, the function returns all connections to the host (specified in hInternet either by a request handle or a connect handle).

ullFlags

Type: _In_ ULONGLONG

Flags. Pass WINHTTP_QUERY_CONNECTION_GROUP_FLAG_INSECURE to indicate that you want non-HTTPS connections (see hInternet).

ppResult

Type: _Inout_ PWINHTTP_QUERY_CONNECTION_GROUP_RESULT*

The address of a pointer to a WINHTTP_QUERY_CONNECTION_GROUP_RESULT, through which the results are returned.

WinHttp performs an allocation internally, so once you're done with it you must free this pointer by calling WinHttpFreeQueryConnectionGroupResult.

Requirements

Requirement Value
Minimum supported client Windows Build 22000
Minimum supported server Windows Build 22000
Target Platform Windows
Header winhttp.h
Library Winhttp.lib
DLL Winhttp.dll

See also