Detecting drag and drop operations in an external application using .Net

I need to detect drag and drop operations in an external application , is this possible? I was thinking of writing a hook to detect these operations. Can someone point me in the right direction, how far can I try to connect messages or api functions to detect drag and drop events? I want to do this in C #.

Thanks in advance.

+3
source share
3 answers

There are two obvious ways you can go to try this.

-, OLE, . , , . - - ( ), , .

, , RegisterDragDrop, DoDragDrop . RegisterDragDrop IDropTarget (, IPC ), RevokeDragDrop, , . IDropTarget:: Drop, , IPC.

-, Windows- . , , , , /. - WH_CALLWNDPROC, SetWindowsHookEx. WndProc, , ( ), , , .

, #. p\invoke SetWindowsHookEx, COM- ( , COM-) #. Infact, IDropTarget .NET 2.0; COM .

, API- , , , C ++, - . Detours, Microsoft.

+2

, , . ( , - , ), - C/++ #.

, Windows SDK. , p/invoke, , SDK . , , Spy ++ - .

Windows . , , , . , codeproject.com .

; , .

0

, Windows-API, , # ++.
MS.
, HCBT_ACTIVATE ( ) HCBT_CLICKSKIPPED ( ) - .
Auto It Window Info - - , - .

0

Source: https://habr.com/ru/post/1723061/


All Articles