Question about C# appropriateness

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Anthony P.

    Question about C# appropriateness

    Hello Everyone,

    I have a piece of hardware that does not have any drivers. So, I'm
    considering taking the dive into driver development and writing my own
    and I'm considering doing so in C#. I'm wondering, though, if C# is an
    appropriate language for this task or do I really need C++?

    Can anyone give me any advice?

    Thank!
    Anthony
  • Jeroen Mostert

    #2
    Re: Question about C# appropriateness

    Anthony P. wrote:
    I have a piece of hardware that does not have any drivers. So, I'm
    considering taking the dive into driver development and writing my own
    and I'm considering doing so in C#. I'm wondering, though, if C# is an
    appropriate language for this task or do I really need C++?
    >
    C# uses the .NET framework. The .NET framework, as it currently is, is
    simply unusable in kernel mode, which is where device drivers reside. The
    exception is the new user-mode driver framework (from Windows XP SP2
    upwards), but even that would just mean a lot of P/Invoking in C#. C# would
    make your job harder here, not easier.

    For now, device driver development is still restricted to C/C++. It's an
    advanced topic with a high learning curve if you're only used to user-mode
    programs, so make sure you know what you're getting in to. Depending on the
    kind of device, you may not have to write a driver, but just a program that
    can communicate with the device over an existing bus (parallel port, USB,
    serial, whatever). If your device has only one specialized function and
    doesn't require microsecond-precision timing, having a program to control it
    may be as good as having a general-purpose driver.

    --
    J.

    Comment

    • =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=

      #3
      RE: Question about C# appropriateness

      Virtually 99% of driver development for the Windows OS must be done with C++,
      because of the fact that drivers require native code that interacts directly
      with the OS.
      -- Peter
      Site: http://www.eggheadcafe.com
      UnBlog: http://petesbloggerama.blogspot.com
      MetaFinder: http://www.blogmetafinder.com


      "Anthony P." wrote:
      Hello Everyone,
      >
      I have a piece of hardware that does not have any drivers. So, I'm
      considering taking the dive into driver development and writing my own
      and I'm considering doing so in C#. I'm wondering, though, if C# is an
      appropriate language for this task or do I really need C++?
      >
      Can anyone give me any advice?
      >
      Thank!
      Anthony
      >

      Comment

      • Anthony P.

        #4
        Re: Question about C# appropriateness

        I'd like to thank everyone for the thoughtful replies and I now see
        that C# just isn't where it would need to be to be able to do device
        driver creation using the language. I suppose it's C++ then. Thanks
        again!

        Comment

        • Rad [Visual C# MVP]

          #5
          Re: Question about C# appropriateness

          On Sat, 16 Feb 2008 15:11:28 -0800 (PST), Anthony P. wrote:
          I'd like to thank everyone for the thoughtful replies and I now see
          that C# just isn't where it would need to be to be able to do device
          driver creation using the language. I suppose it's C++ then. Thanks
          again!
          While that is certainly true, there are devices that support the .NET
          framework natively, in the guise of the .NET Micro Framework. They're quite
          few as of now, but they are there
          --

          Comment

          Working...