hook GetDesktopWindow 和 GetDC

redant2009 2009-09-14 12:28:33
要禁止截图 想hook GetDesktopWindow 和 GetDC这两个api 不知道怎么写
...全文
994 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
changecode 2012-09-05
  • 打赏
  • 举报
回复
使用全局hook,然后监测系统的bitblt,当勾住的话(系统正要调用bitblt),这个时候你就可以禁止或者在里面做你想做的事情。实际没实践过,只会理论。见笑。
百变狸猫 2011-11-03
  • 打赏
  • 举报
回复
能不能试试使用direct Show显示窗口?比如有些视频在截图的时候那一块就是黑色的.这个比Hook Api简单有效的多,而且还不会让系统不稳定.
TalNaj 2011-03-15
  • 打赏
  • 举报
回复
除非用overlay, 否则还是很难处理防截图的
阿呆_ 2009-10-12
  • 打赏
  • 举报
回复
用WindowFromDC()判断hdcSrc是否来自你要禁止的窗口, 如果是那么直接返回FALSE. 如果不是则调用原始的BitBlt().

不过这个不是那么简单的就能够实现的, 你还必须判断哪个程序在调用BitBlt, 不然你hook后你的程序也没法用BitBlt了。
redant2009 2009-10-11
  • 打赏
  • 举报
回复
我要禁用这个
BOOL BitBlt(
HDC hdcDest, // handle to destination DC
int nXDest, // x-coord of destination upper-left corner
int nYDest, // y-coord of destination upper-left corner
int nWidth, // width of destination rectangle
int nHeight, // height of destination rectangle
HDC hdcSrc, // handle to source DC
int nXSrc, // x-coordinate of source upper-left corner
int nYSrc, // y-coordinate of source upper-left corner
DWORD dwRop // raster operation code
);

要怎么写啊
minizhuxianchun 2009-09-14
  • 打赏
  • 举报
回复
'StretchBlt'
'BitBlt'
'PlgBlt'
'MaskBlt'
TransparentBlt'
'GetDC'
GetWindowDC'
'GetDIBits'
willflyz 2009-09-14
  • 打赏
  • 举报
回复
BitBlt & PrintWindow

BOOL BitBlt(
HDC hdcDest, // handle to destination DC
int nXDest, // x-coord of destination upper-left corner
int nYDest, // y-coord of destination upper-left corner
int nWidth, // width of destination rectangle
int nHeight, // height of destination rectangle
HDC hdcSrc, // handle to source DC
int nXSrc, // x-coordinate of source upper-left corner
int nYSrc, // y-coordinate of source upper-left corner
DWORD dwRop // raster operation code
);

BOOL PrintWindow(
HWND hwnd, // Window to copy
HDC hdcBlt, // HDC to print into
UINT nFlags // Optional flags
);
redant2009 2009-09-14
  • 打赏
  • 举报
回复
那屏幕截图是哪些api 我就是要禁止截图 所以要hook
minizhuxianchun 2009-09-14
  • 打赏
  • 举报
回复
估计你是做的加密软件,我做过。国内的禁止截图没一家有我做的好。不光是HOOK的问题,还涉及到其它问题,否则会异常的。
HeroicDragon 2009-09-14
  • 打赏
  • 举报
回复
HOOK这两个API?

怪异的想法!
蒋晟 2009-09-14
  • 打赏
  • 举报
回复
hook了做什么?如果你改变了这两个API的行为,估计你就禁止了Windows的运行
sanguomi 2009-09-14
  • 打赏
  • 举报
回复
禁止使用这些api

那你还看什么?看黑屏幕?
redant2009 2009-09-14
  • 打赏
  • 举报
回复
谢谢楼上两位 那怎么hook这几个api呢 禁止使用这些api 要怎么写啊

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧