IGetClusterObjectInfo::GetObjectName

The IGetClusterObjectInfo::GetObjectName method retrieves the name of a cluster object.

HRESULT GetObjectName(
  LONG lObjIndex,
  BSTR lpszName,
  LONG *plMaxLength  
);
 

Parameters

lObjIndex
[in] A number representing the zero-based index of the target object. At present, lObjIndex is restricted to the number that can be retrieved by calling IGetClusterDataInfo::GetObjectCount.
lpszName
[out] Pointer to the name of the object associated with lObjIndex. The lpszName parameter can be NULL, indicating that the caller is requesting only the name length.
plMaxLength
[in, out] On input, pointer to the count of characters in the buffer pointed to by the lpszName parameter. The plMaxLength parameter cannot be NULL. On output, pointer to the count of characters in the name stored in the contents of lpszName, including the terminating null character.

Return Values

NOERROR
The operation was successful.
E_INVALIDARG
One or more of the parameters are invalid.
ERROR_MORE_DATA
The buffer pointed to by lpszName is too small to hold the requested name. GetObjectName returns the required number of characters in the contents of plMaxLength.

If GetObjectName is unsuccessful, it can also return an OLE-defined error value.

Remarks

If the lpszName parameter is specified as NULL, GetObjectName returns NOERROR.

QuickInfo

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