Raised This Month: $51 Target: $400
 12% 

fyshs - how can we compile the code without getting errors


  
 
 
Thread Tools Display Modes
Mani
Veteran Member
Join Date: Dec 2004
Location: UK
Old 09-27-2005 , 18:18  
#11

Quote:
Originally Posted by Mattie
Quote:
Originally Posted by Mani
Quote:
Originally Posted by Mattie
That being said, there appears to be a number of problems once I get the Windows version to load. It seems to have all sorts of problems hooking things like it used to. It does pretty good at the signature scanning (it can't find the sound emitter functions it uses for the airboat/jeep), but when it tries to do the vtable hooking it just dies on just about every one I've tried.

I'm going to play with it more tonight to see if I can get farther.
-Mattie
Are you running on a 64 bit CPU with DEP enabled ? Looking at the callgate class it may have the same problem I had.

Mani.
Actually, it was a 64-bit CPU with DEP enabled, though I was running a 32-bit OS. I assume the 32-bit part is irrelevant?

This may be a good sign. How did you get by the issue? (Disable DEP?)
-Mattie
For a while people reported this but I never experienced it until I turned DEP back on after people figured out how to get round the problem.

The Call Gate creates some assembler code that isn't held in the executable space so whenever a hooked function is called it jumps off into the gate code which causes an exception via DEP.

You can avoid this by deliberately setting that memory allocated as being executable | read | write using: -

Code:
VirtualProtect( m_szGate, 20, (PAGE_EXECUTE_READWRITE ), &dwIDontCare );
This is only for windows of course, linux doesn't have this problem for hooking VFuncs.

Mani
__________________
Installation files, documentation and help can be found at: -

www.mani-admin-plugin.com
Mani is offline
imported_Ender
Junior Member
Join Date: Nov 2004
Old 09-27-2005 , 23:09  
#12

Even if jeeps and airboats die I dont care. The things needed most imoprtantly are individual commands i.e. gravity, color that works on guns, and things such as respawn.
__________________
-Dark and silent and complete, I found freedom. Losing all hope is freedom.-
imported_Ender is offline
Send a message via AIM to imported_Ender
awuh0
Senior Member
Join Date: Apr 2005
Location: /dev/null
Old 09-27-2005 , 23:43  
#13

dont forget weapon modding
__________________
~The_wUh
_________________
Ph34r teh zombies!!!
find a better way to play CSS, connect to...
thewuh.servebeer.com
thecircus.servebeer.com
awuh0 is offline
Send a message via ICQ to awuh0 Send a message via AIM to awuh0 Send a message via MSN to awuh0
ichthys
Veteran Member
Join Date: Dec 2004
Location: []*[]
Old 09-28-2005 , 00:35  
#14

Shall we start adding feature requests aswell? lol
__________________
ichthys is offline
Mattie
Veteran Member
Join Date: Jan 2005
Old 09-28-2005 , 01:11  
#15

Well, I can now get the Debug version to load without crashing, but retail simply can't do any vtable hooking. Doesn't look like DEP is involved right now.

fysh had some interesting method for calculating the vtable index that doesn't appear to work on my compile/machine. I'm trying to look into it, but I'm only about 40% efficient at this low of a level. (I know just enough to break things or get them working with hours and hours of work.)

Slow going guys.
-Mattie
Mattie is offline
ichthys
Veteran Member
Join Date: Dec 2004
Location: []*[]
Old 09-28-2005 , 01:49  
#16

wow thanks for all the effort Mattie!
__________________
ichthys is offline
imported_RagingCow
Junior Member
Join Date: Oct 2004
Location: Dallas, TX
Old 09-28-2005 , 09:26  
#17

Quote:
Originally Posted by ichthys
wow thanks for all the effort Mattie!
Mattie and Mani!
__________________
imported_RagingCow is offline
Mattie
Veteran Member
Join Date: Jan 2005
Old 09-28-2005 , 11:08  
#18

Mani, when you do vtable look-ups are you using an automatic index calculator like fysh is? Whenever I've been using virtual function hooking, I've simply been hard-coding the indices.

The reason I ask is that the calculations he does to determine the index seem to crash on both of my Windows XP systems I try. The debug build seems to avoid a full crash, but retail bails out pretty quickly because the virtual function index calculation tries to read waaay too far away in memory. I'm not sure why the Steam update would have affected this, so it could have been caused by the way I'm compiling.

If you have your own dynamic method for determining indices, that would be handy. Otherwise I may have to see if I can hard-code them where needed (i.e. all over the place).
-Mattie
Mattie is offline
Roger Devil
Senior Member
Join Date: Dec 2004
Location: Germany
Old 09-28-2005 , 12:34  
#19

Hi Mani,
the same for me, i looked at the code and thought o good, no more counting on the indices for hooking.
But it crashes also in Debug-Build.
So Mani if you have a dynamic way i am also interested.

I need this for Statsme-Plugin
Roger Devil
Roger Devil is offline
Send a message via ICQ to Roger Devil
Mani
Veteran Member
Join Date: Dec 2004
Location: UK
Old 09-29-2005 , 10:53  
#20

Quote:
Originally Posted by Mattie
Mani, when you do vtable look-ups are you using an automatic index calculator like fysh is? Whenever I've been using virtual function hooking, I've simply been hard-coding the indices.

The reason I ask is that the calculations he does to determine the index seem to crash on both of my Windows XP systems I try. The debug build seems to avoid a full crash, but retail bails out pretty quickly because the virtual function index calculation tries to read waaay too far away in memory. I'm not sure why the Steam update would have affected this, so it could have been caused by the way I'm compiling.

If you have your own dynamic method for determining indices, that would be handy. Otherwise I may have to see if I can hard-code them where needed (i.e. all over the place).
-Mattie
I only hook one function so far and that's hard coded, though the offsets don't really add up like I thought they should.

XAD posted something a while back where he took the class description (something like the IVEngineServer class), converted it to a structure which could calculate the offsets. Still, not exactly dynamic though.

Mani
__________________
Installation files, documentation and help can be found at: -

www.mani-admin-plugin.com
Mani is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:29.


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