Freebasic Driver Programming
Freebasic Driver Programming
Can i make windows drivers with freebasic?
Re: Freebasic Driver Programming
Not practically. None of the kernel mode headers have been translated (though the libs are provided), and you can't use anything that requires the fb runtime. That includes basic things like simply declaring (much less actually using) string variables. Even then, with -nodeflibs, you'd need a different piece of startup code since the provided one is for user mode.
So technically possible, but plenty of large hoops to jump through to get there.
So technically possible, but plenty of large hoops to jump through to get there.
Re: Freebasic Driver Programming
Device drivers are typically written in C, using the Driver Development Kit (DDK).Username wrote:Can i make windows drivers with freebasic?
There are functional and object-oriented ways to program drivers, depending on the language chosen to write in.
It is generally not possible to program a driver in Visual Basic or other high-level languages like FreeBASIC .
Re: Freebasic Driver Programming
FB is not Visual Basic. FB is closer to C, and can access anything that C can. If one translated the DDK header files to FB, there's absolutely no reason why you couldn't use FB to do that. However you'd probably want to use just the subset of FB features that translate 1:1 to C. No dynamic strings, no arrays, etc. Nothing from the FB runtime library.
Re: Freebasic Driver Programming
You are right caseih, I also created a library that allowed me to control a card on the parallel port, but I had to write most of the code in assembler language, it's okay to say that I used freeBASIC but I hardly wrote anything in freeBASIC , although lately FreeBASIC tends to look like GCC.caseih wrote:FB is not Visual Basic. FB is closer to C, and can access anything that C can. If one translated the DDK header files to FB, there's absolutely no reason why you couldn't use FB to do that. However you'd probably want to use just the subset of FB features that translate 1:1 to C. No dynamic strings, no arrays, etc. Nothing from the FB runtime library.
However, with windows it's another thing, to be able to do many things I had to include libraries written in C because writing a header in FreeBASIC that did the same things was too expensive and complicated (at least for me)
Re: Freebasic Driver Programming
Note also that afaik you need to develop for the (native)NT target, iow, no win32 (user32,kernel32) or libraries that depend on that (like msvcrt). The C backend thus also would have to work with a non gcc compiler (or the GAS port needs an additional target)exagonx wrote:Device drivers are typically written in C, using the Driver Development Kit (DDK).Username wrote:Can i make windows drivers with freebasic?
There are functional and object-oriented ways to program drivers, depending on the language chosen to write in.
It is generally not possible to program a driver in Visual Basic or other high-level languages like FreeBASIC .
Maybe if you can go through the DDK's native NT C compiler you can workaround platform support, but you might also need to reduce the RTS for that. Some calls from those libs might also be available in NTDLL though.
Most of this knowledge is very old (2007 based on older (2003) SDKs), I also mostly only read about it in threads on a forum, never tried myself. Maybe MS has made it easier meanwhile.
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: Freebasic Driver Programming
FreeBASIC created DLL's run only in user space (totaly different virtual address space)
so the answer is simple "NO"
you can't write driver for current Windows OS with FreeBASIC.
here are a MIDI driver I wrote long time ago in FreeBASIC: viewtopic.php?f=6&t=16853&p=147979
Joshy
so the answer is simple "NO"
you can't write driver for current Windows OS with FreeBASIC.
here are a MIDI driver I wrote long time ago in FreeBASIC: viewtopic.php?f=6&t=16853&p=147979
Joshy