如何检查插入剪贴板的数据是否来自PrintScreen?
How to check whether data gets inserted into ClipBoard is from PrintScreen?
我写了C++ dll。在此 DLL 中,我连接了两个 WIN API、GetClipboardData 和 SetClipboardData。
所以我想检查 SetClipboardData 中要插入剪贴板的数据是否来自 PrintScreen ?
在 SetClipboardData WIN API 中,如何确定数据是否来自 PrintScreen?
-谢谢
阿吉特
你无法确定。但是,如果剪贴板包含 BITMAP 和 DIB,不包含 TEXT,并且......调用 GetClipboardOwner returns NULL,那么这是一个不错的选择。挂钩 PrintScreen 键可能会有所帮助,但我只会将其用于关联。即记下按下 PrintScreen 时的时间戳,记下剪贴板事件的时间戳,如果它们很接近,则剪贴板上的 Bitmap 和 NULL 所有者可能是由 PrintScreen 键生成的。
我写了C++ dll。在此 DLL 中,我连接了两个 WIN API、GetClipboardData 和 SetClipboardData。 所以我想检查 SetClipboardData 中要插入剪贴板的数据是否来自 PrintScreen ?
在 SetClipboardData WIN API 中,如何确定数据是否来自 PrintScreen?
-谢谢 阿吉特
你无法确定。但是,如果剪贴板包含 BITMAP 和 DIB,不包含 TEXT,并且......调用 GetClipboardOwner returns NULL,那么这是一个不错的选择。挂钩 PrintScreen 键可能会有所帮助,但我只会将其用于关联。即记下按下 PrintScreen 时的时间戳,记下剪贴板事件的时间戳,如果它们很接近,则剪贴板上的 Bitmap 和 NULL 所有者可能是由 PrintScreen 键生成的。