WNetGetNetworkInformationW function

The WNetGetNetworkInformation function returns extended information about a specific network provider whose name was returned by a previous network enumeration.

Syntax

DWORD WNetGetNetworkInformationW(
  LPCWSTR         lpProvider,
  LPNETINFOSTRUCT lpNetInfoStruct
);

Parameters

lpProvider

Pointer to a constant null-terminated string that contains the name of the network provider for which information is required.

lpNetInfoStruct

Pointer to a NETINFOSTRUCT structure. The structure describes characteristics of the network.

Return Value

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is a system error code, such as one of the following values.

Return code Description
ERROR_BAD_PROVIDER
The lpProvider parameter does not match any running network provider.
ERROR_BAD_VALUE
The cbStructure member of the NETINFOSTRUCT structure does not contain a valid structure size.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winnetwk.h
Library Mpr.lib
DLL Mpr.dll

See Also

NETINFOSTRUCT

NETRESOURCE

WNetEnumResource

WNetGetProviderName

WNetOpenEnum

Windows Networking (WNet) Overview

Windows Networking Functions