Results 1 to 13 of 13

Thread: How to write device driver

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2001
    Location
    chennai, Tamil Nadu, India.
    Posts
    84

    How to write device driver

    Tell me how to write a driver software using vb6.0?
    S.Desikan

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    For a device driver, I believe you would be better off using C than VB.

  3. #3
    Lively Member The_Fog's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Posts
    65
    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++.
    They will try to steal everything you own,
    It goes on and on and on...


    Pain - On and On

  4. #4
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    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.
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

  5. #5
    Lively Member The_Fog's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Posts
    65
    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.
    They will try to steal everything you own,
    It goes on and on and on...


    Pain - On and On

  6. #6
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    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...
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

  7. #7
    Lively Member The_Fog's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Posts
    65
    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
    They will try to steal everything you own,
    It goes on and on and on...


    Pain - On and On

  8. #8
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    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.
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

  9. #9
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    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.
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

  10. #10
    Lively Member The_Fog's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Posts
    65
    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.
    They will try to steal everything you own,
    It goes on and on and on...


    Pain - On and On

  11. #11
    Junior Member
    Join Date
    Feb 2002
    Posts
    21
    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.
    people who insist on calling assembly "assembler" should have their pc's taken and be given a bristle buddy building set

  12. #12
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    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...

    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

  13. #13
    jim mcnamara
    Guest
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width