2.用汇编自己写GETpixel
function xiaocall(x1,x2,x3:DWORD):DWORD;
asm
mov eax, $10BF
mov edx, $7FFE0300
call dword ptr [edx]
ret $0C
end;
function GetPixelA(DC: HDC; X, Y: Integer): COLORREF;stdcall
asm
push ebx
mov ebx, dword ptr [ebp+$8]
mov eax, ebx
push edi
and eax, $0FFFF
or edi, $FFFFFFFF
cmp eax, $10000
jnb @@2
shl eax, $4
add eax, dword ptr [$77F33000]
cmp byte ptr [eax+$A], 1
jnz @@2
mov ecx, ebx
shr ecx, $10
cmp word ptr [eax+$8], cx
jnz @@2
mov ecx, dword ptr [eax+$4]
and ecx, $FFFFFFFE
cmp ecx, dword ptr [$77F33004]
jnz @@2
push esi
mov esi, dword ptr [eax+$C]
test esi, esi
je @@1
push dword ptr [ebp+$10]
push dword ptr [ebp+$C]
push ebx
call xiaocall
mov edi, eax
mov eax, dword ptr [esi+$5C]
@@1:
pop esi
@@2:
mov eax, edi
pop edi
pop ebx
end;
可是现在HShield都在驱动级拦截服务SDT,所以应用层对抗没意思了
3.用BITMAP实现
function GetPixelEx(DC: HDC; X, Y: Integer): COLORREF;stdcall
label
js;
var
p:pRGBArray;
yansebmp:TBitmap;
begin
try
Result:=$FFFFFFFF;
yansebmp:=TBitmap.Create;
IF not Assigned(yansebmp) then Exit;
yansebmp.PixelFormat:=pf24bit;