forked from cheat-engine/cheat-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2bbef46
commit 7cfe3eb
Showing
1 changed file
with
13 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,7 +183,7 @@ function TVEHDebugInterface.SetThreadContext(hThread: THandle; const lpContext: | |
begin | ||
|
||
|
||
if isFrozenThread then //use the VEHDebugView context | ||
if (not wasInjectedEvent) and isFrozenThread then //use the VEHDebugView context | ||
begin | ||
result:=true; | ||
|
||
|
@@ -245,9 +245,9 @@ function TVEHDebugInterface.GetThreadContext(hThread: THandle; var lpContext: TC | |
{$endif} | ||
|
||
begin | ||
if isFrozenThread then //use the VEHDebugView context | ||
if (not wasInjectedEvent) and isFrozenThread then //use the VEHDebugView context | ||
begin | ||
OutputDebugString('VEH GetThreadContext. From frozen'); | ||
//OutputDebugString('VEH GetThreadContext. From frozen'); | ||
result:=true; | ||
c:[email protected][0]; | ||
{$ifdef cpu64} | ||
|
@@ -291,7 +291,7 @@ function TVEHDebugInterface.GetThreadContext(hThread: THandle; var lpContext: TC | |
end | ||
else | ||
begin | ||
OutputDebugString('VEH GetThreadContext. not frozen'); | ||
// OutputDebugString('VEH GetThreadContext. not frozen'); | ||
result:=NewKernelHandler.GetThreadContext(hThread,lpContext); | ||
end; | ||
end; | ||
|
@@ -341,7 +341,10 @@ function TVEHDebugInterface.WaitForDebugEvent(var lpDebugEvent: TDebugEvent; dwM | |
threads.Add(lpDebugEvent.dwThreadId, currentthread); | ||
end; | ||
|
||
suspendThread(CurrentThread); | ||
if CurrentThread<>0 then | ||
begin | ||
suspendThread(CurrentThread); | ||
end; | ||
end | ||
else | ||
begin | ||
|
@@ -351,7 +354,8 @@ function TVEHDebugInterface.WaitForDebugEvent(var lpDebugEvent: TDebugEvent; dwM | |
|
||
if threads.GetData(lpDebugEvent.dwThreadId,h) then | ||
begin | ||
closehandle(h); | ||
if h<>0 then | ||
closehandle(h); | ||
threads.Delete(lpDebugEvent.dwThreadId); | ||
end; | ||
end; | ||
|
@@ -386,10 +390,11 @@ function TVEHDebugInterface.WaitForDebugEvent(var lpDebugEvent: TDebugEvent; dwM | |
if threads.GetData(lpDebugEvent.dwThreadId,lpDebugEvent.CreateProcessInfo.hThread)=false then | ||
begin | ||
lpDebugEvent.CreateProcessInfo.hThread:=OpenThread(THREAD_ALL_ACCESS,false, lpDebugEvent.dwThreadId); | ||
currentthread:=lpDebugEvent.CreateProcessInfo.hThread; | ||
suspendthread(CurrentThread); | ||
threads.Add(lpDebugEvent.dwThreadId,lpDebugEvent.CreateProcessInfo.hThread); | ||
end; | ||
|
||
currentthread:=lpDebugEvent.CreateProcessInfo.hThread; | ||
suspendthread(CurrentThread); | ||
end; | ||
|
||
$ce000001: //create thread | ||
|