H
HW
Hi, I'm getting a SystemUnAuthorised exception with the following bit
of code, separated out for clarity
Dim memStr As MemoryStream
memStr = New MemoryStream(imageptr)
picBox.Image = New Bitmap(memStr) <- exception here
Strangely it doesn't get caught by the Try Catch block but only by the
debugger. In the call stack
window it seems to be in mscorlib.dll Sytem.IO.memoryStream.GetBuffer.
imageptr is obtaimed from reading a
an image file which i've checked is not readonly. So why is the BitMap
constructor call throwing this
exception.
of code, separated out for clarity
Dim memStr As MemoryStream
memStr = New MemoryStream(imageptr)
picBox.Image = New Bitmap(memStr) <- exception here
Strangely it doesn't get caught by the Try Catch block but only by the
debugger. In the call stack
window it seems to be in mscorlib.dll Sytem.IO.memoryStream.GetBuffer.
imageptr is obtaimed from reading a
an image file which i've checked is not readonly. So why is the BitMap
constructor call throwing this
exception.