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.

91 lines
2.4 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997 - 1998.
  5. //
  6. // File: cmdcreat.hxx
  7. //
  8. // Contents: ICommand creator class
  9. //
  10. // Classes: CSimpleCommandCreator
  11. //
  12. // History: 30 Jun 1995 AlanW Created - split from stdqspec.hxx
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include <regauto.hxx> // CRegAuto
  17. #include <qryreg.hxx> // GetSimpleCommandCreatorCF
  18. #define SCOPE_PROPSET_COUNT 2
  19. #define INITIAL_PROPERTIES_COUNT 16
  20. //+-------------------------------------------------------------------------
  21. //
  22. // Class: CSimpleCommandCreator
  23. //
  24. // Purpose: Class factory and implementation for CSimpleCommandCreator
  25. //
  26. // History: 13-May-97 KrishnaN Created
  27. //
  28. //--------------------------------------------------------------------------
  29. class CSimpleCommandCreator : public IClassFactory,
  30. public ISimpleCommandCreator,
  31. public IColumnMapperCreator
  32. {
  33. public:
  34. //
  35. // IUnknown methods
  36. //
  37. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppiuk );
  38. STDMETHOD_(ULONG, AddRef) (THIS);
  39. STDMETHOD_(ULONG, Release) (THIS);
  40. //
  41. // IClassFactory methods
  42. //
  43. STDMETHOD(CreateInstance) ( IUnknown * pOuterUnk,
  44. REFIID riid, void * * ppvObject );
  45. STDMETHOD(LockServer) ( BOOL fLock );
  46. //
  47. // ISimpleCommandCreator methods
  48. //
  49. STDMETHOD(CreateICommand) ( IUnknown ** ppUnknown, IUnknown * pOuterUnk );
  50. STDMETHOD(VerifyCatalog) ( WCHAR const * pwszMachine,
  51. WCHAR const * pwszCatalogName );
  52. STDMETHOD(GetDefaultCatalog) ( WCHAR * pwszCatalogName,
  53. ULONG cwcIn,
  54. ULONG * pcwcOut );
  55. //
  56. // IColumnMapperCreator methods
  57. //
  58. STDMETHOD(GetColumnMapper) ( WCHAR const *wcsMachineName,
  59. WCHAR const *wcsCatalogName,
  60. IColumnMapper **ppColumnMapper );
  61. CSimpleCommandCreator();
  62. virtual ~CSimpleCommandCreator();
  63. protected:
  64. friend IClassFactory * GetSimpleCommandCreatorCF();
  65. long _cRefs;
  66. XPtr<CRegAutoStringValue> xDefaultCatalogValue;
  67. };