madCodeHook for Delphi 6

c++ / delphi package - dll injection and api hooking
Post Reply
sklein
Posts: 19
Joined: Sat Apr 23, 2005 6:08 pm

madCodeHook for Delphi 6

Post by sklein »

I'm trying to use madCodeHook with Delphi 6 (and some example code).

I haven't gotten the example to compile yet, but (I think) I'm close. Since I don't have .dcu files that are compiled for Delphi 6, the compiler is looking for the definition (xxx.pas) files.

It looks like all of them that I need (madCHook.pas, madTools.pas, madTypes.pas, madStrings.pas) are present in the various madCollection directories EXCEPT for madRemote.pas.

Is madRemote.pas (or madRemote.dcu for Delphi 6) available, or am I doing something wrong?

Thanks.
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

The madCollection installer comes with precompiled dcus for D4-D7, so dcus for your Delphi 6 should be available. Maybe you're using an evaluation version? Delphi evaluation versions often don't accept *any* precompiled dcus.
sklein
Posts: 19
Joined: Sat Apr 23, 2005 6:08 pm

Post by sklein »

To my knowledge, I'm not using an evaluation version (I got a license from Borland). Help About says:

Borland Delphi Personal Version 6.0 (Build 6.240) Update Pack 2

Here's the process I went through:

- First, I tried to syntax-check the test app, without any entries in the Search Path. That resulted in the following:

[Fatal Error] test.dpr(19): File not found: 'madCodeHook.dcu'

- So I added C:\Program Files\madCollection\madCodeHook\Delphi2005 to the path.

- That resulted in:

[Fatal Error] File not found: 'c:\program files\borland\delphi6\Projects\Bpl\madCodeHook.pas'

- I interpreted that as the .dcu file was found, but the format was not correct. So, I added C:\Program Files\madCollection\madCodeHook\Dll (where madCHook.pas is located) to the path. I also copied madCHook.pas to madCodeHook.pas and changed its name in the Unit statement to match.

- That resulted in:

[Fatal Error] madCodeHook.pas(351): File not found: 'madTools.dcu'


So, it appears that the compiler was looking for the .pas file, and did find it.

I continued with this process, adding the various directories, and having the .dcu files not accepted (but the .pas files working).

Finally, I got to the point where the only file I couldn't find was madRemote.pas.

Does any of this make sense? Is madRemote.pas available? Any other suggestions?

Thanks.
Shenck
Posts: 15
Joined: Tue Apr 19, 2005 2:59 pm

Post by Shenck »

Tools\Enviroment Options
Tab Libray
Add Path.
Is stragnge because madCollection add paths :?
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

I'm not sure about the Personal Edition. Does it generally accept 3rd party precompiled DCUs? Have you tried any other 3rd party components which don't ship with sources?

It's strange that Delphi complains about madTools.pas. It's part of my freeware package "madBasic" and so should be on your harddisk.

madCodeHook.pas is not available, madCHook.pas is available. madCodeHook.pas contains the real code. madCHook.pas is just a header for the madCHook.dll dynamic library. You can use madCHook.pas, but then you have to distribute the madCHook.dll with your app.
Post Reply