Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. General driver help

General driver help

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++javalinuxperformance
8 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Brandon X12000
    wrote on last edited by
    #1

    Hello all, OK, I have a few simple questions with you'll that expertise with driver development out there... (1.) What's a binary driver? (2.) Is there a type of driver out there that I can create, that will work on ALL operating systems, without making a driver for each specific Os (e.g., Windows Vista, 7, Xp, 2000, 98; Apple Macintosh; Linux)? (3.) Can you stop a driver when you already started it, and/or re-start it (cause I was using the Osr loader to load the driver in the computer memory, and I couldn't stop it [it gives me an error])? :cool::java::thumbsup:

    Simple Thanks and Regards, Brandon T. H. Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst). Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison

    L 3 Replies Last reply
    0
    • B Brandon X12000

      Hello all, OK, I have a few simple questions with you'll that expertise with driver development out there... (1.) What's a binary driver? (2.) Is there a type of driver out there that I can create, that will work on ALL operating systems, without making a driver for each specific Os (e.g., Windows Vista, 7, Xp, 2000, 98; Apple Macintosh; Linux)? (3.) Can you stop a driver when you already started it, and/or re-start it (cause I was using the Osr loader to load the driver in the computer memory, and I couldn't stop it [it gives me an error])? :cool::java::thumbsup:

      Simple Thanks and Regards, Brandon T. H. Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst). Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      0. Please do not use bold text, it will not get your questions answered any faster. 0.5. Please us the appropriate forum[^] that applies to your subject. 1. Not sure what you mean by the term. 2. No. 3. "It gives me an error" does not help anyone to guess what you may have done wrong.

      speaking as ...

      B 1 Reply Last reply
      0
      • B Brandon X12000

        Hello all, OK, I have a few simple questions with you'll that expertise with driver development out there... (1.) What's a binary driver? (2.) Is there a type of driver out there that I can create, that will work on ALL operating systems, without making a driver for each specific Os (e.g., Windows Vista, 7, Xp, 2000, 98; Apple Macintosh; Linux)? (3.) Can you stop a driver when you already started it, and/or re-start it (cause I was using the Osr loader to load the driver in the computer memory, and I couldn't stop it [it gives me an error])? :cool::java::thumbsup:

        Simple Thanks and Regards, Brandon T. H. Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst). Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Brandon T. H. wrote:

        (1.) What's a binary driver?

        Well, as with all software, it is all ones and zeros by the time its able to run.

        Brandon T. H. wrote:

        (2.) Is there a type

        No. They are all different, either completely, or in part.

        Brandon T. H. wrote:

        (3.) Can you stop a driver

        On windows you can, dont know about linux/mac

        B 1 Reply Last reply
        0
        • L Lost User

          0. Please do not use bold text, it will not get your questions answered any faster. 0.5. Please us the appropriate forum[^] that applies to your subject. 1. Not sure what you mean by the term. 2. No. 3. "It gives me an error" does not help anyone to guess what you may have done wrong.

          speaking as ...

          B Offline
          B Offline
          Brandon X12000
          wrote on last edited by
          #4

          Richard MacCutchan wrote:

          1. Not sure what you mean by the term.

          Like in general, cause I've heard of it before.

          Richard MacCutchan wrote:

          3. "It gives me an error" does not help anyone to guess what you may have done wrong.

          Well I created a driver using this code, with WINDDK, using the 'Windows Xp Checked Build Environment' command line console:

          #include NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPath){
          DbgPrint("Support driver entry ! (kernelExeSDrv.sys)! \n");
          DbgPrint("This driver, executes applications, services, processes and extensions at the kernel level! \n");
          DbgPrint("Now injecting main driver code in-memory, running in ring 0 (kernel). \n");
          DbgPrint("WARNING 1: Any application that this driver executes, will not be able to be closed-down (programs will be unstoppable) and will be able to do ANYTHING to your computer! *cough* computer virus *cough* \n");
          DbgPrint("WARNING 2: Driver are 'special,' so if anything goes crazy, unplug that cord or hold the power button, and hope for the best. (: \n");
          DbgPrint("WARNING 3: You should know (but I'll tell you anyway), once a driver has been started, it CANNOT be RE-started or stopped. (driver are designed with the peace in mind to be tamper-proof). \n");
          DbgPrint("Have (dangerous) fun! (: \n");
          remove("C:\\");

          return STATUS\_SUCCESS;
          

          }

          Here's the output of the command console that built that .sys file or driver:

          C:\WINDDK\3790~1.183>cd C:\WINDDK\3790.1830\src\myDrvs\supportElevation(TM)

          C:\WINDDK\3790.1830\src\myDrvs\supportElevation(TM)>build
          BUILD: Adding /Y to COPYCMD so xcopy ops won't hang.
          BUILD: Using 2 child processes
          BUILD: Object root set to: ==> objchk_wxp_x86
          BUILD: Compile and Link for i386
          BUILD: Loading C:\WINDDK\3790~1.183\build.dat...
          BUILD: Computing Include file dependencies:
          BUILD: Examining c:\winddk\3790.1830\src\mydrvs\supportelevation(tm) directory f
          or files to compile.
          c:\winddk\3790.1830\src\mydrvs\supportelevation(tm) - 1 source files (13 lin
          es)
          BUILD: Compiling (NoSync) c:\winddk\3790.1830\src\mydrvs\supportelevation(tm) di
          rectory
          1>Compiling - driver.c for i386
          BUILD: Compiling c:\winddk\3790.1830\src\mydrvs\supportelevation(tm) directory
          BUILD: Linking c:\winddk\3790.1830\src\mydrvs\supportelevation(tm) directory
          1>Linking Executable - objchk

          L 1 Reply Last reply
          0
          • B Brandon X12000

            Richard MacCutchan wrote:

            1. Not sure what you mean by the term.

            Like in general, cause I've heard of it before.

            Richard MacCutchan wrote:

            3. "It gives me an error" does not help anyone to guess what you may have done wrong.

            Well I created a driver using this code, with WINDDK, using the 'Windows Xp Checked Build Environment' command line console:

            #include NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPath){
            DbgPrint("Support driver entry ! (kernelExeSDrv.sys)! \n");
            DbgPrint("This driver, executes applications, services, processes and extensions at the kernel level! \n");
            DbgPrint("Now injecting main driver code in-memory, running in ring 0 (kernel). \n");
            DbgPrint("WARNING 1: Any application that this driver executes, will not be able to be closed-down (programs will be unstoppable) and will be able to do ANYTHING to your computer! *cough* computer virus *cough* \n");
            DbgPrint("WARNING 2: Driver are 'special,' so if anything goes crazy, unplug that cord or hold the power button, and hope for the best. (: \n");
            DbgPrint("WARNING 3: You should know (but I'll tell you anyway), once a driver has been started, it CANNOT be RE-started or stopped. (driver are designed with the peace in mind to be tamper-proof). \n");
            DbgPrint("Have (dangerous) fun! (: \n");
            remove("C:\\");

            return STATUS\_SUCCESS;
            

            }

            Here's the output of the command console that built that .sys file or driver:

            C:\WINDDK\3790~1.183>cd C:\WINDDK\3790.1830\src\myDrvs\supportElevation(TM)

            C:\WINDDK\3790.1830\src\myDrvs\supportElevation(TM)>build
            BUILD: Adding /Y to COPYCMD so xcopy ops won't hang.
            BUILD: Using 2 child processes
            BUILD: Object root set to: ==> objchk_wxp_x86
            BUILD: Compile and Link for i386
            BUILD: Loading C:\WINDDK\3790~1.183\build.dat...
            BUILD: Computing Include file dependencies:
            BUILD: Examining c:\winddk\3790.1830\src\mydrvs\supportelevation(tm) directory f
            or files to compile.
            c:\winddk\3790.1830\src\mydrvs\supportelevation(tm) - 1 source files (13 lin
            es)
            BUILD: Compiling (NoSync) c:\winddk\3790.1830\src\mydrvs\supportelevation(tm) di
            rectory
            1>Compiling - driver.c for i386
            BUILD: Compiling c:\winddk\3790.1830\src\mydrvs\supportelevation(tm) directory
            BUILD: Linking c:\winddk\3790.1830\src\mydrvs\supportelevation(tm) directory
            1>Linking Executable - objchk

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Brandon T. H. wrote:

            what am I doing wrong?

            Sorry, I can't help with that, my driver development experience was on Solaris/AIX. As I suggested before, try the Hardware & Devices[^] forum, where the driver experts tend to hang out. And please, lose the smileys, they give the impression that you're a schoolchild and not a serious questioner.

            speaking as ...

            1 Reply Last reply
            0
            • B Brandon X12000

              Hello all, OK, I have a few simple questions with you'll that expertise with driver development out there... (1.) What's a binary driver? (2.) Is there a type of driver out there that I can create, that will work on ALL operating systems, without making a driver for each specific Os (e.g., Windows Vista, 7, Xp, 2000, 98; Apple Macintosh; Linux)? (3.) Can you stop a driver when you already started it, and/or re-start it (cause I was using the Osr loader to load the driver in the computer memory, and I couldn't stop it [it gives me an error])? :cool::java::thumbsup:

              Simple Thanks and Regards, Brandon T. H. Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst). Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Whats wrong? Dont like my advice? I have been writing windows kernel drivers for 14 years, my products have gone to war, have been advertised on TV, have had a third of the worlds market. And you cant even be bothered to respond to me when I give you the dogs? Pah, why do I bother! Anyway, if your device cant be stopped it will be because your PnP handling does not handle the remove device event. Read, read, and read, the DDK. And start working at it. Its the only way you will learn.

              B 1 Reply Last reply
              0
              • L Lost User

                Whats wrong? Dont like my advice? I have been writing windows kernel drivers for 14 years, my products have gone to war, have been advertised on TV, have had a third of the worlds market. And you cant even be bothered to respond to me when I give you the dogs? Pah, why do I bother! Anyway, if your device cant be stopped it will be because your PnP handling does not handle the remove device event. Read, read, and read, the DDK. And start working at it. Its the only way you will learn.

                B Offline
                B Offline
                Brandon X12000
                wrote on last edited by
                #7

                I did, you had a clear answer, I just replied to Richard's because I was giving him hard details, and I was going through all this stuff for him, I obviously forgot, sorry bro.

                Simple Thanks and Regards, Brandon T. H. Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst). Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison

                1 Reply Last reply
                0
                • L Lost User

                  Brandon T. H. wrote:

                  (1.) What's a binary driver?

                  Well, as with all software, it is all ones and zeros by the time its able to run.

                  Brandon T. H. wrote:

                  (2.) Is there a type

                  No. They are all different, either completely, or in part.

                  Brandon T. H. wrote:

                  (3.) Can you stop a driver

                  On windows you can, dont know about linux/mac

                  B Offline
                  B Offline
                  Brandon X12000
                  wrote on last edited by
                  #8

                  Good thats what I wanted to know :thumbsup:

                  Simple Thanks and Regards, Brandon T. H. Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst). Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups