MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetDeviceRegistryKey

Function GetDeviceRegistryKey

trinityal/Tr2DriverUtilities.cpp:56–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56bool GetDeviceRegistryKey( uint32_t deviceId, std::string& keyPath )
57{
58 DISPLAY_DEVICE dd;
59 dd.cb = sizeof( DISPLAY_DEVICE );
60
61 for( int i = 0; EnumDisplayDevices( nullptr, i, &dd, 0 ); ++i )
62 {
63 uint32_t device;
64 if( GetHexIdFromDeviceId( dd.DeviceID, device ) && device == deviceId )
65 {
66 keyPath = GetRegistryPathToLocalMachine( dd.DeviceKey );
67 return true;
68 }
69 }
70 return false;
71}
72
73bool GetRegistryValue( HKEY key, const char* name, std::string& value )
74{

Callers 1

DoGetDriverVersionFunction · 0.85

Calls 2

GetHexIdFromDeviceIdFunction · 0.85

Tested by

no test coverage detected