Post Reply  Post Thread 
VMTOFFSET ?
Author Message
Mythar
Junior Member
**


Posts: 15
Group: Registered
Joined: Jul 2009
Status: Offline
Reputation: 0
Post: #1
VMTOFFSET ?

is VMTOFFSET not aviaible in Delphi 5 ?

Also had to make these changes to make it compile in D5:

type
PCardinal = ^Cardinal;
PPointer = ^Pointer;
IInterface = IUnknown;

08-07-2009 03:38 AM
Find all posts by this user Quote this message in a reply
Qi
Administrator
*******


Posts: 46
Group: Administrators
Joined: Oct 2007
Status: Offline
Reputation: 0
Post: #2
RE: VMTOFFSET ?

Hello Mythar,

You are right, D5 doesn't support VMTOFFSET.

If you really want to use CodeHook in D5, you have to hard code the interface method VMT offset, such as 8, 12, etc.
The easiest way to do this is to print all the offset in a higher compiler, such as D6, then hard code the output in D5.

Regards

08-07-2009 12:54 PM
Visit this users website Find all posts by this user Quote this message in a reply
Mythar
Junior Member
**


Posts: 15
Group: Registered
Joined: Jul 2009
Status: Offline
Reputation: 0
Post: #3
RE: VMTOFFSET ?

Hello Qi, don't have any other compiler then D5 Sad

However, let me see if i got this right, any Interface build on IUnknown would have the following offsets:

0 - QueryInterface
4 - Add Ref
8 - Release
12 - (first user defined method)
etc.

So if you look at AAG's sample, as an exsample, the offsets should be:
(assuming that the dinput.h header lists methods in the correct order)
IDirectInput8A::CreateDevice - offset 12 ($0C)
IDirectInputDevice8A::GetDeviceState - offset 36 ($24)

Did i get this right ?

08-08-2009 03:16 AM
Find all posts by this user Quote this message in a reply
Qi
Administrator
*******


Posts: 46
Group: Administrators
Joined: Oct 2007
Status: Offline
Reputation: 0
Post: #4
RE: VMTOFFSET ?

Hello Mythar,

Yes, you are right.
You can count the offset manually. The first function offset is $0c, next if $10, etc.

08-08-2009 02:56 PM
Visit this users website Find all posts by this user Quote this message in a reply
Mythar
Junior Member
**


Posts: 15
Group: Registered
Joined: Jul 2009
Status: Offline
Reputation: 0
Post: #5
RE: VMTOFFSET ?

Thx for clearing that up Smile

08-09-2009 05:35 AM
Find all posts by this user Quote this message in a reply
clcheapshoes520
Junior Member
**


Posts: 2
Group: Registered
Joined: Jun 2010
Status: Offline
Reputation: 0
Post: #6
RE: VMTOFFSET ?

[quote=Mythar]
Thx for clearing that up Smile
[/i

interseting


[url=http://www.christianlouboutinu.com]Christian Louboutin shoes[/url]! [url=http://www.exmbt.com]discount mbt shoes[/url]!
07-02-2010 04:50 PM
Find all posts by this user Quote this message in a reply
Wallace2010
Junior Member
**


Posts: 6
Group: Registered
Joined: Jun 2010
Status: Offline
Reputation: 0
Post: #7
RE: VMTOFFSET ?

D5 doesn't support VMTOFFSET ?


Put on your favorite player's [url=http://www.nfl-jersey.net]nfl jerseys[/url] [url=http://www.nfl-shopping.net]nfl jerseys[/url]constructed to look and feel like what the players wear to show your support.
07-10-2010 04:24 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: