dropmaster from outlook

Support forum for our inter-application drag-n-drop components.

dropmaster from outlook

Postby PlawCoder » Mon Dec 03, 2012 9:54 am

I have a problem with some outlook atachments. These are emails embedded as attachments in an email.
When they are dragged onto a dropmaster enabled control the check for contents gives incorrect information.

hasOutlookFormats := DMTextTarget1.DataObjectHasFormat(sFileGroupDescriptor);
DataObjectTymed := TYMED_ISTREAM;
hasOutlookFormats := DMTextTarget1.DataObjectHasFormat(sFileContents) and hasOutlookFormats ;

On these drags line 1 returns true where line 3 returns false. If I ignore the results from line 3 and then use
DataObjectTymed := TYMED_ISTORAGE;
t := DMTextTarget1.DataObjectGetFormat(sFileContents);
or
DataObjectTymed := TYMED_ISTREAM;
t := DMTextTarget1.DataObjectGetFormat(sFileContents);
to get results, one of these will return that email attachment being dragged.

Is is safe to process the drop this way or is there another method to check the drop contents?
PlawCoder
 
Posts: 3
Joined:
Fri Nov 30, 2012 6:05 pm

Re: dropmaster from outlook

Postby DropMaster » Mon Dec 03, 2012 11:39 am

That should be OK. I'll check to see if I can reproduce this. Where did you grab that original example code from? It looks as though attached emails are embedded as storages rather than as streams, so this could just be a corner case that's missing from the example. You can probably modify the test to be "(has filegroupdescriptor and ((has filecontents on istream) or (has filecontents on istorage)))" in general.

Hope this helps.
_________________________
DropMaster Support
DropMaster
 
Posts: 24
Joined:
Fri Apr 15, 2011 6:32 am

Re: dropmaster from outlook

Postby PlawCoder » Mon Dec 03, 2012 11:46 am

how would i check for
((has filecontents on istream) or (has filecontents on istorage))"
this is with VCL
in the examples it just mentions DataObjectHasFormat('filecontents')

thanks
PlawCoder
 
Posts: 3
Joined:
Fri Nov 30, 2012 6:05 pm

Re: dropmaster from outlook

Postby DropMaster » Mon Dec 03, 2012 12:08 pm

You've been doing it all along.

DataObjectTymed = TYMED_ISTREAM;
hasOutlookFormats := DMTextTarget1.DatatObjectHasFormats(sFileContents);

means "has filecontents on IStream)". (Use TYMED_ISTORAGE instead to check on an IStorage). If you don't assign DataObjectTymed, the default is TYMED_HGLOBAL (a global memory handle). Otherwise, it checks (just once, before reverting to the default) using the medium most recently assigned to DataObjectTymed.

Hope this helps.
_________________________
DropMaster Support
DropMaster
 
Posts: 24
Joined:
Fri Apr 15, 2011 6:32 am

Re: dropmaster from outlook

Postby PlawCoder » Mon Dec 03, 2012 12:12 pm

Thanks that is what I wanted to verify
PlawCoder
 
Posts: 3
Joined:
Fri Nov 30, 2012 6:05 pm


Return to DropMaster

Who is online

Users browsing this forum: No registered users and 1 guest

cron