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 code | Description |
|---|---|
|
The lpProvider parameter does not match any running network provider. |
|
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 |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | WNetGetNetworkInformationW (Unicode) and WNetGetNetworkInformationA (ANSI) |
See also
- Windows Networking (WNet) Overview
- Windows Networking Functions
- WNetGetProviderName
- NETINFOSTRUCT
- NETRESOURCE
- WNetOpenEnum
- WNetEnumResource