IFont::ReleaseHfont method

Notifies the font object that the caller that previously locked this font in the cache with IFont::AddRefHfont no longer requires the lock.

Syntax


HRESULT ReleaseHfont(
  [in] HFONT hFont
);

Parameters

hFont [in]

A font handle previously realized through IFont::get_hFont. This value was passed to a previous call to IFont::AddRefHfont to lock the font, and the caller would now like to unlock the font in the cache.

Return value

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

Return codeDescription
S_OK

The font was unlocked successfully.

S_FALSE

The font was not locked in the cache. This return value is a benign notification to the caller that it may have a font reference counting problem.

 

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
IFont::AddRefHfont

 

 

Show: