How to take a screenshot of Protected Active Software

Delphi'de kod yazma ile ilgili sorularınızı bu foruma yazabilirsiniz.
Cevapla
ahmadalsaied
Üye
Mesajlar: 1
Kayıt: 30 Mar 2014 03:54

How to take a screenshot of Protected Active Software

Mesaj gönderen ahmadalsaied »

For Capture the Screen Shot of the Active Window, I use a source code http://delphi.about.com/od/adptips2006/ ... active.htm with this code in Delphi:

Kod: Tümünü seç

procedure ScreenShot(activeWindow: bool; destBitmap : TBitmap) ;
 var
    w,h : integer;
    DC : HDC;
    hWin : Cardinal;
    r : TRect;
 begin
    if activeWindow then
    begin
      hWin := GetForegroundWindow;
      dc := GetWindowDC(hWin) ;
      GetWindowRect(hWin,r) ;
      w := r.Right - r.Left;
      h := r.Bottom - r.Top;
    end
    else
    begin
      hWin := GetDesktopWindow;
      dc := GetDC(hWin) ;
      w := GetDeviceCaps (DC, HORZRES) ;
      h := GetDeviceCaps (DC, VERTRES) ;
    end;

    try
     destBitmap.Width := w;
     destBitmap.Height := h;
     BitBlt(destBitmap.Canvas.Handle,
            0,
            0,
            destBitmap.Width,
            destBitmap.Height,
            DC,
            0,
            0,
            SRCCOPY) ;
    finally
     ReleaseDC(hWin, DC) ;
    end;
 end; 

Usage:

 var
    b:TBitmap;
 begin
   b := TBitmap.Create;
   try
     ScreenShot(TRUE, b) ;
     Image1.Picture.Bitmap.Assign(b) ;
   finally
     b.FreeImage;
     FreeAndNil(b) ;
   end;
How can I convert that to take a screenshot of a Protected active software like Oxynger KeyShield http://www.oxynger.com/download.html?
Please help me
Kullanıcı avatarı
G.Arkas
Üye
Mesajlar: 829
Kayıt: 01 Eki 2007 07:16
Konum: İstanbul
İletişim:

Re: How to take a screenshot of Protected Active Software

Mesaj gönderen G.Arkas »

Hi;

Please try Direct-x capture method. If it does not work then you have to solve it with the hooking.

Search from google :ara Delphi screen hook and :ara Directx Screen Capture.
Resim
xxxjedixxx
Üye
Mesajlar: 216
Kayıt: 10 Ara 2013 03:50

Re: How to take a screenshot of Protected Active Software

Mesaj gönderen xxxjedixxx »

That's it.

Kırıldı !!!
Resim

Mevzu şu;
Windows 7 ile birlikte gelen bu tür güvenlik işleri için bir api var. Bu api ile formunuzun capture yapılmasını engelleyebiliyorsunuz.

Kod: Tümünü seç

function SetWindowDisplayAffinity(hWnd: Integer; dwAffinity: Integer): Boolean; stdcall; external 'User32.dll';

SetWindowDisplayAffinity(Handle, 1); // görüntü yakalama devre dışı - capture not allowed
SetWindowDisplayAffinity(Handle, 0); // görüntü yakalama tekrar aktif - capture allowed
yukarıdaki kodları kendi formunuzda deneyebilirsiniz. Fakat Oxynger KeyShield programının handle'ını kullanarak denerseniz başarısız olursunuz. Bu kodu oxynger'ın kendisine yaptırmanız gerekiyor. Bu konu da hack konularına girdiği için devam etmiyorum.
Cevapla