AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Please help to fix throwing of "Access violation writing location" exception (C++) (https://forums.alliedmods.net/showthread.php?t=120457)

Immortal_BLG 03-05-2010 04:38

Please help to fix throwing of "Access violation writing location" exception (C++)
 
1 Attachment(s)
Here below is attached source code of function set_hook, which works, but after performance of the callback function and transfer control back to function __common_hook_proc, on a line 80 (mov byte ptr [edi], 0E9h) is throwing exception "Access violation writing location". Help fix please!

P.S. Sorry for BAD english, but please help to me!!

joaquimandrade 03-05-2010 05:07

Re: Please help to fix throwing of "Access violation writing location" exception (C++
 
Quote:

Originally Posted by Immortal_BLG (Post 1108012)
Here below is attached source code of function set_hook, which works, but after performance of the callback function and transfer control back to function __common_hook_proc, on a line 80 (mov byte ptr [edi], 0E9h) is throwing exception "Access violation writing location". Help fix please!

P.S. Sorry for BAD english, but please help to me!!

What you want __common_hook_proc to do? I mean, what all that inline assembly is supposed to do?

Immortal_BLG 03-05-2010 05:21

Re: Please help to fix throwing of "Access violation writing location" exception (C++
 
This is not my code, I only want to adapt it for my bot without crashes :)

Seta00 03-05-2010 05:52

Re: Please help to fix throwing of "Access violation writing location" exception (C++
 
(mov byte ptr [edi], 0E9h) + Join Date: Feb 2010
*sigh*

I'll give a look.

Immortal_BLG 03-05-2010 06:07

Re: Please help to fix throwing of "Access violation writing location" exception (C++
 
Quote:

Originally Posted by Seta00
(mov byte ptr [edi], 0E9h) + Join Date: Feb 2010

What do you mean? :)

P.S. Link to hook page (IN RUSSIAN :{D) http://awin.spb.ru/articles/hook1.html

joaquimandrade 03-05-2010 06:09

Re: Please help to fix throwing of "Access violation writing location" exception (C++
 
Quote:

Originally Posted by Immortal_BLG (Post 1108065)
What do you mean? :)

P.S. Link to hook page (IN RUSSIAN :{D) http://awin.spb.ru/articles/hook1.html

What you need is a generic hooker. Try here. I haven't used it but that sourcemod extension contains a class for detouring.

http://forums.alliedmods.net/showthread.php?t=72322

Immortal_BLG 03-05-2010 06:18

Re: Please help to fix throwing of "Access violation writing location" exception (C++
 
I already have it, but I do not like. (too much code)

P.S. Please do not offer other ways to hook - I need only this!

Bugsy 03-05-2010 13:50

Re: Please help to fix throwing of "Access violation writing location" exception (C++
 
Quote:

Originally Posted by Seta00
[...] + Join Date: Feb 2010
*sigh*

Not for nothing, but you have only a few days/weeks 'tenure' on the guy. And what's with the sigh? Its not like he's holding a gun to your head to help him. Just saying.

Seta00 03-05-2010 14:41

Re: Please help to fix throwing of "Access violation writing location" exception (C++
 
He's doing some really advanced stuff, will be faster if he learns the AMXx structure in detail before trying some ASM hax.

Immortal_BLG 03-05-2010 22:40

Re: Please help to fix throwing of "Access violation writing location" exception (C++
 
What I am doing has nothing to do with AMXX mod. But I think that because of this nobody will blame me.

Well, somebody help me? :P


All times are GMT -4. The time now is 08:48.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.