DeviceID & DeviceKey

Discuss Autohotkey related topics here. Not a place to share code.
Forum rules
Discuss Autohotkey related topics here. Not a place to share code.
User avatar
lmstearn
Posts: 698
Joined: 11 Aug 2016, 02:32
Contact:

DeviceID & DeviceKey

21 Oct 2022, 03:49

Browsing through some old AHK code using EnumDisplayDevices there was this snippet:

Code: Select all

if (SubStr(DeviceKey,1,18)="\Registry\Machine\")
        DeviceKey := SubStr(DeviceKey,19)
EnumDisplayDevicesA (or its Unicode equivalent) is pretty much the same as it was from Win2k days, assuming the "Not used" tag for DeviceId, and "Reserved" tags for DeviceKey operated then.
As a matter of interest, trawled through the local registry for all occurrences of the DeviceKey value, wherewith some, or all, are likely used by the AMD driver for an old card in the rig, and came up with these:
Spoiler
:eh:
If we were to ever use the deviceKey itself, it surely is just the GUID hex numeric with the curly braces, so extraction goes something like:

Code: Select all

startPos := Instr(DeviceKey, "{")
DeviceKey := SubStr(DeviceKey,startPos, Instr(DeviceKey, "}") - startPos + 1))
From the list, it looks like they are for driver software, and their alteration or removal from the reg will break things quickly. One might infer from the "Reserved" attribute explained here the API has a "private" interface, as it handles quasi "security" keys.
Google doesn't reveal a lot of stuff about it- a lot of interesting threads dealing with low level APIs found in places like OSROnline used to have a high search relevance, not so much these days. :silent:
:arrow: itros "ylbbub eht tuO kaerB" a ni kcuts m'I pleH

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 7 guests