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.

81 lines
2.9 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1997.
  5. //
  6. // File: cmdprutl.hxx
  7. //
  8. // Contents: A wrapper for scope properties around ICommand
  9. //
  10. // History: 5-10-97 mohamedn created
  11. //
  12. //----------------------------------------------------------------------------
  13. #pragma once
  14. //+---------------------------------------------------------------------------
  15. //
  16. // Class: CGetCmdProps
  17. //
  18. // Purpose: A wrapper for scope properties around ICommand
  19. //
  20. // History: 05-12-97 mohamedn Created
  21. //
  22. //----------------------------------------------------------------------------
  23. class CGetCmdProps : INHERIT_UNWIND
  24. {
  25. INLINE_UNWIND( CGetCmdProps )
  26. public:
  27. CGetCmdProps( ICommand *pICommand );
  28. void GetProperties();
  29. ULONG GetCardinality() { return _cCardinality; }
  30. void PopulateDbProps( IDBProperties *pIDBProperties, ULONG i = 0);
  31. WCHAR const * GetCatalog(unsigned i = 0 ) const { return (_aCatalogs ? _aCatalogs[i] : 0); }
  32. private:
  33. void CreateNewPropSet ( ULONG * cPropSets, DBPROPSET ** ppPropSet, ULONG index);
  34. void CopyPropertySet ( CDbPropSet &destPropSet, CDbPropSet &srcPropSet, ULONG index );
  35. void CopyDbProp ( CDbProp & destProp, CDbProp & srcProp, ULONG index);
  36. void ProcessPropSet ( DBPROPSET & propSet );
  37. void ProcessDbInitPropSet ( DBPROPSET & propSet );
  38. void ProcessCiFsExtPropSet ( DBPROPSET & propSet );
  39. void SetCardinalityValue();
  40. WCHAR const * GetMachine(unsigned i = 0 ) const { return (_aMachines ? _aMachines[i] : 0); }
  41. WCHAR const ** GetScopes() const { return ((WCHAR const **)_aPaths); }
  42. DWORD const * GetDepths() const { return (_aDepths ? _aDepths : 0); }
  43. ULONG GetScopeCount() const { return _cScopes;}
  44. CiMetaData GetQueryType() const { return _type; }
  45. GUID const * GetClientGuid() const { return _fGuidValid ? &_clientGuid : 0; }
  46. DWORD * _aDepths; // depths of scopes
  47. WCHAR ** _aPaths; // path pointers
  48. WCHAR ** _aCatalogs; // pointer to alternate catalog
  49. CiMetaData _type;
  50. ULONG _cDepths; // number of depths
  51. ULONG _cScopes; // Number of scopes specified
  52. ULONG _cCatalogs; // number of catalogs
  53. ULONG _cMachines; // number of machines
  54. ULONG _cGuids;
  55. WCHAR ** _aMachines; // pointer to machines
  56. GUID _clientGuid; // GUID of the client
  57. BOOL _fGuidValid; // Set to TRUE if _clientGuid is valid
  58. ULONG _cCardinality; // cardinality value
  59. XArrayOLEInPlace<CDbPropSet> _xPropSet;
  60. ULONG _cPropertySets;
  61. XInterface<ICommandProperties> _xICmdProp;
  62. };