ClusterNetworkEnum

The ClusterNetworkEnum function enumerates objects on a network, returning the name of one object with each call.

DWORD WINAPI ClusterNetworkEnum(
  HNETWORKENUM hNetworkEnum,  
  DWORD dwIndex,    
  LPDWORD lpdwType, 
  LPWSTR lpszName,  
  LPDWORD lpcbName  
);
 

Parameters

hNetworkEnum
[in] Handle to an existing enumeration object originally returned by the ClusterNetworkOpenEnum function.
dwIndex
[in] Index used to identify the next entry to be enumerated. This parameter should be zero for the first call to ClusterNetworkEnum and then incremented for subsequent calls.
lpdwType
[out] Pointer to the type of object returned. The following object type is returned with each call:
CLUSTER_NETWORK_ENUM_NETINTERFACES
The object is a network interface.
lpszName
[out] Pointer to the name of the returned object, a NULL-terminated string.
lpcbName
[in, out] On input, pointer to a buffer. On output, pointer to the count of characters in the name pointed to by the lpszName parameter minus the terminating NULL character.

Return Values

ERROR_SUCCESS
The operation was successful.
ERROR_NO_MORE_ITEMS
There are no more objects of the requested type to be returned.
ERROR_MORE_DATA
The buffer pointed to by lpszName is not long enough to hold the required number of characters. The lpcbName parameter has been set to the required buffer length.

Remarks

The ClusterNetworkEnum function is typically used to iterate through a collection of network objects of one or more types. If, for example, an application wants to enumerate all of the network interface objects on a network, it calls ClusterNetworkOpenEnum to open a network enumerator that can process network interface objects. The dwType parameter is set to CLUSTER_NETWORK_ENUM_NETINTERFACES to specify network interfaces as the object type to be enumerated. With the handle that ClusterNetworkOpenEnum returns, the application calls ClusterNetworkEnum repeatedly to retrieve each of the objects. The lpdwType parameter points to the type of object that is retrieved.

QuickInfo

  Version: Use Windows NT Server Enterprise Edition 4.0.
  Windows CE: Unsupported.
  Header: Declared in clusapi.h.