Recent

Author Topic: Windows 10 x64 Kernel Driver (FPC trunk)  (Read 4822 times)

440bx

  • Hero Member
  • *****
  • Posts: 6528
Re: Windows 10 x64 Kernel Driver (FPC trunk)
« Reply #15 on: May 08, 2026, 03:44:20 pm »
So the honest answer is: not really. Technically doable, but I don't see a clear purpose for it, I don't have the motivation, and the entry cost is high. If at some point a concrete project shows up where this matters, I'd reconsider - but right now, no.
Understandable and fair enough.
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

PascalDragon

  • Hero Member
  • *****
  • Posts: 6396
  • Compiler Developer
Re: Windows 10 x64 Kernel Driver (FPC trunk)
« Reply #16 on: May 12, 2026, 09:07:06 pm »
@440bx
Can you elaborate on possible problems with the current FPC win 64 bit release regarding driver development?

Let me answer this one - as it stands, you can't compile a working 64-bit driver with what's currently in FPC. The NativeNT target is incomplete to an unknown degree - the build setup is wired for both i386 and x86_64, but the implementation is patchy enough that I wouldn't call either architecture production-usable. You'd need your own RTL - either built from scratch, or by fixing and finishing NativeNT. The gaps are huge; the target is essentially a "template". If you went back about 20 years you might be able to compile it for XP, but the resulting driver wouldn't actually do anything useful.

Main work required is proper port to x86_64 (and ARM64 while we're at it) and then translation of kernel related headers.

Take a look at the NativeNT sources sometime - empty function bodies, TODO markers everywhere. It's abandoned work, last meaningful activity around 2010; doing it properly would mean redoing most of it from scratch.

Most of the RTL isn't implemented, because it needs to be evaluated which parts of the RTL are really usable in kernel mode, especially in IRQLs that don't allow paging. So there is no need to redo most of it, simply to complete it.

 

TinyPortal © 2005-2018