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#
  4. Writing Device Drivers in C#?

Writing Device Drivers in C#?

Scheduled Pinned Locked Moved C#
csharpc++question
9 Posts 4 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.
  • P Offline
    P Offline
    Patricker
    wrote on last edited by
    #1

    I saw that there are some articles on writing device drivers using C++ but I can't seem to find anything on writing device drivers using C#, even on Google. Is doing this possible? Anyone know where I should look to start? Thanks in Advance :) --Peter

    G 1 Reply Last reply
    0
    • P Patricker

      I saw that there are some articles on writing device drivers using C++ but I can't seem to find anything on writing device drivers using C#, even on Google. Is doing this possible? Anyone know where I should look to start? Thanks in Advance :) --Peter

      G Offline
      G Offline
      George L Jackson
      wrote on last edited by
      #2

      AFAIK, device drivers need to be written in native code which C++ qualifies and C# doesn't.

      "We make a living by what we get, we make a life by what we give." --Winston Churchill

      L 1 Reply Last reply
      0
      • G George L Jackson

        AFAIK, device drivers need to be written in native code which C++ qualifies and C# doesn't.

        "We make a living by what we get, we make a life by what we give." --Winston Churchill

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        AFAIK that is correct, drivers and kernel stuff require unmanaged code only. :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google


        G 1 Reply Last reply
        0
        • L Luc Pattyn

          AFAIK that is correct, drivers and kernel stuff require unmanaged code only. :)

          Luc Pattyn [Forum Guidelines] [My Articles]


          this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google


          G Offline
          G Offline
          George L Jackson
          wrote on last edited by
          #4

          AFAIK and IMHO, it is great that you confirmed what I said. :rose:

          "We make a living by what we get, we make a life by what we give." --Winston Churchill

          L 1 Reply Last reply
          0
          • G George L Jackson

            AFAIK and IMHO, it is great that you confirmed what I said. :rose:

            "We make a living by what we get, we make a life by what we give." --Winston Churchill

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #5

            My pleasure. It will be a while before a Windows Operating System could be written entirely in managed code; one of the problems is the unpredictable (hence not real-time oriented) behavior of garbage collection. :)

            Luc Pattyn [Forum Guidelines] [My Articles]


            this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google


            G 1 Reply Last reply
            0
            • L Luc Pattyn

              My pleasure. It will be a while before a Windows Operating System could be written entirely in managed code; one of the problems is the unpredictable (hence not real-time oriented) behavior of garbage collection. :)

              Luc Pattyn [Forum Guidelines] [My Articles]


              this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google


              G Offline
              G Offline
              George L Jackson
              wrote on last edited by
              #6

              Yeah, the word "real-time" is the key. With the overhead of the safe and reliable coding of the managed languages, they will be only suited for application/web programming.

              "We make a living by what we get, we make a life by what we give." --Winston Churchill

              M 1 Reply Last reply
              0
              • G George L Jackson

                Yeah, the word "real-time" is the key. With the overhead of the safe and reliable coding of the managed languages, they will be only suited for application/web programming.

                "We make a living by what we get, we make a life by what we give." --Winston Churchill

                M Offline
                M Offline
                mizitras
                wrote on last edited by
                #7

                So if you're taking a course in C#, it's a good thing of they also mention unmanaged code, and tell you how to use that in C#, or else many doors stay closed?

                G 2 Replies Last reply
                0
                • M mizitras

                  So if you're taking a course in C#, it's a good thing of they also mention unmanaged code, and tell you how to use that in C#, or else many doors stay closed?

                  G Offline
                  G Offline
                  George L Jackson
                  wrote on last edited by
                  #8

                  Well, it depends on your goals and objectives. If you want to be mostly an application or web application programmer, C#, VB.NET and Java are well suited for that job. However, in some real-world situations, you cannot avoid programming in native code such as C and C++. From my experience, most of my coding with managed code required reporting data from the "secondary" source such as an Oracle Server. I use native (unmanaged code) to obtain real-time data from a primary source such as a machine or gage on the plant floor. In a nutshell, knowing both managed and native languages means you are a more flexible and resourceful programmer. However, you also need to understand or be familiar with your programming enviroment to apply your programming skills. Thus, understanding what is going on underneath (WIN32) the Window Forms application, will foster creative ideas on how to go beyond what .NET is allowing you to do. Many a time, a customer has asked me to do something which .NET does not directly support out of the box, and, usually, I have to go back to the native environment and the required native coding. I hope there is a message somewhere up there! George

                  "We make a living by what we get, we make a life by what we give." --Winston Churchill

                  1 Reply Last reply
                  0
                  • M mizitras

                    So if you're taking a course in C#, it's a good thing of they also mention unmanaged code, and tell you how to use that in C#, or else many doors stay closed?

                    G Offline
                    G Offline
                    George L Jackson
                    wrote on last edited by
                    #9

                    P.S. IMHO, I think the GC manages memory a lot like NTFS does a hard drive. If you have a lot of small and big files, and a lot of files are being added and deleted, if a file does not fit into a current empty spot. Instead of moving files around to make room (time consuming), it will place it in the biggest void of the hard drive.

                    "We make a living by what we get, we make a life by what we give." --Winston Churchill

                    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