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.

54 lines
1.4 KiB

  1. //=============================================================================
  2. // This file contains code to implement the CMSInfoCategory derived class for
  3. // showing saved NFO data.
  4. //=============================================================================
  5. #include "stdafx.h"
  6. #include "category.h"
  7. #include "datasource.h"
  8. #include "msinfo5category.h"
  9. //=============================================================================
  10. // CNFO6DataSource provides information from a 5.0/6.0 NFO file.
  11. //=============================================================================
  12. CNFO6DataSource::CNFO6DataSource()
  13. {
  14. }
  15. CNFO6DataSource::~CNFO6DataSource()
  16. {
  17. }
  18. HRESULT CNFO6DataSource::Create(HANDLE h, LPCTSTR szFilename)
  19. {
  20. CMSInfo5Category * pNewRoot = NULL;
  21. HRESULT hr = CMSInfo5Category::ReadMSI5NFO(h, &pNewRoot, szFilename);
  22. if (SUCCEEDED(hr) && pNewRoot)
  23. m_pRoot = pNewRoot;
  24. return hr;
  25. }
  26. //=============================================================================
  27. // CNFO7DataSource provides information from a 7.0 NFO file.
  28. //=============================================================================
  29. CNFO7DataSource::CNFO7DataSource()
  30. {
  31. }
  32. CNFO7DataSource::~CNFO7DataSource()
  33. {
  34. }
  35. HRESULT CNFO7DataSource::Create(LPCTSTR szFilename)
  36. {
  37. CMSInfo7Category * pNewRoot = NULL;
  38. HRESULT hr = CMSInfo7Category::ReadMSI7NFO(&pNewRoot, szFilename);
  39. if (SUCCEEDED(hr) && pNewRoot)
  40. m_pRoot = pNewRoot;
  41. return hr;
  42. }