IE Hosted Winform control ClipBoard access
I have a WinForms UserControl that supports DragDrop. It works great on a
form. When I try to host it in IE, I'm running into what I think are
security issues. I've worked out most of the problems by Asserting some
permissions, and using Isolated Storage, but I just can't seem to access the
file contents of a file that is dropped on the control. (Drag from Outlook to
the control) I can get the file names from the FileGroupDescriptor, but when
I try to get the contents of the file, things get weird:
new UIPermission(UIPermissionClipboard.AllClipboard).Assert();
// Now we need to get the actual raw data
MemoryStream ms = (MemoryStream) e.Data.GetData("FileContents");
After this line of code (no exception is thrown...) If I look at ms the
debugger has it as <undefined value>.
Any help would be appreciated.
Sean
Date:Thu, 9 Aug 2007 09:08:02 -0700
Author:
|