ComponentOne Bitmap for WPF
C1.WPF.DX.4.5.2 Assembly / C1.Util.DX.DirectWrite Namespace / FontFileStream Interface / ReadFileFragment Method
When this method returns, contains an address of a reference to the start of the font file fragment. This parameter is passed uninitialized.
The offset of the fragment, in bytes, from the beginning of the font file.
The size of the file fragment, in bytes.
When this method returns, contains the address of

In This Topic
    ReadFileFragment Method (FontFileStream)
    In This Topic
    Reads a fragment from a font file.
    Syntax
    'Declaration
     
    Sub ReadFileFragment( _
       ByRef fragmentStart As IntPtr, _
       ByVal fileOffset As Long, _
       ByVal fragmentSize As Long, _
       ByRef fragmentContext As IntPtr _
    ) 
    void ReadFileFragment( 
       out IntPtr fragmentStart,
       long fileOffset,
       long fragmentSize,
       out IntPtr fragmentContext
    )

    Parameters

    fragmentStart
    When this method returns, contains an address of a reference 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
    When this method returns, contains the address of

    Return Value

    a reference to a reference to the client-defined context to be passed to {{ReleaseFileFragment}}.
    Remarks
    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 FontFileStream 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.
    See Also