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.

72 lines
1.3 KiB

  1. /*
  2. */
  3. #pragma once
  4. #include "ihost.h"
  5. #include <vector>
  6. #include "iuiview.h"
  7. #include "SxApwComPtr.h"
  8. #include "idsource.h"
  9. class __declspec(uuid(CLSID_CSxApwHost_declspec_uuid))
  10. CSxApwHost
  11. :
  12. public ATL::CComObjectRootEx<CComSingleThreadModel>,
  13. public ATL::CComCoClass<CSxApwHost, &__uuidof(CSxApwHost)>,
  14. public ISxApwHost
  15. {
  16. typedef std::vector<CSxApwComPtr<ISxApwUiView> > Views_t;
  17. Views_t m_views;
  18. public:
  19. CSxApwHost() { }
  20. BEGIN_COM_MAP(CSxApwHost)
  21. COM_INTERFACE_ENTRY(ISxApwHost)
  22. END_COM_MAP()
  23. DECLARE_NO_REGISTRY();
  24. STDMETHOD(SetDataSource)(
  25. LPCWSTR datasource
  26. );
  27. STDMETHOD(CreateView)(
  28. LPCWSTR viewstr
  29. );
  30. STDMETHOD(DestroyView)(
  31. LPCWSTR viewstr
  32. ) { return S_OK; }
  33. STDMETHOD(RunQuery)(
  34. LPCWSTR query
  35. );
  36. STDMETHOD(OnNextRow)(
  37. int nColumns,
  38. const LPCWSTR columns[]
  39. );
  40. STDMETHOD(OnRowCountEstimateAvailable)(
  41. int
  42. );
  43. STDMETHOD(OnQueryDone)(
  44. ) { return S_OK; }
  45. STDMETHOD(OnQueryStart)(
  46. ) { return S_OK; }
  47. STDMETHOD(InformSchema)(
  48. const SxApwColumnInfo rgColumnInfo[],
  49. int nColumnCount
  50. );
  51. HRESULT DSQuery(int nDataSourceType, int nViewType, PCWSTR query, HWND hWnd);
  52. HRESULT Main();
  53. CSxApwComPtr<ISxApwDataSource> m_dataSource;
  54. };