none
Microsoft.Ink.JournalReader.dll OutOfMemoryException RRS feed

  • 问题

  • Hi all,
    when i use below code from msdn , it throw a OutOfMemoryException at ReadFromStream(),
    anyone can help me?
    Thanks.
    private void btnLoad_Click(object sender, System.EventArgs e)
    {
     Stream jntStream;
     Stream xmlStream;
     Microsoft.Ink.JournalReader jntReader = new Microsoft.Ink.JournalReader();
     OpenFileDialog openFileDialog1 = new OpenFileDialog();
    
     // Get the filename from the user by using a File Open dialog
     openFileDialog1.InitialDirectory = "c:\\";
     openFileDialog1.Filter = 
      "Journal files (*.jnt)|*.jnt|All files (*.*)|*.*";
     openFileDialog1.FilterIndex = 1;
     openFileDialog1.RestoreDirectory = true;
    
     if (openFileDialog1.ShowDialog() == DialogResult.OK)
     {
      try
      {
       if ((jntStream =  openFileDialog1.OpenFile()) != null)
       {
        // Read in the Journal file
        xmlStream = jntReader.ReadFromStream(jntStream);
    
        // Display results
        DisplayXml(xmlStream);
       }
      }
      catch (System.Exception ex)
      {
        Debug.WriteLine(ex.Message);
      }
      finally
      {
        // Clean up
        xmlStream.Close();
        jntStream.Close();
      }
     }
    }
    
    

    木子纵横 Email: QQQ520qq@sina.com blog: http://blog.csdn.net/muzizongheng
    2011年2月14日 7:11

答案