Answered

System.ObjectDisposedException: Cannot access a closed Stream when running this statement MemoryStream stream = (MemoryStream)data.GetData(cbExpression, false)

public ResolvedExpression GetClipBoardExpression()
{
try
{

  1. IDataObject data = Clipboard.GetDataObject();
  2. if (!data.GetDataPresent(cbExpression, false))
  3. return null;
  4. using (MemoryStream stream = (MemoryStream)data.GetData(cbExpression, false)) `**>>>>>> Exception comes here , And this happens when copy and pasting text using ctrl+c and ctrl+v and only using RealVNC veiwer.**
  5. {
  6. BinaryReader reader = new BinaryReader(stream, System.Text.Encoding.UTF8);
  7. }
0

Comments

1 comment
  • Hi Harish, as per the other thread you raised - is this a problem you are facing whilst developing a VNC application using the Developer SDK, or a problem which occurs when using VNC software more generally?

    0
    Comment actions Permalink

Post is closed for comments.

Didn't find what you were looking for?

New post