Skip to content

Commit

Permalink
Merge pull request cheat-engine#213 from remizovm/cleanup_dbk32
Browse files Browse the repository at this point in the history
Remove unused variables
  • Loading branch information
cheat-engine authored Jul 17, 2017
2 parents f4b3554 + b844afe commit 706f5b8
Showing 1 changed file with 4 additions and 25 deletions.
29 changes: 4 additions & 25 deletions Cheat Engine/dbk32/DBK32functions.pas
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,6 @@ function GetSDT:ptruint; stdcall;
function GetCR3(hProcess:THANDLE;var CR3:system.QWORD):BOOL; stdcall;
var cc:dword;
x,y:dword;
i: integer;
_cr3: uint64;
l: THandleListEntry;
begin
Expand Down Expand Up @@ -1021,8 +1020,6 @@ type TInputstruct=record
input: TInputStruct;
physicaladdress: int64 absolute input;
x: dword;
i: integer;

l: THandleListEntry;
begin
result:=false;
Expand Down Expand Up @@ -1369,8 +1366,7 @@ function ReadPhysicalMemory(hProcess:THANDLE;lpBaseAddress:pointer;lpBuffer:poin


function IsValidHandle(hProcess:THandle):BOOL; stdcall;
var i: integer;
l: THandleListEntry;
var l: THandleListEntry;
begin
//outputdebugstring('IsValidHandle');
result:=true; //not in the list is ok
Expand Down Expand Up @@ -1401,16 +1397,12 @@ function ReadProcessMemory64_Internal(processid:dword;lpBaseAddress:UINT64;lpBuf
input: TInputstruct;
cc:dword;

i: integer;
ok: boolean;
br: dword;

mempointer: qword;
bufpointer: ptrUint;
toread: dword;

l: THandleListEntry;
validhandle: boolean;
begin
result:=false;
numberofbytesread:=0;
Expand Down Expand Up @@ -1498,7 +1490,6 @@ function WriteProcessMemory64(hProcess:THANDLE;BaseAddress:qword;lpBuffer:pointe
input: TInputstruct absolute ao[0];
cc:dword;

i: integer;
ok: boolean;
br: dword;

Expand Down Expand Up @@ -1741,21 +1732,15 @@ function {OpenThread}OT(dwDesiredAccess:DWORD;bInheritHandle:BOOL;dwThreadId:DWO


function {OpenProcess}OP(dwDesiredAccess:DWORD;bInheritHandle:BOOL;dwProcessId:DWORD):THANDLE; stdcall;
var valid:boolean;
output: record
var output: record
Processhandle: uint64;
Special: byte;
end;

i:integer;
cc,x: dword;
pbi: _OBJECT_BASIC_INFORMATION;
z: NTSTATUS;

l: thandlelistEntry;
begin
result:=0;
valid:=true;
if dwProcessId=0 then
exit;

Expand Down Expand Up @@ -1811,7 +1796,6 @@ function {OpenProcess}OP(dwDesiredAccess:DWORD;bInheritHandle:BOOL;dwProcessId:D

if result=0 then //you can still access memory using the low level stuff, just not normal stuff
begin
valid:=false;
//openprocess isn't working

result:=InterLockedIncrement(NextPseudoHandle);
Expand Down Expand Up @@ -1891,7 +1875,6 @@ function {OpenProcess}OP(dwDesiredAccess:DWORD;bInheritHandle:BOOL;dwProcessId:D

function MarkAllPagesAsNonAccessed(hProcess: THandle):boolean;
var
i: integer;
input: record
ProcessID: QWORD;
end;
Expand Down Expand Up @@ -1924,9 +1907,8 @@ function MarkAllPagesAsNonAccessed(hProcess: THandle):boolean;

function EnumAccessedPages(hProcess: THandle):integer;
var
i: integer;
input: record
ProcessID: QWORD;
ProcessID: QWORD;
end;
br,cc: dword;
sizeneeded: integer;
Expand Down Expand Up @@ -2050,8 +2032,6 @@ function {VirtualQueryEx}VQE(hProcess: THandle; address: pointer; var mbi: _MEMO
protection : DWORD ;
end;


i: integer;
br,cc: dword;
l: THandleListEntry;
validhandle: boolean;
Expand Down Expand Up @@ -2098,8 +2078,7 @@ function {VirtualQueryEx}VQE(hProcess: THandle; address: pointer; var mbi: _MEMO
end;

Function {VirtualAllocEx}VAE(hProcess: THandle; lpAddress: Pointer; dwSize, flAllocationType: DWORD; flProtect: DWORD): Pointer; stdcall;
var i: integer;
br,cc: dword;
var br,cc: dword;
x: record
processid: uint64;
baseaddress: uint64;
Expand Down

0 comments on commit 706f5b8

Please sign in to comment.