Reputation: 15613
I've subscribed my winform application to the windows clipboard listener list.
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool AddClipboardFormatListener(IntPtr hwnd);
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
if (m.Msg != WmClipboardupdate) return;
//Do somthin
}
Is there anyway to check the windows clipboard listener list to see what other applications have subscribed there and also make sure that my application has subscribed there just once?
Upvotes: 1
Views: 80
Reputation: 5743
Unfortunately, you can not get the listener list in existing Clipboard API list
You do not need to make sure your application subscribed just once, since the AddClipboardFormatListener
will return false
if same handled registered before.
Upvotes: 1