Platform SDK: Group Policy

IGroupPolicyObject::GetMachineName

Retrieves the computer name of the remote GPO. This is the name specified by the OpenRemoteMachineGPO method.

HRESULT GetMachineName(
  LPOLESTR pszName,
  int cchMaxLength
);

Parameters

pszName
Pointer to a buffer that receives the computer name.
cchMaxLength
Specifies the maximum number of characters that can be stored in the pszName buffer.

Return Values

If the function succeeds, the return value is S_OK. Otherwise, the function returns one of the COM error codes defined in the Platform SDK header file WinError.h.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Gpedit.h.

See Also

Group Policy Overview, Group Policy Interfaces, IGroupPolicyObject