Leaked source code of windows server 2003
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.

58 lines
1.1 KiB

  1. class CServiceItem
  2. {
  3. public:
  4. CServiceItem();
  5. void GetClsid(CLSID& clsid) const;
  6. HRESULT Load(const WCHAR* pszClsid);
  7. BOOL ShallStartByFrameWork();
  8. BOOL SupportsSecurityInterface();
  9. protected:
  10. CLSID m_clsid;
  11. DWORD m_fStartByFrameWork;
  12. DWORD m_fSupportsSecurityInterface;
  13. };
  14. class CServiceDirectory
  15. {
  16. public:
  17. CServiceDirectory();
  18. ~CServiceDirectory();
  19. void Reset();
  20. BOOL GetNext(CServiceItem& service);
  21. protected:
  22. DWORD m_dwIndex;
  23. HKEY m_hKeyDirectory;
  24. };
  25. inline CServiceItem::CServiceItem()
  26. {
  27. ZeroMemory(&m_clsid, sizeof(m_clsid));
  28. }
  29. inline void CServiceItem::GetClsid(CLSID& clsid) const
  30. {
  31. clsid = m_clsid;
  32. }
  33. inline BOOL CServiceItem::ShallStartByFrameWork()
  34. {
  35. return m_fStartByFrameWork;
  36. }
  37. inline BOOL CServiceItem::SupportsSecurityInterface()
  38. {
  39. return m_fSupportsSecurityInterface;
  40. }
  41. inline CServiceDirectory::CServiceDirectory() : m_dwIndex(0), m_hKeyDirectory(NULL){};
  42. inline CServiceDirectory::~CServiceDirectory()
  43. {
  44. if (m_hKeyDirectory)
  45. {
  46. RegCloseKey(m_hKeyDirectory);
  47. }
  48. }