Re: How determine the Source application of an OLE Drag & Drop?




"Al Koch" <AlKoch@xxxxxxxxxxxxx> wrote in message
news:ocdb32t2q00c90nselmsbut8fvn0uoe6i9@xxxxxxxxxx
Hello,

My application serves as a Drop Target so that other applications can drop
data onto it. I need to determine what application was
the Drop Source. It is my understanding that OLE D&D uses the clipboard
for its operations. If that is correct it seems that
(unless there is a straightforward way to determine this) that it ought to
be possible to determine the source by way of the
clipboard. (I can determine the app that places something on the
Clipboard with ::GetClipboardOwner() followed by a bunch of
additional work.) But I don't see how to do this for D&D. Since the Drag
Source can be one of many other apps I have no control
over what is put in the data that is drug. How can this be done?

Thank you,
Al Koch
AlKoch@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

In general this it is not possible. Drag+Drop is implemented on top of
COM/RPC and these protocols provide no method to obtain the source of an
operation. If you are trying to detect if it is one of *your* applications
at the source, then simply get it to supply a special clipboard-format (such
as a DWORD which holds the process-id) in the IDataObject so that the target
can check for the existance of this format and then query the
source-application this way.

James
--
Microsoft MVP - Windows SDK
www.catch22.net
Free Win32 Source and Tutorials


.



Relevant Pages

  • How determine the Source application of an OLE Drag & Drop?
    ... My application serves as a Drop Target so that other applications can drop data onto it. ... It is my understanding that OLE D&D uses the clipboard for its operations. ... (I can determine the app that places something on the Clipboard with::GetClipboardOwner() ...
    (microsoft.public.win32.programmer.kernel)
  • How determine the Source application of an OLE Drag & Drop?
    ... My application serves as a Drop Target so that other applications can drop data onto it. ... It is my understanding that OLE D&D uses the clipboard for its operations. ... (I can determine the app that places something on the Clipboard with::GetClipboardOwner() ...
    (microsoft.public.win32.programmer.ole)
  • Re: How determine the Source application of an OLE Drag & Drop?
    ... DnD does _not_ use the clipboard, not sure how did you come ... Microsoft MVP, MCSD ... My application serves as a Drop Target so that other applications can drop ... (I can determine the app that places something on the ...
    (microsoft.public.win32.programmer.ole)
  • Re: Penetrating a PC through a printer device
    ... > compromise the connected target PC if you gained control of the printer? ... Audit your website security with Acunetix Web Vulnerability Scanner: ... Hackers are concentrating their efforts on attacking applications on your ... Cross site scripting and other web attacks before hackers do! ...
    (Pen-Test)
  • Re: access runtime error
    ... I have seen 'strange' errors in applications that ... sometimes related back to a missing library/reference on the target ... Are you sure all libraries are installed on the target ... Your eyes are weary from staring at the CRT. ...
    (microsoft.public.access.modulesdaovba)