Platform SDK: Windows Networking

NETINFOSTRUCT

The NETINFOSTRUCT structure is used in the WNetGetNetworkInformation function. The structure contains information describing the network, such as the version of the network provider software and the network's current status.

typedef struct _NETINFOSTRUCT{
    DWORD cbStructure;    
    DWORD dwProviderVersion;
    DWORD dwStatus; 
    DWORD dwCharacteristics; 
    ULONG_PTR dwHandle; 
    WORD wNetType;
    DWORD dwPrinters;
    DWORD dwDrives;
} NETINFOSTRUCT, *LPNETINFOSTRUCT;

Members

cbStructure
Specifies the size, in bytes, of the NETINFOSTRUCT structure. The caller must supply this value to indicate the size of the structure passed in. Upon return, it has the size of the structure filled in.
dwProviderVersion
Specifies a DWORD value that contains the version number of the network provider software.
dwStatus
Specifies a DWORD value that contains the current status of the network provider software. This member can be one of the following values.
Value Meaning
NO_ERROR The network is running.
ERROR_NO_NETWORK The network is unavailable.
ERROR_BUSY The network is not currently able to service requests, but it should become available shortly. (This value typically indicates that the network is starting up.)

dwCharacteristics
Specifies a DWORD value that contains characteristics of the network provider software.

Windows NT/2000: This value is always set to zero.

Windows 95/98: This member can be one or more of the following values.
Value Meaning
NETINFO_DLL16 The network provider is running as a 16-bit Windows network driver.
NETINFO_DISKRED The network provider requires a redirected local disk drive device to access server file systems.
NETINFO_PRINTERRED The network provider requires a redirected local printer port to access server file systems.

dwHandle
Specifies an instance handle for the network provider or for the 16-bit Windows network driver.
wNetType
Specifies a network type unique to the running network. This value associates resources with a specific network when the resources are persistent or stored in links. You can find a complete list of network types in the header file WinNetwk.h.
dwPrinters
Specifies a DWORD value that contains a set of bit flags indicating the valid print numbers for redirecting local printer devices, with the low-order bit corresponding to LPT1.

Windows 95/98: This value is always set to –1.

dwDrives
Specifies a DWORD value that contains a set of bit flags indicating the valid local disk devices for redirecting disk drives, with the low-order bit corresponding to A: .

Windows 95/98: This value is always set to –1.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Winnetwk.h.

See Also

Windows Networking (WNet) Overview, Windows Networking Structures, WNetGetNetworkInformation