Aurigma Forums
»
Graphics Mill
»
Discussions – Graphics Mill
»
COM object that has been separated from its underlying RCW cannot be used.
Rank: Member
Groups: Guest
Joined: 11/5/2007(UTC) Posts: 10
|
Hi, Below is my code. Code:
#Region "Drag-drop Implementation"
Friend Class DragDropData
Public Pidl As Aurigma.GraphicsMill.WinControls.Pidl
Public Sub New(ByVal itemPidl As Aurigma.GraphicsMill.WinControls.Pidl)
Pidl = itemPidl
End Sub
End Class
Private Sub ThumbNailList_ItemDrag(ByVal sender As Object, ByVal e As Aurigma.GraphicsMill.WinControls.ItemDragEventArgs) Handles ThumbnailListView1.ItemDrag
If e.MouseButton = Windows.Forms.MouseButtons.Left Then
Dim item As Aurigma.GraphicsMill.WinControls.ThumbnailListItem = DirectCast(e.Item, Aurigma.GraphicsMill.WinControls.ThumbnailListItem)
DoDragDrop(New DragDropData(item.Pidl), DragDropEffects.Move)
End If
End Sub
Private Sub BitmapViewerDragEnter(ByVal sender As Object, ByVal e As DragEventArgs) Handles BitmapViewerMainView.DragEnter
If e.Data.GetData(GetType(DragDropData)) IsNot Nothing Then
e.Effect = DragDropEffects.Move
Else
e.Effect = DragDropEffects.None
End If
End Sub
Private Sub BitmapViewerDragDrop(ByVal sender As Object, ByVal e As DragEventArgs) Handles BitmapViewerMainView.DragDrop
Dim myData As DragDropData = DirectCast(e.Data.GetData(GetType(DragDropData)), DragDropData)
If myData IsNot Nothing Then
Dim stream As System.IO.Stream = myData.Pidl.Stream
Dim UserImage As New Aurigma.GraphicsMill.Bitmap(OpenedImage)
Dim MaskImage As New Aurigma.GraphicsMill.Bitmap(stream)
Dim resultImage As New Aurigma.GraphicsMill.Bitmap(UserImage.Width, UserImage.Height, Aurigma.GraphicsMill.PixelFormat.Format32bppArgb)
Dim rf As New RectangleF(0, 0, UserImage.Width, UserImage.Height)
Using combiner As New Combiner(UserImage, rf, rf, CombineMode.Copy, 1, InterpolationMode.HighQuality)
combiner.ApplyMaskTransform(resultImage, MaskImage, BitmapViewerMainView.Bitmap)
End Using
stream.Close()
End If
End Sub
#End Region
For the 1st few time, it runs smoothly, but after that the Error: "COM object that has been separated from its underlying RCW cannot be used." appear. System.Runtime.InteropServices.InvalidComObjectException was unhandled Message="COM object that has been separated from its underlying RCW cannot be used." Source="Aurigma.GraphicsMill.WinControls" StackTrace: at Aurigma.IStream.Commit(STGC grfCommitFlags) at Aurigma.ComStreamWrapper.Close() at Aurigma.ComStreamWrapper.Finalize() Please help. Thanks in advance. Edited by user Monday, December 31, 2007 4:08:46 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 1/31/2005(UTC) Posts: 458
Was thanked: 5 time(s) in 5 post(s)
|
Hello, I have tried to reproduce the issue, but without any success. Could you submit case with whole test project for debug with a short description of the desired functionality? Edited by user Thursday, May 22, 2008 3:03:19 PM(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Member
Groups: Guest
Joined: 11/5/2007(UTC) Posts: 10
|
Hi Alex, Thanks for the reply. The problem already solved. Thank you.
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 1/31/2005(UTC) Posts: 458
Was thanked: 5 time(s) in 5 post(s)
|
Hi, Great news! $) Edited by user Monday, January 7, 2008 12:29:55 PM(UTC)
| Reason: Not specified |
|
|
|
|
Aurigma Forums
»
Graphics Mill
»
Discussions – Graphics Mill
»
COM object that has been separated from its underlying RCW cannot be used.
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.