IFont::Clone

Creates a duplicate font object with a state identical to the current font.

HRESULT Clone(
  IFont** ppfont  //Address of output variable that receives the 
                  //IFont interface pointer
);
 

Parameters

ppfont
[out] Address of IFont* pointer variable that receives the interface pointer to the new font object. The caller must call IFont::Release when this new font object is no longer needed.

Return Values

The method supports the standard return values E_UNEXPECTED and E_OUTOFMEMORY, as well as the following:

S_OK
The new font object was successfully created.
E_NOTIMPL
This font object does not support cloning.
E_POINTER
The address in ppfont is not valid. For example, it may be NULL.

Remarks

Notes to Callers

The new font object is entirely independent of the first. The caller is responsible for releasing this new object when it is no longer needed. This method does not affect the reference count of the font being cloned.

QuickInfo

  Windows NT: Use version 4.0 or later.
  Windows: Use Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in ocidl.h.