IDWriteFontFileStream::ReadFileFragment Method
Reads a fragment from a font file.
Syntax
virtual HRESULT ReadFileFragment(
[out] const void ** fragmentStart,
UINT64 fileOffset,
UINT64 fragmentSize,
[out] void ** fragmentContext
) = 0;
Parameter
fragmentStart [out]
When this method returns, contains an address of a pointer to the start of the font file fragment. This parameter is passed uninitialized.fileOffset
The offset of the fragment, in bytes, from the beginning of the font file.fragmentSize
The size of the file fragment, in bytes.fragmentContext [out]
When this method returns, contains the address of a pointer to a pointer to the client-defined context to be passed to ReleaseFileFragment.
Rückgabewert
Ist Methode erfolgreich, wird "S_OK" zurückgegeben. Andernfalls wird ein HRESULT-Fehlercode zurückgegeben.
Hinweise
Note that ReadFileFragment implementations must check whether the requested font file fragment is within the file bounds. Otherwise, an error should be returned from ReadFileFragment.
DirectWrite may invoke IDWriteFontFileStream methods on the same object from multiple threads simultaneously. Therefore, ReadFileFragment implementations that rely on internal mutable state must serialize access to such state across multiple threads. For example, an implementation that uses separate Seek and Read operations to read a file fragment must place the code block containing Seek and Read calls under a lock or a critical section.
Anforderungen
Mindestens unterstützter Client |
Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista |
Mindestens unterstützter Server |
Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 |
Header |
Dwrite.h |
Bibliothek |
Dwrite.lib |
DLL |
Dwrite.dll |