Willy-Kimura / SharpClipboard

A library for anonymously monitoring clipboard entries.
188 stars 36 forks source link

SourceApplication process id identical to window handle #24

Closed p0ke234 closed 1 year ago

p0ke234 commented 2 years ago

While the values for SourceApplication.path and SourceApplication.name does not do anything, the value for the SourceApplication.ID is not the process ID. SourceApplication.Handle is always = ID.

Tested it with the simple Windows editor, with Visual Studio and some other applications.

Getting the application details is a great idea, hopefully you get it to run.

Willy-Kimura commented 2 years ago

It seems to work quite well in the demo. From which application are the properties not being retrieved? Kindly share more details.

p0ke234 commented 2 years ago

Thanks for responding.

Here comes a simple example (Application ClipboardTest):

private void ClipboardChanged(Object sender, ClipboardChangedEventArgs e) { Console.WriteLine("Clipboard Changed - " + e.SourceApplication.ID + " / " + e.SourceApplication.Handle + " / " + e.SourceApplication.Name); } No matter if I do a STRG+C in chrome, in the windows explorer or somewhere else, it always gives me this: Clipboard Changed - 197572 / 197572 / ClipboardTest.exe Clipboard Changed - 722358 / 722358 / ClipboardTest.exe Clipboard Changed - 197572 / 197572 / ClipboardTest.exe Clipboard Changed - 396080 / 396080 / ClipboardTest.exe Clipboard Changed - 197572 / 197572 / ClipboardTest.exe Clipboard Changed - 722358 / 722358 / ClipboardTest.exe

Willy-Kimura commented 1 year ago

Hello @p0ke234 Just found out where the issue lies. Will be making a release on this soon.