USB windows xp final USB access issues
Posted
by Lex Dean
on Stack Overflow
See other posts from Stack Overflow
or by Lex Dean
Published on 2010-05-28T05:11:01Z
Indexed on
2010/05/28
5:41 UTC
Read the original article
Hit count: 295
windows-xp
|usb
I basically understand you C++ people, Please do not get distracted because I'm writing in Delphi.
I have a stable USB Listing method that accesses all my USB devices
I get the devicepath
, and this structure:
TSPDevInfoData = packed record
Size: DWORD;
ClassGuid: TGUID;
DevInst: DWORD; // DEVINST handle
Reserved: DWord;
end;
I get my ProductID
and VenderID
successfully from my DevicePath
Lists all USB devices connected to the computer at the time
That enables me to access the registry data to each device in a stable way.
What I'm lacking is a little direction
Is friendly name able to be written inside the connected USB Micro chips by the firmware programmer? (I'm thinking of this to identify the device even further, or is this to help identify Bulk data transfer devices like memory sticks and camera's)
Can I use SPDRP_REMOVAL_POLICY_OVERRIDE to some how reset these polices What else can I do with the registry details.
Identifying when some one unplugs a device The program is using (in windows XP standard) I used a documented windows event that did not respond. Can I read a registry value to identify if its still connected?
using CreateFileA (DevicePath) to send and receive data I have read when some one unplugs in the middle of a data transfer its difficult clearing resources.
what can IoCreateDevice do for me and how does one use it for that task
This two way point of connection status and system lock up situations is very concerning. Has some one read anything about this subject recently?
My objectives are to 1. list connected USB devices
identify a in development Micro Controller from everything else
send and receive data in a stable and fast way to the limits of the controller
No lock up's transferring data
Note I'm not using any service packs
I understand everything USB is in ANSI when windows xp is not and .Net is all about ANSI (what a waste of memory)
I plan to continue this project into a .net at a later date as an addition.
MSDN gives me Structures and Functions and what should link to what ok but say little to what they get used for.
What is available in my language Delphi is way over priced that it needs a major price drop.
© Stack Overflow or respective owner