IGroupPolicyObject::GetMachineName method

The GetMachineName method retrieves the computer name of the remote GPO. This is the name specified by the OpenRemoteMachineGPO method.

Syntax

HRESULT GetMachineName(
  LPOLESTR pszName,
  int      cchMaxLength
);

Parameters

pszName

Pointer to a buffer that receives the computer name.

cchMaxLength

Specifies the size, in characters, of the pszName buffer.

Return Value

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

Requirements

   
Windows version Windows Vista Windows Server 2008
Target Platform Windows
Header gpedit.h
DLL Gpedit.dll

See Also

Group Policy Interfaces

Group Policy Overview

IGroupPolicyObject

OpenRemoteMachineGPO