Tell me how to write a driver software using vb6.0?
Printable View
Tell me how to write a driver software using vb6.0?
For a device driver, I believe you would be better off using C than VB.
Woo.. This was a simple one..
The correct and simple answer is "You can't!"
If you want to write device drivers for win32, I'd recommend you use msvc++.
Er...Wouldn't WASM be faster?
Goto the assembly forum and enter the FAQ post.
There're a few tutorial links and one has the tutorial on
makind device drivers.
Hope this helps.
Sure.. Writing the driver in asm would be way faster.. But he didn't seem very competent, so I recommended msvc++ since it's the easist way to create a device driver if he absolutly want it.
nah, VB really can be used to write device drivers, but I am sure
it's not workable under Windows...
I mean, you could've write a personal driver for your printer using VB through the OPEN statement.
And who said VB can't make drivers? It's just only slow...:)
Hmm.. I guess your right, but IF someone would want to create a device driver using vb, then what would it be compiled as? And what would the specific class/function names be? Do you have any sort of tutorial on this?
/B
You wont find the tutorial, because...
No, no, no, impossible.
VB is an intepreter EXE.
Not machine coddies.
As I said, it's just for personal driving, not for system stuff.
And the best stuff to drive is printer and modem, or whatever
is accessible via COM port or LPT port or whatever port that is
virtually openable with VB.
System stuff like VxD have different format, I think.
Should use C++ or WASM.
Perhaps we can write a converter for VB which can turn it to
ASM or C++. There's a thread dedicated to this project, search for
it at the project forum.
Interesting thought.. But hey.. Why don't just learn c++ or asm? ;-)
but..
If I'm not mistaking.. When the vb-compiler compiles the code, the code is first translated into som strange c++ code, and then compiled as an executable.
So if one could "hang" the compiler after it has created the temporary c++ file, then you would have the code right there, and you could perhaps, with some slight modification, use it in i.e vc++ and compile it as whatever you want to be compiled as.
But I could be wrong since this is mere rumours that I have heard about.
problem with that though, is that the c++ code(if any exists, i dunno myself) probably directly interfaces with the vb runtime, which, compiling it in vc++ would result in a fairly similar executable, the modifcations that would have to be made the the source make such an approach rather impractical.
And as for creating a driver via VB...
drivers follow 2 paths in windows, a message oriented one like many devices use(keyboard, mouse, etc i think) would probably be possible
but things like hard drives, file systems, etc, that use the fastIO path...it is unlikely that VB allows the full pointer access you really do need in such work. Remember, in most driver, it is utterly unacceptable to have a pagefault, or to try to access a pointer passed from a calling process without locking physical pages in and finding the proper address in physical memory that the virtual memory pointer refers too.
Is it true that it translate to C++ code?
Wouldn't it be like this?
VB EXE launched.
The true EXE in VB ran, b4 that msvbvm60.dll is called
than between this true EXE and msvbvm60.dll and perhaps
this msvbvm60.dll is a C++ code and between this with
mfc40.dll and between this with Windows and between them
with kernie...
Ahh, just my stupid thought...
Well, however, the best way is to write a source code converter...
:rolleyes:
Device Drivers - You cannot write one in VB - C only.
The gold standard on how to write drivers:
Porgramming the Windows Driver Model by Walter Oney