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.

76 lines
2.2 KiB

  1. #ifndef __Registry_H__
  2. #define __Registry_H__
  3. /*****************************************************************************\
  4. * MODULE: bidireq.cpp
  5. *
  6. * PURPOSE: Helper functions registering and unregistering a component.
  7. *
  8. * Copyright (C) 2000 Microsoft Corporation
  9. *
  10. * History:
  11. *
  12. * 03/07/00 Weihai Chen (weihaic) Created
  13. *
  14. \*****************************************************************************/
  15. class TComRegistry {
  16. public:
  17. TComRegistry (){};
  18. ~TComRegistry () {};
  19. static BOOL
  20. RegisterServer(
  21. IN HMODULE hModule,
  22. IN REFCLSID clsid,
  23. IN LPCTSTR pszFriendlyName,
  24. IN LPCTSTR pszVerIndProgID,
  25. IN LPCTSTR pszProgID);
  26. static BOOL
  27. UnregisterServer(
  28. IN REFCLSID clsid,
  29. IN LPCTSTR pszVerIndProgID,
  30. IN LPCTSTR pszProgID);
  31. private:
  32. static BOOL
  33. SetKeyAndValue(
  34. IN LPCTSTR pszKey,
  35. IN LPCTSTR pszSubkey,
  36. IN LPCTSTR pszValue);
  37. static BOOL
  38. SetKeyAndNameValue(
  39. IN LPCTSTR pszKey,
  40. IN LPCTSTR pszSubkey,
  41. IN LPCTSTR pszName,
  42. IN LPCTSTR pszValue);
  43. // Convert a CLSID into a char string.
  44. static BOOL
  45. CLSIDtoString(
  46. IN REFCLSID clsid,
  47. IN OUT LPTSTR pszCLSID,
  48. IN DWORD dwLength);
  49. // Delete szKeyChild and all of its descendents.
  50. static BOOL
  51. RecursiveDeleteKey(
  52. IN HKEY hKeyParent, // Parent of key to delete
  53. IN LPCTSTR lpszKeyChild); // Key to delete
  54. // Size of a CLSID as a string
  55. static CONST DWORD m_cdwClsidStringSize;
  56. static CONST TCHAR m_cszCLSID[];
  57. static CONST TCHAR m_cszCLSID2[];
  58. static CONST TCHAR m_cszInprocServer32[];
  59. static CONST TCHAR m_cszProgID[];
  60. static CONST TCHAR m_cszVersionIndependentProgID[];
  61. static CONST TCHAR m_cszCurVer[];
  62. static CONST TCHAR m_cszThreadingModel[];
  63. static CONST TCHAR m_cszBoth[];
  64. };
  65. #endif