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.

86 lines
2.3 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1996.
  5. //
  6. // File: SvcQuery.hxx
  7. //
  8. // Contents: IInternalQuery interface for cisvc
  9. //
  10. // History: 13-Sep-96 dlee Created
  11. //
  12. //--------------------------------------------------------------------------
  13. #pragma once
  14. #include <rowset.hxx>
  15. #include <oldquery.hxx>
  16. #include "queryunk.hxx"
  17. //+-------------------------------------------------------------------------
  18. //
  19. // Class: CSvcQuery
  20. //
  21. // Purpose: IInternalQuery interface for cisvc
  22. //
  23. // History: 18-Jun-93 KyleP Created
  24. //
  25. //--------------------------------------------------------------------------
  26. class CSvcQuery : public PIInternalQuery
  27. {
  28. public:
  29. //
  30. // IUnknown methods.
  31. //
  32. STDMETHOD(QueryInterface) (THIS_ REFIID riid, void ** ppvObj);
  33. STDMETHOD_(ULONG,AddRef) (THIS);
  34. STDMETHOD_(ULONG,Release) (THIS);
  35. void Execute (IUnknown * pUnkOuter,
  36. RESTRICTION * pRestriction,
  37. CPidMapperWithNames & PidMap,
  38. CColumnSet & rColumns,
  39. CSortSet & rSort,
  40. XPtr<CMRowsetProps> & xRstProps,
  41. CCategorizationSet & rCateg,
  42. ULONG cRowsets,
  43. IUnknown ** ppUnknowns,
  44. CAccessorBag & aAccessors,
  45. IUnknown * pUnkSpec );
  46. //
  47. // Local methods
  48. //
  49. CSvcQuery( WCHAR const * wcsMachine,
  50. IDBProperties * pDbProperties );
  51. BOOL IsQueryActive( ) { return _QueryUnknown.IsQueryActive(); }
  52. private:
  53. ~CSvcQuery()
  54. {
  55. TRY
  56. {
  57. _client.Disconnect();
  58. }
  59. CATCH( CException, e )
  60. {
  61. // ignore failures in destruction -- maybe the server died
  62. vqDebugOut(( DEB_WARN, "disconnect failed: error 0x%x\n",
  63. e.GetErrorCode() ));
  64. }
  65. END_CATCH;
  66. }
  67. CQueryUnknown _QueryUnknown; // for reference tracking of rowsets
  68. CRequestClient _client; // handles communication with cisvc
  69. };