.NET 2.0 & USB support?

C

Claus Konrad

Hi

Anybody got an impression whether .NET 2.0 supports USB ports?
I know that the Serial (COM) and parallel ports (LPT1) are included, but how is the story on USB ports?

/Claus
 
N

Nicholas Paldino [.NET/C# MVP]

Claus,

There is no support for USB devices out of the box. You will have to use COM interop or P/Invoke to make calls to unmanaged APIs in order to access this functionality.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Hi

Anybody got an impression whether .NET 2.0 supports USB ports?
I know that the Serial (COM) and parallel ports (LPT1) are included, but how is the story on USB ports?

/Claus
 
W

Willy Denoyette [MVP]

What exactly do you mean with "support"? All device access in Windows goes through device driver interfaces, while the device drivers can only be implemented in C , all user code should be able to access the device, irrespective the implementation language. The way this is done depends on the device type itself, f.i to access a generic USB Disk device one can use the IO namespace classes. However if the device is a non generic device, one should access the device through it driver interface using CreateFile and DeviceControl Win32 calls. If the device manufacturer has added support for higher level language interfaces like COM (or .NET) you can use COM interop to access the device.

Wlily.




Hi

Anybody got an impression whether .NET 2.0 supports USB ports?
I know that the Serial (COM) and parallel ports (LPT1) are included, but how is the story on USB ports?

/Claus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top