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.

85 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. metautil.h
  5. Abstract:
  6. Useful functions for dealing with the metabase.
  7. Author:
  8. Magnus Hedlund (MagnusH) --
  9. Revision History:
  10. --*/
  11. #ifndef _METAUTIL_INCLUDED_
  12. #define _METAUTIL_INCLUDED_
  13. // Dependencies:
  14. #include <iiscnfg.h> // IIS Metabase Values
  15. class CMultiSz;
  16. class CMetabaseKey;
  17. // Defaults:
  18. #define MD_DEFAULT_TIMEOUT 5000
  19. // Creating a metabase object:
  20. HRESULT CreateMetabaseObject ( LPCWSTR wszMachine, IMSAdminBase ** ppMetabase );
  21. // Metabase property manipulation:
  22. BOOL StdGetMetabaseProp ( CMetabaseKey * pMB, DWORD dwID, BOOL fDefault, BOOL * pfOut, LPCWSTR wszPath = _T(""), DWORD dwUserType = IIS_MD_UT_SERVER, DWORD dwFlags = METADATA_INHERIT );
  23. BOOL StdGetMetabaseProp ( CMetabaseKey * pMB, DWORD dwID, DWORD dwDefault, DWORD * pdwOut, LPCWSTR wszPath = _T(""), DWORD dwUserType = IIS_MD_UT_SERVER, DWORD dwFlags = METADATA_INHERIT );
  24. BOOL StdGetMetabaseProp ( CMetabaseKey * pMB, DWORD dwID, LPCWSTR strDefault, BSTR * pstrOut, LPCWSTR wszPath = _T(""), DWORD dwUserType = IIS_MD_UT_SERVER, DWORD dwFlags = METADATA_INHERIT );
  25. BOOL StdGetMetabaseProp ( CMetabaseKey * pMB, DWORD dwID, LPCWSTR mszDefault, CMultiSz * pmszOut, LPCWSTR wszPath = _T(""), DWORD dwUserType = IIS_MD_UT_SERVER, DWORD dwFlags = METADATA_INHERIT );
  26. BOOL StdPutMetabaseProp ( CMetabaseKey * pMB, DWORD dwID, BOOL fValue, LPCWSTR wszPath = _T(""), DWORD dwUserType = IIS_MD_UT_SERVER, DWORD dwFlags = METADATA_INHERIT );
  27. BOOL StdPutMetabaseProp ( CMetabaseKey * pMB, DWORD dwID, DWORD dwValue, LPCWSTR wszPath = _T(""), DWORD dwUserType = IIS_MD_UT_SERVER, DWORD dwFlags = METADATA_INHERIT );
  28. BOOL StdPutMetabaseProp ( CMetabaseKey * pMB, DWORD dwID, BSTR strValue, LPCWSTR wszPath = _T(""), DWORD dwUserType = IIS_MD_UT_SERVER, DWORD dwFlags = METADATA_INHERIT );
  29. BOOL StdPutMetabaseProp ( CMetabaseKey * pMB, DWORD dwID, CMultiSz * pmszValue, LPCWSTR wszPath = _T(""), DWORD dwUserType = IIS_MD_UT_SERVER, DWORD dwFlags = METADATA_INHERIT );
  30. BOOL HasKeyChanged ( IMSAdminBase * pMetabase, METADATA_HANDLE hKey, const FILETIME * pftLastChanged, LPCWSTR wszSubKey = _T("") );
  31. // Metabase lists:
  32. BOOL IsValidIntegerSubKey ( LPCWSTR wszSubKey );
  33. //
  34. // Needed by mail
  35. //
  36. inline BOOL StdGetMetabaseProp (CMetabaseKey * pMB,
  37. DWORD dwID,
  38. long lDefault,
  39. long * plOut,
  40. LPCWSTR wszPath = _T(""),
  41. DWORD dwUserType = IIS_MD_UT_SERVER,
  42. DWORD dwFlags = METADATA_INHERIT )
  43. {
  44. return StdGetMetabaseProp( pMB, dwID, (DWORD)lDefault, (DWORD*)plOut, wszPath, dwUserType,dwFlags);
  45. }
  46. inline BOOL StdPutMetabaseProp (CMetabaseKey * pMB,
  47. DWORD dwID,
  48. long lValue,
  49. LPCWSTR wszPath = _T(""),
  50. DWORD dwUserType = IIS_MD_UT_SERVER,
  51. DWORD dwFlags = METADATA_INHERIT )
  52. {
  53. return StdPutMetabaseProp( pMB, dwID, (DWORD)lValue, wszPath, dwUserType, dwFlags );
  54. }
  55. #endif // _METAUTIL_INCLUDED_