Condividi tramite


Funzione GetClusterFromNetwork (clusapi.h)

Restituisce un handle al cluster associato a una rete. Il tipo PCLUSAPI_GET_CLUSTER_FROM_NETWORK definisce un puntatore a questa funzione.

Sintassi

HCLUSTER GetClusterFromNetwork(
  [in] HNETWORK hNetwork
);

Parametri

[in] hNetwork

Gestire la rete.

Valore restituito

Se l'operazione ha esito positivo, la funzione restituisce un handle al cluster proprietario della rete.

Se l'operazione non riesce, la funzione restituisce NULL. Per altre informazioni sull'errore, chiamare GetLastError.

Commenti

Affinché hNetwork sia un handle valido, deve necessariamente essere presente un handle cluster aperto (vedere OpenClusterNetwork). GetClusterFromNetwork restituisce un'altra istanza dell'handle da cui è stato ottenuto hNetwork .

Assicurarsi di chiamare CloseCluster sull'handle restituito da GetClusterFromNetwork prima che l'handle esula dall'ambito. La chiusura di questo handle non invalida hNetwork o l'handle del cluster da cui è stato ottenuto hNetwork .

Requisiti

Requisito Valore
Client minimo supportato Nessuno supportato
Server minimo supportato Windows Server 2008 Enterprise, Windows Server 2008 Datacenter
Piattaforma di destinazione Windows
Intestazione clusapi.h
Libreria ClusAPI.lib
DLL ClusAPI.dll

Vedi anche

CloseCluster

CloseClusterNetwork

GetClusterFromGroup

GetClusterFromNetInterface

GetClusterFromNode

GetClusterFromResource

OpenCluster

OpenClusterNetwork