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.

93 lines
3.1 KiB

  1. /*
  2. * SnapinAbout.cxx
  3. *
  4. *
  5. * Copyright (c) 1998-1999 Microsoft Corporation
  6. *
  7. * PURPOSE: Defines the CSnapinAbout class.
  8. *
  9. *
  10. * OWNER: ptousig
  11. */
  12. #include <headers.hxx>
  13. CSnapinAbout::CSnapinAbout(CBaseSnapin *psnapin)
  14. {
  15. SC sc = S_OK;
  16. m_psnapin = psnapin;
  17. sc = Psnapin()->ScInitBitmaps();
  18. if (sc)
  19. goto Error;
  20. Cleanup:
  21. return;
  22. Error:
  23. TraceError(_T("CSnapinAbout::CSnapinAbout"), sc);
  24. MMCErrorBox(sc);
  25. goto Cleanup;
  26. }
  27. CSnapinAbout::~CSnapinAbout(void)
  28. {
  29. }
  30. HRESULT CSnapinAbout::GetSnapinDescription(LPOLESTR *lpDescription)
  31. {
  32. DECLARE_SC(sc,_T("CSnapinAbout::GetSnapinDescription"));
  33. Trace(tagBaseSnapinISnapinAbout, _T("--> %s::ISnapinAbout::GetSnapinDescription()"), StrSnapinClassName());
  34. ADMIN_TRY;
  35. sc=Psnapin()->ScGetSnapinDescription(lpDescription);
  36. ADMIN_CATCH_HR
  37. Trace(tagBaseSnapinISnapinAbout, _T("<-- %s::ISnapinAbout::GetSnapinDescription is returning hr=%s"), StrSnapinClassName(), SzGetDebugNameOfHr(sc.ToHr()));
  38. return(sc.ToHr());
  39. }
  40. HRESULT CSnapinAbout::GetProvider(LPOLESTR * lpName)
  41. {
  42. DECLARE_SC(sc,_T("CSnapinAbout::GetProvider"));
  43. Trace(tagBaseSnapinISnapinAbout, _T("--> %s::ISnapinAbout::GetProvider()"), StrSnapinClassName());
  44. ADMIN_TRY;
  45. sc=Psnapin()->ScGetProvider(lpName);
  46. ADMIN_CATCH_HR
  47. Trace(tagBaseSnapinISnapinAbout, _T("<-- %s::ISnapinAbout::GetProvider is returning hr=%s"), StrSnapinClassName(), SzGetDebugNameOfHr(sc.ToHr()));
  48. return(sc.ToHr());
  49. }
  50. HRESULT CSnapinAbout::GetSnapinVersion(LPOLESTR *lpVersion)
  51. {
  52. DECLARE_SC(sc,_T("CSnapinAbout::GetSnapinVersion"));
  53. Trace(tagBaseSnapinISnapinAbout, _T("--> %s::ISnapinAbout::GetSnapinVersion()"), StrSnapinClassName());
  54. ADMIN_TRY;
  55. sc=Psnapin()->ScGetSnapinVersion(lpVersion);
  56. ADMIN_CATCH_HR
  57. Trace(tagBaseSnapinISnapinAbout, _T("<-- %s::ISnapinAbout::GetSnapinVersion is returning hr=%s"), StrSnapinClassName(), SzGetDebugNameOfHr(sc.ToHr()));
  58. return(sc.ToHr());
  59. }
  60. HRESULT CSnapinAbout::GetSnapinImage(HICON *phAppIcon)
  61. {
  62. DECLARE_SC(sc,_T("CSnapinAbout::GetSnapinImage"));
  63. Trace(tagBaseSnapinISnapinAbout, _T("--> %s::ISnapinAbout::GetSnapinImage()"), StrSnapinClassName());
  64. ADMIN_TRY;
  65. ASSERT(phAppIcon);
  66. sc=Psnapin()->ScGetSnapinImage(phAppIcon);
  67. if (sc.ToHr() == S_OK && *phAppIcon == NULL)
  68. sc=S_FALSE;
  69. ADMIN_CATCH_HR
  70. Trace(tagBaseSnapinISnapinAbout, _T("<-- %s::ISnapinAbout::GetSnapinImage is returning hr=%s"), StrSnapinClassName(), SzGetDebugNameOfHr(sc.ToHr()));
  71. return(sc.ToHr());
  72. }
  73. HRESULT CSnapinAbout::GetStaticFolderImage(HBITMAP *hSmallImage, HBITMAP *hSmallImageOpen, HBITMAP *hLargeImage, COLORREF *cMask)
  74. {
  75. DECLARE_SC(sc,_T("CSnapinAbout::GetStaticFolderImage"));
  76. Trace(tagBaseSnapinISnapinAbout, _T("--> %s::ISnapinAbout::GetStaticFolderImage()"), StrSnapinClassName());
  77. ADMIN_TRY;
  78. sc=Psnapin()->ScGetStaticFolderImage(hSmallImage, hSmallImageOpen, hLargeImage, cMask);
  79. ADMIN_CATCH_HR
  80. Trace(tagBaseSnapinISnapinAbout, _T("<-- %s::ISnapinAbout::GetStaticFolderImage is returning hr=%s"), StrSnapinClassName(), SzGetDebugNameOfHr(sc.ToHr()));
  81. return(sc.ToHr());
  82. }