Re: Identifying FriendlyName of USB COM port
- From: "Paul E. Schoen" <pstech@xxxxxxxxx>
- Date: Mon, 9 Mar 2009 14:29:15 -0400
<alanglloyd@xxxxxxx> wrote in message
news:a88d6574-a36f-4a64-ad77-53b6404d7d38@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On 9 Mar, 08:38, "Paul E. Schoen" <pst...@xxxxxxxxx> wrote:
<snip>
� S := 'SYSTEM\CurrentControlSet\Enum\USB';<snip>
� S := S + '\Vid_04d8&Pid_fdcf\0123456789';
I don't get a "FriendlyName" value until I go into another enumeration
hive (USBSTOR) . . .
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USBSTOR
\Disk&Ven_&Prod_USB_DISK_25X&Rev_PMAP\07540E18005D&0]
<snip>
"FriendlyName"="USB DISK 25X USB Device"
The values I get for a USB/Vid etc you use are . . .
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB
\Vid_0b27&Pid_0601\0000000000319E]
"DeviceDesc"="USB Mass Storage Device"
"LocationInformation"="USB Mass Storage Device"
"Capabilities"
"UINumber"
"HardwareID
"CompatibleIDs"
"ClassGUID"
"Class"="USB"
"Driver"
"Mfg"="Compatible USB storage device"
"Service"="USBSTOR"
"ConfigFlags"
I am running Windows XP Pro SP 2.
Also I'd throw a try/finally resource protection for Reg.
======================================================================
Should the try/finally start with Reg := TRegistry.Create; and the finally
section free everything? Does Free need to check for a "nil" value first?
And I probably should set the pointer to nil after free. D4 does not have
FreeAndNil.
I just used RegEdit and I have many entries under USB. In fact, probably
every device that has ever been enumerated. It appears that some devices,
such as your mass storage device, are further descibed in a separate
USBSTOR hive, as defined by "Service". There are also entries under
USBPRINT, but those do not have friendly names.
I'm running XP Home, and I think it's SP3. I'm trying to get my application
to work also on my laptop which has Vista Business. So far the main
problems seem to be due to folder and file virtual stores which is related
to user file permissions, but that's another story.
Thanks,
Paul
.
- Follow-Ups:
- Re: Identifying FriendlyName of USB COM port
- From: alanglloyd@xxxxxxx
- Re: Identifying FriendlyName of USB COM port
- From: Rob Kennedy
- Re: Identifying FriendlyName of USB COM port
- References:
- Identifying FriendlyName of USB COM port
- From: Paul E. Schoen
- Re: Identifying FriendlyName of USB COM port
- From: alanglloyd@xxxxxxx
- Identifying FriendlyName of USB COM port
- Prev by Date: Re: Combinatorics
- Next by Date: Re: Identifying FriendlyName of USB COM port
- Previous by thread: Re: Identifying FriendlyName of USB COM port
- Next by thread: Re: Identifying FriendlyName of USB COM port
- Index(es):
Relevant Pages
|
Loading