Solved

input from USB read only

Posted on 2003-11-18
8
293 Views
Last Modified: 2010-04-15
Hi,

I need to take messages from a usb device and print it to the command line, in windows.
i.e program should be able to open the port take in the binary and convert it to hex and print it...
How do I do this?
0
Comment
Question by:XPUSR
  • 4
  • 3
8 Comments
 
LVL 5

Assisted Solution

by:g0rath
g0rath earned 350 total points
ID: 9771473
http://www.lvr.com/hidpage.htm

This guy has code examples using MSVC++, VB6, C#, and links on how to do this under Linux
0
 

Author Comment

by:XPUSR
ID: 9771542
Thanks, but I need something a little more basic than that..

Any ideas?

J
0
 
LVL 5

Expert Comment

by:g0rath
ID: 9771802
what do you mean by more basic? a high level overview of how it works? he's got fully functional code so its in the source if you want to modify for your needs....

Is this under windows and what compiler are you using, if your using something other then MSVC++ it shouldn't be to hard to get it working on something like Borland C++, Turbo, lcc-win, mingw, etc...
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:XPUSR
ID: 9780787
I need somethink more simplified- I have found a like with some some code but cannot get it to compile,

Could somebody please take a look @ this code,

http://www.alanmacek.com/usb/hostcode.html

I think this does or is supposed to do what I need to do but I cannot get it working with VC++ 6 , it should be straight forward to a good programmer ...

Thanks

j
0
 
LVL 5

Accepted Solution

by:
g0rath earned 350 total points
ID: 9781005
The link I gave you does excatly what this code does, but explains what is really going on. The reason you're not getting this to compile is because you most likely do not have the Microsoft DDK. It is available for free, but not to download.

This smells like a homework question since your not looking to learn but to find code that compiles directly without knowing what it does.

The link you sent is just the functions, you would have to write your own main, to access these functions...that is also why it doesn't "compile"
0
 

Author Comment

by:XPUSR
ID: 9781922
I am looking to learn but I was looking for simplistic code as this would make it easier for me,

If I can't download the DDK then how do I get my hands on it?
0
 
LVL 5

Expert Comment

by:g0rath
ID: 9810293
You have to order it, pay $15 to get it sent to you, Microsoft's S/H as they call it

http://www.microsoft.com/whdc/ddk/ordernetddkcd.mspx
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
libcurl and C++ - Post JSON Data 8 1,202
How to align numbers in C using the %d 2 89
C simple state machine for client server handshake 4 270
smtp c source code 7 49
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now