What/How do I access installed Drivers in .NET 2.0 ?

  • Thread starter Thread starter Chip
  • Start date Start date
C

Chip

Hi -

There are installed device drivers on my system that I do not know how
to access from my .NET code.

I can see them in the Registry (and in my XP control panel), but I have
no idea how to find/open/use/get-access-to this code. And I can seem to
find anything relevant in the MSDN KB.

Can someone point me to the starting place for writing code that
accessed installed drivers on a machine?

Thanks in advance
cg
 
What Drivers are you trying to access. I don't think that accessing Drivers
directly is for the "faint of heart" and suggest a complete back-up of your
computer before you do this unless you know exactly what you are doing.
 
Hi Dennis -

I have an installed USB scanner (not a normal "image scanner" something
a bit more exotic thatn that) that has a driver and I have the API for
the device, but I just don't know how to get my code to be able to say
"Hello" to this thing.

I know that everything is all hooked up and installed correctly because
the "sample" tester application can drive the device just fine, so it
is just a matter of me opening/getting/finding/using the driver, and
"my world SHOULD be happy.
 
I assume it's not managed code so you should be able to add it as a com
object. Got to Project|Add References|Com. Then select the "Browse" button
and select your driver .dll. You should then be able to add this as a
reference and assuming you know the API's, declare them in your VB.Net code
with appropriate paraameters. Note that a "Long" in an API is probably an
integer in VB.Net.
 
Back
Top