Export (0) Print
Expand All

ScriptFreeCache function

Frees a script cache.

Syntax


HRESULT ScriptFreeCache(
  _Inout_  SCRIPT_CACHE *psc
);

Parameters

psc [in, out]

Pointer to the SCRIPT_CACHE structure.

Return value

Returns 0 if successful. The function returns a nonzero HRESULT value if it does not succeed. The application cant test the return value with the SUCCEEDED and FAILED macros.

Remarks

An application can free the script cache at any time, with certain limitations if the application is multi-threaded. Uniscribe maintains reference counts in its font and shaper caches and frees font data only when all sizes of the font are free. It frees shaper data only when all supported fonts are freed.

The application should free the script cache for a style when it discards that style.

ScriptFreeCache always sets its parameter to NULL to help avoid misreferencing.

Uniscribe functions are re-entrant. Cache creation is interlocked through a single process-wide semaphore. ScriptFreeCache should not be called at a time when another thread might be accessing the particular cache to free. For performance reasons, the cache is not locked during ScriptShape or ScriptPlace.

Important  Starting with Windows 8: To maintain the ability to run on Windows 7, a module that uses Uniscribe must specify Usp10.lib before gdi32.lib in its library list.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Redistributable

Internet Explorer 5 or later on Windows Me/98/95

Header

Usp10.h

Library

Usp10.lib

DLL

Usp10.dll

See also

Uniscribe
Uniscribe Functions
Caching
SCRIPT_CACHE

 

 

Community Additions

ADD
Show:
© 2014 Microsoft