Platform SDK: Windows Networking |
The WNetGetNetworkInformation function returns extended information about a specific network provider whose name was returned by a previous network enumeration.
DWORD WNetGetNetworkInformation( LPCTSTR lpProvider, // provider name LPNETINFOSTRUCT lpNetInfoStruct // network information );
If the function succeeds, the return value is NO_ERROR.
If the function fails, the return value can be one of the following error codes.
Value | Meaning |
---|---|
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. |
For a code sample that illustrates an application-defined function that enumerates all the resources on a network, see Enumerating Network Resources.
Windows NT/2000: Requires Windows NT 4.0 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winnetwk.h.
Library: Use Mpr.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.
Windows Networking (WNet) Overview, Windows Networking Functions, WNetGetProviderName, NETINFOSTRUCT, NETRESOURCE, WNetOpenEnum, WNetEnumResource