IPart::GetName method (devicetopology.h)

The GetName method gets the friendly name of this part.

Syntax

HRESULT GetName(
  [out] LPWSTR *ppwstrName
);

Parameters

[out] ppwstrName

Pointer to a pointer variable into which the method writes the address of a null-terminated, wide-character string that contains the friendly name of this part. The method allocates the storage for the string. The caller is responsible for freeing the storage, when it is no longer needed, by calling the CoTaskMemFree function. If the GetName call fails, *ppwstrName is NULL. For information about CoTaskMemFree, see the Windows SDK documentation.

Return value

If the method succeeds, it returns S_OK. If it fails, possible return codes include, but are not limited to, the values shown in the following table.

Return code Description
E_POINTER
Pointer ppwstrName is NULL.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header devicetopology.h

See also

IPart Interface