INetwork::GetCategory method (netlistmgr.h)

The GetCategory method returns the category of a network.

Syntax

HRESULT GetCategory(
  [out] NLM_NETWORK_CATEGORY *pCategory
);

Parameters

[out] pCategory

Pointer to a NLM_NETWORK_CATEGORY enumeration value that specifies the category information for the network.

Return value

Returns S_OK if the method succeeds.

Remarks

The private or public network categories must never be used to assume which Windows Firewall ports are open, as the user can change the default settings of these categories. Instead, Windows Firewall APIs should be called to ensure the ports that the required ports are open.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header netlistmgr.h

See also

INetwork

NLM_NETWORK_CATEGORY