Drag and drop from Outlook attachment to VB6 application -
I'm experimenting with drag and drop from an email attachment email address to a custom application. It works fine with C #, but now I want to do it in VB6. My test code looks like this:
Personal sub-grdLis_OLEDragDrop (Data MSFlexGridLib.DataObject, as long as the effect of the integer, integer, integer, X single form In the form of changes in Y, Single FileDropped String * 256 dim as lCF_FILEGROUP long as the CF_FILEGROUP integer dim lCF_FILECONTENTS as long as CF_FILECONTENTS, the integer dim bData () Byte dim form of bFileNameData (256) Byte as bData2 () byte lCF_FILEGROUP = RegisterClipboardFormat ("FileGroupDescriptor") MoveMemory CF_FILEGROUP, lCF_FILEGROUP, 2 bData () = Data.GetData (CF_FILEGROUP) j = 0 76 I = 76 for +256 bFileNameData (j) For = bData (i) j = j + 1 next I fileDropped = trim (StrConv (bFileNameData, vbUnicode)) lCF_FILECONTENTS = RegisterClipboardFormat ("FileContents") MoveMemory CF_FILECONTENTS, lCF_FILECONTENTS, 2 bData2 () = Data.GetData (CF_FILECONTENTS)
This file works to get the name but throws an exception to it Data.GetData (CF_FILECONTENTS)
Cal L, and error message says, "Automation error Illegal tymed "
I visited VB6 Ada does not have experience, and I do not know what that error message means or what to do about it. Any help or insight will be appreciated.
After more questions check for more ideas. It is using OLE heavily.
Comments
Post a Comment