Interacting with USB device

This is a discussion on Interacting with USB device within the C Programming forums, part of the General Programming Boards category; Hi guys, Is there a way to get input from a USB device with C. I want to take the ...

  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    26

    Interacting with USB device

    Hi guys,
    Is there a way to get input from a USB device with C. I want to take the input from my USB capture card and then output it using Winamp or something.



    Thanks

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    Have you been to http://lvr.com/usb.htm ?
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    This is definitely not "beginner" stuff. USB is a common protocol that supports a wide range of devies, and whilst the protocol is pretty much specified in public specifications, that's like saying that TCP/IP is a strict protocol - but the content in the TCP packets can be just about anything - likewise, USB packets can contain whatever the device provider thinks makes sense to them. The lower level drivers are generic, so any device gets handled by the same low-level drivers, but the higher level is managed by device-specific drivers that understand those packets.

    Once it goes high enough in the device hieararchy, it becomes a standard device of some sort (such as a capture device, a mouse device or modem device for example). These support a standard protocol, that is defined by Microsoft, but there is often "special" things that are specific to that particular device.

    And of course playing something back in WinAMP isn't necessarily straightforward either - I've never tried. [Nor have I worked with USB drivers, but I have a pretty good handle on Windows device driver architecture in general, and I know well enough to describe overall how it works - even if I don't know EXACTLY how it works].

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 09-02-2008, 10:51 PM
  2. How to talk to PIC PLC or any other device thru USB
    By jabka in forum Networking/Device Communication
    Replies: 9
    Last Post: 10-01-2007, 02:31 PM
  3. Replies: 4
    Last Post: 06-30-2004, 03:11 PM
  4. Opening a specific USB device.
    By marsface in forum Windows Programming
    Replies: 4
    Last Post: 07-11-2002, 12:02 AM
  5. how can i detect usb device?
    By orcher in forum C++ Programming
    Replies: 2
    Last Post: 06-13-2002, 09:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21