要禁止截图 想hook GetDesktopWindow 和 GetDC这两个api  不知道怎么写

解决方案 »

  1.   

    hook了做什么?如果你改变了这两个API的行为,估计你就禁止了Windows的运行
      

  2.   

    HOOK这两个API?   怪异的想法!
      

  3.   

    估计你是做的加密软件,我做过。国内的禁止截图没一家有我做的好。不光是HOOK的问题,还涉及到其它问题,否则会异常的。
      

  4.   

    那屏幕截图是哪些api  我就是要禁止截图 所以要hook
      

  5.   

    BitBlt & PrintWindowBOOL 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
    );
      

  6.   

    'StretchBlt'
    'BitBlt'
    'PlgBlt'
    'MaskBlt'
    TransparentBlt'
    'GetDC'
    GetWindowDC'
    'GetDIBits'
      

  7.   

    谢谢楼上两位 那怎么hook这几个api呢 禁止使用这些api 要怎么写啊
      

  8.   

    禁止使用这些api那你还看什么?看黑屏幕?
      

  9.   

    我要禁用这个
    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
    );要怎么写啊 
      

  10.   

    用WindowFromDC()判断hdcSrc是否来自你要禁止的窗口, 如果是那么直接返回FALSE. 如果不是则调用原始的BitBlt().不过这个不是那么简单的就能够实现的, 你还必须判断哪个程序在调用BitBlt, 不然你hook后你的程序也没法用BitBlt了。
      

  11.   

    除非用overlay, 否则还是很难处理防截图的
      

  12.   

    能不能试试使用direct Show显示窗口?比如有些视频在截图的时候那一块就是黑色的.这个比Hook Api简单有效的多,而且还不会让系统不稳定.
      

  13.   

    使用全局hook,然后监测系统的bitblt,当勾住的话(系统正要调用bitblt),这个时候你就可以禁止或者在里面做你想做的事情。实际没实践过,只会理论。见笑。