全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:4930
推到 Plurk!
推到 Facebook!

Delphi Driver Development Kit v0.0.4

 
hanafos
一般會員


發表:1
回覆:0
積分:0
註冊:2006-09-30

發送簡訊給我
#1 引用回覆 回覆 發表時間:2006-09-30 17:52:42 IP:222.245.xxx.xxx 未訂閱

Delphi Driver Development Kit v0.0.4
====================================
by The Hacker Defender Project team


Instructions
------------

To get .sys driver you have to run compile.but at first and then build.bat.
compile.bat runs Delphi part of the work creating .obj. build.bat then converts
this object file to MS supported format of OMF using OMF2D 1.02 written
by EliCZ and then MS linker link.exe is used to assemble final .sys.

As you can notice making drivers in Delphi is not supported by default so
several hacks are made to make it working. One of these hacks is ignoring
some linker errors and so that we receive some other errors and warnigs during
linking. Final .sys is working well so don't take these warnings seriously
but of course if you make your own driver there can be lot of other warnings
and errors you should care about.

In samples directory you've got some of our samples. Each example includes its
own compile and build scripts. To compile debug version run compile.debug.bat
instead of compile.bat.


Versions
--------

0.0.4 - Third release comes with few more supported functions and hook3 from
Driver coding tutorial.


0.0.3 - Third release comes with more supported functions, types, constants
exports and also with new example - hook2 from Driver coding tutorial.
x some functions are quite messy written in Delphi, if you know there is
a chance to improve the code and make it more clear and elegant, let us
know


0.0.2 - Second release comes with major changes in design. There are two
samples now including hook1 from Driver coding tutorial.
unit DDDK.pas for easy driver coding, you only need to add uses DDDK
in your source to get easy access to all supported functions

0.0.1 - This is very first release of DDDK. It is just proof of concept showing
the possibility of making working Delphi driver. However, this version
comes with working implementation of DbgPrint which can be very useful
where it comes to the driver coding.

附加檔案:DDDK004.rar
822
一般會員


發表:2
回覆:8
積分:2
註冊:2004-12-09

發送簡訊給我
#2 引用回覆 回覆 發表時間:2007-02-09 20:19:38 IP:218.247.xxx.xxx 訂閱
请问大大有试过没有?
怎么我试了一下samples下的basic,run了compile.debug.bat,再run build.bat
则出现:
inc\DDDK.obj : warning LNK4033: converting object format from OMF to COFF
D:\mydoc\vcl\TOOLS\dddk\samples\basic\driver.obj : warning LNK4033: converting o
bject format from OMF to COFF
driver.obj : warning LNK4006: initialization already defined in DDDK.obj; second
definition ignored
driver.obj : warning LNK4006: Finalization already defined in DDDK.obj; second d
efinition ignored
LINK : error LNK2001: unresolved external symbol _DriverEntry
DDDK.obj : error LNK2001: unresolved external symbol aaHandleFinallysqqrv
driver.obj : error LNK2001: unresolved external symbol aaHandleFinallysqqrv
D:\mydoc\vcl\TOOLS\dddk\samples\basic\driver.sys : fatal error LNK1120: 2 unreso
lved externals

因为build.bat用了/FORCE:UNRESOLVED /FORCE:MULTIPLE,所以有错误也生成了.sys文档,但用load bat运行了一下,debugview完全没反应,而再试试其他例子也出现这个原因,可见这个build失败了。
请大大指教。
bugmans
高階會員


發表:95
回覆:322
積分:188
註冊:2003-04-12

發送簡訊給我
#3 引用回覆 回覆 發表時間:2008-10-30 19:28:03 IP:125.225.xxx.xxx 未訂閱
Driver development has always been the privilege of C/C++ and Assembler programmers. If someone needs to write a device driver in Delphi, he has to settle for “adapter” drivers that would allow their user-mode program some ability to interface with kernel-mode functions. There are also “wizards” that (supposedly) allow one to create a driver without much driver-development knowledge. Both of these are often commercial software.

For some tasks one could also use a service (which can be written in Delphi). Well, either that or learn to program C/C . With older Delphi versions you could still use the Microsoft linker included in DDK to link the object files produced by the Delphi compiler to get a valid .sys file, but newer Delphi versions have a different .obj file format. Is there any hope? Well, yes there is!

The main reasons why you can’t usually create drivers in Delphi are such :
o It’s compiler/linker can’t produce .sys files.
o The object file format incompatibility mentioned above.
o DDK isn’t generally available in languages other than C/C .
o Some essential units (RTL) aren’t intended for use in kernel-mode and might crash a driver (and the whole system along with it).

The solution I recently discovered is the Delphi Driver Development Kit v0.0.4 that addresses most of these issues and lets you create kernel-mode drivers even in Delphi 7! It includes translated DDK headers, an utility to convert Delphi OBJ files to a format compatible with the Microsoft linker and some other things. And the best thing is it’s free! I compiled and run one of the samples on my Windows XP machine using Delphi 7 and it worked OK.

DDDK 0.0.4 was created by The Hacker Defender Project team. Take a look at their site, they also have some other interesting programs and articles there.

Update 04.07.2007 : Looks like “The Hacker Defender Project” is down. You can still get the DDK at http://w-shadow.com/files/DDDK004.zip
另外備份到ktop
http://delphi.ktop.com.tw/board.php?cid=31&fid=97&tid=95829
編輯記錄
bugmans 重新編輯於 2008-10-30 19:29:54, 註解 無‧
P.D.
版主


發表:603
回覆:4038
積分:3874
註冊:2006-10-31

發送簡訊給我
#4 引用回覆 回覆 發表時間:2008-11-07 09:36:37 IP:219.68.xxx.xxx 未訂閱
Dear Sir:

You posted to wrong area, that is a database area, so I move the paper to this area!
G01
高階會員


發表:249
回覆:379
積分:215
註冊:2002-05-21

發送簡訊給我
#5 引用回覆 回覆 發表時間:2008-11-07 11:55:37 IP:211.21.xxx.xxx 未訂閱
據了解,這個工具必須使用Delphi3才能編譯!!....殘念!!
系統時間:2024-05-03 17:50:33
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!