Click here to Skip to main content
16,016,712 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: USB Communication Pin
Anonymous15-Aug-05 22:28
Anonymous15-Aug-05 22:28 
GeneralRe: USB Communication Pin
Cedric Moonen15-Aug-05 22:52
Cedric Moonen15-Aug-05 22:52 
GeneralRe: USB Communication Pin
Anonymous16-Aug-05 7:42
Anonymous16-Aug-05 7:42 
GeneralRe: USB Communication Pin
prcarp12-Aug-05 8:15
prcarp12-Aug-05 8:15 
GeneralRe: USB Communication Pin
ThatsAlok12-Aug-05 19:09
ThatsAlok12-Aug-05 19:09 
GeneralRe: USB Communication Pin
Nautilus Master13-Aug-05 0:54
Nautilus Master13-Aug-05 0:54 
GeneralRe: USB Communication Pin
Anonymous11-Sep-05 4:18
Anonymous11-Sep-05 4:18 
GeneralRe: USB Communication Src Pin
Nautilus Master11-Sep-05 4:40
Nautilus Master11-Sep-05 4:40 
Just a sample for libusb libusb-win32-filter-bin-0.1.8.0.exe

To enumerate all webcams connected to your usb port..... looks a bit messy here Wink | ;)

1)

struct usb_bus *bus;
struct usb_device *dev;

usb_init();
usb_find_busses();
usb_find_devices();

for (bus = usb_get_busses(); bus; bus = bus >next)
{
for (dev = bus->devices; dev; dev = dev->next)
{
usb_dev_handle *udev;
if (!((dev->descriptor.idVendor==PRODUCT_VENDOR_ID) && (dev->descriptor.idProduct == PRODUCT_ID)))
continue;

udev = usb_open(dev);
if (udev)
{
..... Do something here
usb_close (udev);
}

}


// ---------------------------------------------

To send something to the usb device ....

buf[0] = pan & 0xff;
buf[1] = (pan>>8) & 0xff;
buf[2] = tilt & 0xff;
buf[3] = (tilt>>8) & 0xff;

usb_control_msg(udev, XX, XX, XX, XX, buf, X, XX);

..where XX is device specific

-- modified at 12:28 Wednesday 14th September, 2005
GeneralON_WM_CREATE() Definition Pin
LiYS12-Aug-05 1:23
LiYS12-Aug-05 1:23 
GeneralRe: ON_WM_CREATE() Definition Pin
Bob Stanneveld12-Aug-05 2:39
Bob Stanneveld12-Aug-05 2:39 
GeneralRe: ON_WM_CREATE() Definition Pin
Anonymous12-Aug-05 3:45
Anonymous12-Aug-05 3:45 
GeneralRe: ON_WM_CREATE() Definition Pin
LiYS12-Aug-05 4:21
LiYS12-Aug-05 4:21 
GeneralRe: ON_WM_CREATE() Definition Pin
Bob Stanneveld12-Aug-05 4:59
Bob Stanneveld12-Aug-05 4:59 
GeneralTooltips in VS .NET 2003 Pin
Ulrich12-Aug-05 1:02
Ulrich12-Aug-05 1:02 
QuestionHow to fetch the columns from a table using vc++ CRecordSet Pin
G.Radhakrishna12-Aug-05 0:10
G.Radhakrishna12-Aug-05 0:10 
AnswerRe: How to fetch the columns from a table using vc++ CRecordSet Pin
Cedric Moonen12-Aug-05 1:31
Cedric Moonen12-Aug-05 1:31 
Generaliocp threads exit Pin
Michael Olsen11-Aug-05 23:54
Michael Olsen11-Aug-05 23:54 
GeneralRe: iocp threads exit Pin
geo_m13-Aug-05 21:36
geo_m13-Aug-05 21:36 
GeneralDisplaying Jpeg image in a dialog box Pin
jj92111-Aug-05 23:52
jj92111-Aug-05 23:52 
GeneralRe: Displaying Jpeg image in a dialog box Pin
ThatsAlok12-Aug-05 0:27
ThatsAlok12-Aug-05 0:27 
GeneralRe: Displaying Jpeg image in a dialog box Pin
Anonymous12-Aug-05 21:54
Anonymous12-Aug-05 21:54 
GeneralRe: Displaying Jpeg image in a dialog box Pin
ThatsAlok12-Aug-05 22:08
ThatsAlok12-Aug-05 22:08 
GeneralHelpNeeded Pin
nayankumarp11-Aug-05 23:52
nayankumarp11-Aug-05 23:52 
GeneralWinVer Pin
Anonymous11-Aug-05 23:48
Anonymous11-Aug-05 23:48 
GeneralRe: WinVer Pin
Trollslayer12-Aug-05 1:21
mentorTrollslayer12-Aug-05 1:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.