I am developing a software that needs to know when the PASTE EVENT (through the context menu or ctrl+V) happens (only for files / directories). More or less, something like it happens with TeraCopy or Copy Handler. When you copy and then paste, it is TeraCopy that handles the pastings.
I know more or less how to capture the COPY EVENT, you only have to set a ClipboardViewer and you catch all global COPY EVENTS (in fact is called: WM_DRAWCLIPBOARD). You can learn this here:
http://www.radsoftware.com.au/articles/clipboardmonitor.aspx
But the ClipBoardViewer does not provide you with the ability to catch the PASTE EVENT.
The process of state change via "Pasting" is specific to individual applications, as such there is no magic way to discover whether the state of an application changed after accessing the clipboard.
The best you can do is detect whether an application has retrieved data from the clipboard. Again, there's no way of knowing what the application did with this data. It's akin to knowing someone opened their frontdoor without knowing where they went, if anywhere.
If you do want to try this you could do something like hooking the GetClipboardData function. For information about how to palce system-wide API hooks check out the samples in Micrsoft Detours - http://research.microsoft.com/sn/detours
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With