Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing USB-device: How to determine lpFileName in CreateFile call

Status
Not open for further replies.

arnoldw

Programmer
Sep 25, 2007
17
DK
I am trying to communicate (send and receive ASCII-characters) with a USB-barcode printer. In order to get a handle to the device I believe I have to call CreateFile and it has the following prototype:

HANDLE WINAPI CreateFile(
__in LPCTSTR lpFileName,
__in DWORD dwDesiredAccess,
__in DWORD dwShareMode,
__in_opt LPSECURITY_ATTRIBUTES lpSecurityAttributes,
__in DWORD dwCreationDisposition,
__in DWORD dwFlagsAndAttributes,
__in_opt HANDLE hTemplateFile
);

How do I determine what the first parameter should be? I guess it should be something similar to

"\\\\.\\xxxUSBxxx"

Where can I look for clues on what this string should be?
 
Many thanks for this most valuable link!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top