Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


About PAGE_GUARD Exception..;;

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
JWP Programs
Newbie cheater
Reputation: 0

Joined: 19 Dec 2011
Posts: 23

PostPosted: Tue Feb 28, 2012 3:52 am    Post subject: About PAGE_GUARD Exception..;; Reply with quote

Hi, I am sorry about my similar questions..
but I have to ask for more..;
I wan't to get exception for memory breakpoint.
so I wrote a sample source.
-
procedure TForm1.StartCatchExceptionsClick(Sender: TObject);
var Old:DWORD;
begin
VirtualProtect(Pointer($00400000), 4, PAGE_GUARD, Old);

AddVectoredExceptionHandler(1, DWORD(@VectoredHandler));
end;

This is VectoredHandler Function.
-
function VectoredHandler(ExceptionInfo : EXCEPTION_POINTERS): LongInt; stdcall;
Form1.Listbox1.Items.Add(IntToHex(ExceptionInfo.ExceptionRecord^.ExceptionInformation[1], 8));
result:= 0;//EXCEPTION_CONTINUE_SEARCH ;
end;

and a code to raise exception is this. (Write to guard page.)
-
procedure TForm1.RaiseExceptionBtnClick(Sender: TObject);
var Value, BytesWrite:DWORD;
begin
Value:=1234;
WriteProcessMemory(GetCurrentProcess, Pointer($00400000), @Value, 4, BytesWrite);
end;

but there's no exception.
so I modified that "StartCatch" source.
VirtualProtect(Pointer($00400000), 4, PAGE_NOACCESS, Old);
and
VirtualProtect(Pointer($00400000), 4, PAGE_READONLY, Old);

but those weren't right.
What should I do??
Thanks for reading.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25830
Location: The netherlands

PostPosted: Tue Feb 28, 2012 5:12 am    Post subject: Reply with quote

Writeprocessmemory does not trigger pagefault exceptions
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
JWP Programs
Newbie cheater
Reputation: 0

Joined: 19 Dec 2011
Posts: 23

PostPosted: Wed Feb 29, 2012 4:49 am    Post subject: Hmmm... Reply with quote

Then, Is that correct code without writeprocessmemory?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites