This documentation is archived and is not being maintained.

JournalReader Class

Provides read access to a Windows Journal file, returning a stream containing an XML version of the file’s contents.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink.JournalReader (in Microsoft.Ink.JournalReader.dll)

'Declaration
<PermissionSetAttribute(SecurityAction.Demand, Name := "FullTrust")> _
Public NotInheritable Class JournalReader
'Usage
Dim instance As JournalReader

The JournalReader class enables you to load a Journal document stream and to receive an XML stream representing the contents. You can reconstitute, display, and manipulate the ink.

In this example, a selected Journal file is converted to XML and displayed to the Console device.

Dim FD As OpenFileDialog = New OpenFileDialog()
FD.Filter = "Journal files(*.jnt)|*.jnt" 
If FD.ShowDialog() = Windows.Forms.DialogResult.OK Then 
    Dim jntStream As Stream = Nothing 
    Dim xmlStream As Stream = Nothing 
    Try
        jntStream = FD.OpenFile()
        If Not IsNothing(jntStream) Then
            xmlStream = JournalReader.ReadFromStream(jntStream)
            Dim xmlDoc As XmlDocument = New XmlDocument()
            xmlDoc.Load(xmlStream)
            Dim xmlTW As XmlTextWriter = New XmlTextWriter(Console.Out)
            xmlTW.Formatting = Formatting.Indented
            xmlDoc.WriteTo(xmlTW)
            xmlTW.Flush()
        End If 

    Catch ex As Exception
        ' handle exception 
    Finally 
        If Not IsNothing(jntStream) Then
            jntStream.Close()
        End If 
        If Not IsNothing(xmlStream) Then
            xmlStream.Close()
        End If 
    End Try 

End If

System.Object
  Microsoft.Ink.JournalReader

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.0
Show: