Export (0) Print
Expand All
0 out of 2 rated this helpful - Rate this topic

WNetGetNetworkInformation function

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

Syntax


DWORD WNetGetNetworkInformation(
  _In_   LPCTSTR lpProvider,
  _Out_  LPNETINFOSTRUCT lpNetInfoStruct
);

Parameters

lpProvider [in]

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

lpNetInfoStruct [out]

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 codeDescription
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.

 

Examples

For a code sample that illustrates an application-defined function that enumerates all the resources on a network, see Enumerating Network Resources.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winnetwk.h

Library

Mpr.lib

DLL

Mpr.dll

Unicode and ANSI names

WNetGetNetworkInformationW (Unicode) and WNetGetNetworkInformationA (ANSI)

See also

Windows Networking (WNet) Overview
Windows Networking Functions
WNetGetProviderName
NETINFOSTRUCT
NETRESOURCE
WNetOpenEnum
WNetEnumResource

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.