문제

I have an application, that needs to talk to a piece of custom hardware. I know roughly the format that the driver will register a symbolic name, however based on some physical switches on the card, the card will have a somewhat dynamic name. My question is is there way to find the registered symbolic name, or find the driver and create the symbolic name.

My application use the symbolic name for operations like CreateFile(), WriteFile(), etc.

Update

The driver is PNP, so it really only makes the one subkey under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\V70QT\, and I will have potentially more than 1 card. I thought for a second there, that I could use this registry key

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\V70QT\Enum]
"Count"=dword:00000001
"NextInstance"=dword:00000001
"0"="PCI\\VEN_10B5&DEV_2021&SUBSYS_202110B5&REV_03\\4&33c89357&0&08F0"

Because the symbolic key name gets built in a format similar to V70QTX_Y, where X is the card ID (switches on hardware), and Y is the channel (irrelevant here). I thought I could build the name up using the "NextInstance" value however that will not work, as the card could have a switch ID of like 4, and be the first instance.

도움이 되었습니까?

해결책

If your driver shows up under [HKLM\System\CurrentControlSet\Services], it would simply be a matter of enumerating the subkeys there.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top