Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Write Kernel Driver/Driver in Delphi (https://www.delphipraxis.net/144908-write-kernel-driver-driver-delphi.html)

nanix 19. Dez 2009 12:58


Write Kernel Driver/Driver in Delphi
 
Hey!


How to create such driver in delphi?

Thanks

Mithrandir 19. Dez 2009 13:28

Re: Write Kernel Driver/Driver in Delphi
 
It's possible, but it's PITA and requires a lot of skill and time... So, better get a book about driver development and take C.. (no, not C++)...

Of course, you need the Windows DDK, which can be found at microsoft.com (imho...)

nanix 19. Dez 2009 13:30

Re: Write Kernel Driver/Driver in Delphi
 
The chinese created Kernel Driver kit for delphi

kmdkit4d.net

[edit=Luckie]URL removed. See below. Mfg, Luckie[/edit]

Mithrandir 19. Dez 2009 13:40

Re: Write Kernel Driver/Driver in Delphi
 
Well... The Chinese... They do a lot of things. And it's not always good. ;)

Besides, you have a link to this so-called "DDK". Why don't you explore it? Btw, the Archive contains the DCC32.exe from Delphi 11 (= 2007) Enterprise. So its illegal.

nanix 19. Dez 2009 13:57

Re: Write Kernel Driver/Driver in Delphi
 
Once driver is create its not illegal no more ;)

Luckie 19. Dez 2009 14:04

Re: Write Kernel Driver/Driver in Delphi
 
Distributing this file is illegal no matter what you do with it once you downloaded the file.

nanix 19. Dez 2009 14:07

Re: Write Kernel Driver/Driver in Delphi
 
or we just use lazarous problem solved! :)

With lazarus developing x64 drivers is 100% possible its just a matter of time.But it amazes me that noone decided to this yet? :?




http://rapidshare.com/files/32304539...Driver_Kit.rar

JamesTKirk 19. Dez 2009 17:22

Re: Write Kernel Driver/Driver in Delphi
 
Hi!

On a completely related side note:

http://wiki.freepascal.org/Target_NativeNT

:mrgreen:

Regards,
Sven

nanix 19. Dez 2009 18:13

Re: Write Kernel Driver/Driver in Delphi
 
Yes!That might work!However did they translate whole DDK?

JamesTKirk 19. Dez 2009 19:17

Re: Write Kernel Driver/Driver in Delphi
 
The port is still young and experimental and moreover still waiting for commit into FPC's trunk. Also Microsoft's fastcall calling convention needs to be added to make this port really useful on x86 (it's no problem on x86_64 as there is only one calling convention on 64-bit Windows).

Currently I'm playing around with Usermode API, so I can implement the last parts of the RTL (Threading, I/O, Filesystem and handling of system exceptions). My plan is to translate NDK and DDK functions on demand (when they are needed).

Regards,
Sven

nanix 19. Dez 2009 19:22

Re: Write Kernel Driver/Driver in Delphi
 
Ah but this be used with lazarus or not?

So its that buggy that its not usefull or ...


Ahh so i wasted my time with lazarus :( :(

JamesTKirk 19. Dez 2009 20:08

Re: Write Kernel Driver/Driver in Delphi
 
Lazarus itself is only an IDE. At least in this case, as the LCL will never work with NativeNT. The major work is done inside the Free Pascal compiler itself and the RTL.

As said: the port is young. I wrote a (very) simple test driver, but many more things need to be done, so that the port will become really usable.

Also device drivers are a completly different kind of programming. I learnt this the few last weeks, while I worked on this port. It's frustrating and very common to see BSODs on every second test. But this does not only apply to writing drivers in Pascal. It also applies to writing drivers in C and also to writing drivers for other platformes like Linux!

So: If you want to use Pascal for writing device drivers, be patient, because it is not easy to implement! (also I have some kind of real life :zwinker: )

Regards,
Sven

nanix 19. Dez 2009 20:12

Re: Write Kernel Driver/Driver in Delphi
 
So let me help you out! :zwinker:

JamesTKirk 19. Dez 2009 20:29

Re: Write Kernel Driver/Driver in Delphi
 
Well, you might try to reproduce my steps I wrote in that Wiki entry I linked earlier. I suggest that you use a VM with ReactOS to test that. If you face any problems with my manual (errors, questions, etc) you can ask me of course (but I don't know how long I'll be online today).

Once the compiler and the tests are running, we can work out a plan to share the work ;)

Regards,
Sven

nanix 19. Dez 2009 20:32

Re: Write Kernel Driver/Driver in Delphi
 
Goood yes once i do what you've done in the article.Ill tell you so we sync the work.


Alle Zeitangaben in WEZ +1. Es ist jetzt 03:06 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz