ComponentOne Bitmap for WinForms
C1.Win.C1DX.4.8 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 System.IntPtr, _
       ByVal fileOffset As System.Long, _
       ByVal fragmentSize As System.Long, _
       ByRef fragmentContext As System.IntPtr _
    ) 
    void ReadFileFragment( 
       out System.IntPtr fragmentStart,
       System.long fileOffset,
       System.long fragmentSize,
       out System.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