Forum: Win32/Win64 API (native code)
Delphi
by JamesTKirk,
30. Dez 2009
The kernel already creates a dump for you if you enable that (you can sometimes see the progress of saving it on the bottom of a BSOD) and WinDbg can extract the last DbgPrint messages for you out of this dump. That's one of those parts the guys at Microsoft did well :mrgreen:
A note about BSODs: The kernel still runs when a BSOD occurs, that's the reason why it can print to the screen and...
Forum: Win32/Win64 API (native code)
Delphi
by JamesTKirk,
30. Dez 2009
You may try this (it's a suggestion and not tested):
fpc -FuC:\test1\include -Mdelphi driver.pas
bin\rmcoff2 driver.o
bin\link /NOLOGO /ALIGN:32 /BASE:0x10000 /SUBSYSTEM:NATIVE /DRIVER /LIBPATH:C:\test1\lib /ENTRY:DriverEntry ntoskrnl.lib hal.lib win32k.lib ntdll.lib ntutils.lib /out:driver.sys driver.obj
I don't know what options link needs to link a 64-bit file. Perhaps
/ALIGN:64
Forum: Win32/Win64 API (native code)
Delphi
by JamesTKirk,
27. Dez 2009
Just try to compile the units with FPC.
E. g. in a shell run
fpc -Pi386 -FuPath/To/Other/Units yourunit.pas
When you try this on Windows you should use "\" of course. If you need to compile for Win64 then you need to use this instead of "-Pi386":
-Px86_64 -Twin64
Forum: Win32/Win64 API (native code)
Delphi
by JamesTKirk,
24. Dez 2009
That's why I decided to follow the "translate on demand" approach. At least until the port is mature enough to "stand on its own feet" and others start to contribute. ;)
Regards,
Sven
Forum: Win32/Win64 API (native code)
Delphi
by JamesTKirk,
24. Dez 2009
I meant "It may not translate everything (...)" :oops:
The converted code can also be used with Delphi. You may remember this tool in the future, because it's really helpful ;)
Regards,
Sven
Forum: Win32/Win64 API (native code)
Delphi
by JamesTKirk,
24. Dez 2009
Try h2pas which is included with Free Pascal. It allows you to (mostly) convert C declarations to Pascal ones. Don't forget to study its options. I may not translate everything you feed it with, but it's rather helpful.
Regards,
Sven
Edit: Where did you find this OpenSysLib? I'm curious. :mrgreen: