IFont::Clone method

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

Syntax


HRESULT Clone(
  [out] IFont **ppFont
);

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 value

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

Return codeDescription
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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

OCIdl.h

IDL

OCIdl.idl

IID

IID_IFont is defined as BEF6E002-A874-101A-8BBA-00AA00300CAB

See also

IFont

 

 

Show: