| 54 | } |
| 55 | |
| 56 | bool 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 | |
| 73 | bool GetRegistryValue( HKEY key, const char* name, std::string& value ) |
| 74 | { |
no test coverage detected