Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.4 KiB

  1. /**************************************************************************\
  2. * Module Name: ntreg.hxx
  3. *
  4. * CRegistrySettings class
  5. *
  6. * This class handles getting registry information for display driver
  7. * information.
  8. *
  9. * Copyright (c) Microsoft Corp. 1992-1998 All Rights Reserved
  10. *
  11. \**************************************************************************/
  12. class CRegistrySettings
  13. {
  14. private:
  15. //
  16. // Data members
  17. //
  18. HKEY _hkVideoReg;
  19. LPTSTR _pszDrvName;
  20. LPTSTR _pszKeyName;
  21. LPTSTR _pszDeviceInstanceId;
  22. DWORD _dwDevInst;
  23. //
  24. // Helper functions
  25. //
  26. VOID InitDeviceInstanceID(LPTSTR pstrDeviceKey);
  27. BOOL GetDevInfoDataFromInterfaceName(LPWSTR pwInterfaceName,
  28. HDEVINFO* phDevInfo,
  29. PSP_DEVINFO_DATA pDevInfoData);
  30. public:
  31. CRegistrySettings(LPTSTR pstrDeviceKey);
  32. ~CRegistrySettings();
  33. VOID GetHardwareInformation(PDISPLAY_REGISTRY_HARDWARE_INFO pInfo);
  34. //
  35. // THE CALLER IS RESPONSIBLE TO CLOSE THE RETURNED HKEY
  36. //
  37. HKEY OpenDrvRegKey();
  38. //
  39. // THESE FUNCTIONS DO NOT RETURN A CLONE!
  40. // THE CALLER MUST COPY IT IF IT NEEDS TO KEEP IT AROUND!
  41. // DO NOT FREE THE POINTER RETURNED FROM THIS CALL!
  42. //
  43. LPTSTR GetMiniPort(void) { return _pszDrvName; }
  44. LPTSTR GetDeviceInstanceId() { return _pszDeviceInstanceId; }
  45. };