fix xp compiling and remove grouping for now.

This commit is contained in:
Dark Byte 2020-02-09 20:32:40 +01:00
parent a2b3ca58ab
commit 5dd13bb0ce
8 changed files with 14 additions and 20 deletions

View File

@ -2128,15 +2128,9 @@ begin
end;
procedure Open_Process;
var access: dword;
begin
{$ifndef netclient}
access:=process_all_access;
if GetSystemType<=6 then
access:=$1f0fff;
ProcessHandler.ProcessHandle:=NewKernelHandler.OpenProcess(access,false,ProcessID);
ProcessHandler.ProcessHandle:=NewKernelHandler.OpenProcess(ifthen(GetSystemType<=6,$1f0fff, process_all_access) ,false,ProcessID);
le:=GetLastError;
{$endif}
end;
@ -3756,7 +3750,7 @@ begin
{$IFDEF windows}
if pid=0 then
pid:=GetCurrentProcessId;
h:=OpenProcess(PROCESS_ALL_ACCESS, false, pid);
h:=OpenProcess(ifthen(GetSystemType<=6,$1f0fff, process_all_access), false, pid);
sa.nLength:=sizeof(sa);
sa.bInheritHandle:=false;
@ -3813,7 +3807,7 @@ initialization
end;
ownprocesshandle := OpenProcess(PROCESS_ALL_ACCESS, True, GetCurrentProcessId);
ownprocesshandle := OpenProcess(ifthen(GetSystemType<=6,$1f0fff, process_all_access), True, GetCurrentProcessId);

View File

@ -146,7 +146,7 @@ begin
if pid=0 then
pid:=GetCurrentProcessId;
processhandle:=dbk32functions.OP(PROCESS_ALL_ACCESS, true, pid);
processhandle:=dbk32functions.OP(ifthen<dword>(GetSystemType<=6,$1f0fff, process_all_access), true, pid);
filemap:=tmemorystream.Create;
try

View File

@ -880,7 +880,7 @@ begin
begin
if (pagedirentry and (1 shl 7))>0 then //PS==1
begin
PhysicalAddress:=(pagedirentry and MAXPHYADDRMASKPB)+VirtualAddress and $1fffff;
PhysicalAddress:=(pagedirentry and MAXPHYADDRMASKPB) + (VirtualAddress and $1fffff);
exit(true);
end
else

View File

@ -180,7 +180,7 @@ begin
while not terminated and (i<$FFFFFFFF) do
begin
h:=windows.OpenProcess(PROCESS_ALL_ACCESS,false,i);
h:=windows.OpenProcess(ifthen(GetSystemType<=6,$1f0fff, process_all_access),false,i);
if h<>0 then
begin
modulename:=getProcessnameFromProcessID(i);

View File

@ -1901,7 +1901,7 @@ begin
//OutputDebugString('NtOpenProcess hook');
if ((hdevice<>INVALID_HANDLE_VALUE) and (clientid<>nil)) and (clientid^.processid<>GetCurrentProcessId) then
begin
h:=OP(process_all_access,true,clientid^.processid);
h:=OP(ifthen<dword>(GetSystemType<=6,$1f0fff, process_all_access),true,clientid^.processid);
if h<>0 then
begin
result:=0;
@ -2999,7 +2999,7 @@ begin
result:=true;
SDTShadow:=res;
end;
ownprocess:=OP(PROCESS_ALL_ACCESS,false,getcurrentprocessid);
ownprocess:=OP(ifthen<dword>(GetSystemType<=6,$1f0fff, process_all_access),false,getcurrentprocessid);
end;
end;

View File

@ -2187,7 +2187,7 @@ begin
//32 bit: check if it has noexecute support
if assigned(GetProcessDEPPolicy) and assigned(SetProcessDEPPolicy) then
begin
ph:=OpenProcess(PROCESS_ALL_ACCESS,false,processid); //the debuggerhandle does not get this properly
ph:=OpenProcess(ifthen<dword>(GetSystemType<=6,$1f0fff, process_all_access),false,processid); //the debuggerhandle does not get this properly
try
if GetProcessDEPPolicy(ph, @depflags, @perm) then
begin

View File

@ -6393,8 +6393,8 @@ begin
//still here, so valid
if (memRegionPos=0) or (memRegion[memRegionPos-1].BaseAddress+memRegion[memRegionPos-1].MemorySize<>PtrUint(mbi.baseaddress)) then
begin
{ if (memRegionPos=0) or (memRegion[memRegionPos-1].BaseAddress+memRegion[memRegionPos-1].MemorySize<>PtrUint(mbi.baseaddress)) then
begin}
//new region
memRegion[memRegionPos].BaseAddress:=PtrUint(mbi.baseaddress); //just remember this location
memRegion[memRegionPos].MemorySize:=mbi.RegionSize;
@ -6403,12 +6403,12 @@ begin
inc(memRegionPos);
if (memRegionPos mod 16)=0 then //add another 16 to it
setlength(memRegion,length(memRegion)+16);
end
{ end
else
begin
//append
memRegion[memRegionPos-1].MemorySize:=memRegion[memRegionPos-1].MemorySize+mbi.RegionSize;
end;
end; }
inc(totalProcessMemorySize,mbi.RegionSize); //add this size to the total

View File

@ -2142,7 +2142,7 @@ begin
end
else
begin
thisprocesshandle:=OpenProcess(PROCESS_ALL_ACCESS,false,thisprocessid);
thisprocesshandle:=OpenProcess(ifthen(GetSystemType<=6,$1f0fff, process_all_access),false,thisprocessid);
end;
debugpart:=1;