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.

69 lines
2.9 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. HRESULT SetParameter(IWbemClassObject * pInst, TCHAR * szParam, SAFEARRAY * psa);
  31. HRESULT SetParameter(IWbemClassObject * pInst, TCHAR * szParam, UINT uiData);
  32. HRESULT SetParameterToNull(IWbemClassObject * pInst, TCHAR * szParam);
  33. //+--------------------------------------------------------------------------
  34. //
  35. // Function: GetParameter
  36. //
  37. // Synopsis: retrieves a parameter value from a WMI paramter list
  38. //
  39. // Arguments: [pInst] - instance to get the paramter value from
  40. // [szParam] - the name of the paramter
  41. // [xData] - [out] data
  42. //
  43. // History: 10-08-1999 stevebl Created
  44. //
  45. // Notes: There are several flavors of this procedure, one for each
  46. // data type.
  47. // (Note that BSTR is a special case since the compiler can't
  48. // distinguish it from a TCHAR * but it's semantics are
  49. // different.)
  50. //
  51. //---------------------------------------------------------------------------
  52. HRESULT GetParameter(IWbemClassObject * pInst, TCHAR * szParam, TCHAR * &szData, BOOL bUseLocalAlloc = FALSE );
  53. HRESULT GetParameterBSTR(IWbemClassObject * pInst, TCHAR * szParam, BSTR &bstrData);
  54. HRESULT GetParameter(IWbemClassObject * pInst, TCHAR * szParam, BOOL &fData);
  55. HRESULT GetParameter(IWbemClassObject * pInst, TCHAR * szParam, HRESULT &hrData);
  56. HRESULT GetParameter(IWbemClassObject * pInst, TCHAR * szParam, ULONG &ulData);
  57. HRESULT GetParameterBytes(IWbemClassObject * pInst, TCHAR * szParam, LPBYTE * lpData, DWORD *dwDataSize);
  58. HRESULT GetParameter(IWbemClassObject * pInst, TCHAR * szParam, LPWSTR *&szStringArray, DWORD &dwSize);
  59. HRESULT WbemTimeToSystemTime(XBStr& xbstrWbemTime, SYSTEMTIME& sysTime);
  60. HRESULT ExtractWQLFilters (LPTSTR lpNameSpace, DWORD* pdwCount, LPTSTR** paszNames, LPTSTR** paszFilters, BOOL bReturnIfTrueOnly=FALSE );