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.

94 lines
3.5 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1994 - 1997.
  5. //
  6. // File: rsoputil.h
  7. //
  8. // Contents: helper functions for working with the RSOP database
  9. //
  10. // History: 10-18-1999 stevebl Created
  11. //
  12. //---------------------------------------------------------------------------
  13. //+--------------------------------------------------------------------------
  14. //
  15. // Function: SetParameter
  16. //
  17. // Synopsis: sets a paramter's value in a WMI parameter list
  18. //
  19. // Arguments: [pInst] - instance on which to set the value
  20. // [szParam] - the name of the parameter
  21. // [xData] - the data
  22. //
  23. // History: 10-08-1999 stevebl Created
  24. //
  25. // Notes: There may be several flavors of this procedure, one for
  26. // each data type.
  27. //
  28. //---------------------------------------------------------------------------
  29. HRESULT SetParameter(IWbemClassObject * pInst, TCHAR * szParam, TCHAR * szData);
  30. //+--------------------------------------------------------------------------
  31. //
  32. // Function: GetParameter
  33. //
  34. // Synopsis: retrieves a parameter value from a WMI paramter list
  35. //
  36. // Arguments: [pInst] - instance to get the paramter value from
  37. // [szParam] - the name of the paramter
  38. // [xData] - [out] data
  39. //
  40. // History: 10-08-1999 stevebl Created
  41. //
  42. // Notes: There are several flavors of this procedure, one for each
  43. // data type.
  44. // (Note that BSTR is a special case since the compiler can't
  45. // distinguish it from a TCHAR * but it's semantics are
  46. // different.)
  47. //
  48. //---------------------------------------------------------------------------
  49. HRESULT GetParameter(IWbemClassObject * pInst, TCHAR * szParam, TCHAR * &szData);
  50. HRESULT GetParameter(IWbemClassObject * pInst, TCHAR * szParam, CString &szData);
  51. HRESULT GetParameterBSTR(IWbemClassObject * pInst, TCHAR * szParam, BSTR &bstrData);
  52. HRESULT GetParameter(IWbemClassObject * pInst, TCHAR * szParam, BOOL &fData);
  53. HRESULT GetParameter(IWbemClassObject * pInst, TCHAR * szParam, HRESULT &hrData);
  54. HRESULT GetParameter(IWbemClassObject * pInst, TCHAR * szParam, ULONG &ulData);
  55. HRESULT GetParameter(IWbemClassObject * pInst, TCHAR * szParam, GUID &guid);
  56. HRESULT GetParameter(IWbemClassObject * pInst, TCHAR * szParam, unsigned int &ui);
  57. HRESULT GetParameter(IWbemClassObject * pInst, TCHAR * szParam, UINT &uiCount, GUID * &rgGuid);
  58. HRESULT GetParameter(IWbemClassObject * pInst, TCHAR * szParam, UINT &uiCount, TCHAR ** &rgszData);
  59. HRESULT GetParameter(IWbemClassObject * pInst, TCHAR * szParam, PSECURITY_DESCRIPTOR &psd);
  60. HRESULT GetParameter(IWbemClassObject * pInst, TCHAR * szParam, UINT &uiCount, CSPLATFORM * &rgPlatform);
  61. HRESULT CStringFromWBEMTime(CString &szOut, BSTR bstrIn, BOOL fShortFormat);
  62. //+--------------------------------------------------------------------------
  63. //
  64. // Function: GetGPOFriendlyName
  65. //
  66. // Synopsis:
  67. //
  68. // Arguments: [pIWbemServices] -
  69. // [lpGPOID] -
  70. // [pLanguage] -
  71. // [pGPOName] -
  72. // [pGPOPath] -
  73. //
  74. // Returns:
  75. //
  76. // Modifies:
  77. //
  78. // History: 01-26-2000 stevebl Stolen from code written by EricFlo
  79. //
  80. // Notes:
  81. //
  82. //---------------------------------------------------------------------------
  83. HRESULT GetGPOFriendlyName(IWbemServices *pIWbemServices,
  84. LPTSTR lpGPOID,
  85. BSTR pLanguage,
  86. LPTSTR *pGPOName);