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.

80 lines
2.2 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) Microsoft Corporation
  4. //
  5. // SYNOPSIS
  6. //
  7. // Declares the class OleDBDataStore.
  8. //
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #ifndef OLEDBSTORE_H
  11. #define OLEDBSTORE_H
  12. #include <objcmd.h>
  13. #include <propcmd.h>
  14. #include <resource.h>
  15. ///////////////////////////////////////////////////////////////////////////////
  16. //
  17. // CLASS
  18. //
  19. // OleDBDataStore
  20. //
  21. // DESCRIPTION
  22. //
  23. // This class implements IDataStore2 and provides the gateway into the
  24. // OLE-DB object space.
  25. //
  26. ///////////////////////////////////////////////////////////////////////////////
  27. class ATL_NO_VTABLE OleDBDataStore
  28. : public CComObjectRootEx< CComMultiThreadModel >,
  29. public CComCoClass< OleDBDataStore, &__uuidof(OleDBDataStore) >,
  30. public IDispatchImpl< IDataStore2,
  31. &__uuidof(IDataStore2),
  32. &__uuidof(DataStore2Lib) >,
  33. private IASTraceInitializer
  34. {
  35. public:
  36. DECLARE_NO_REGISTRY()
  37. DECLARE_NOT_AGGREGATABLE(OleDBDataStore)
  38. BEGIN_COM_MAP(OleDBDataStore)
  39. COM_INTERFACE_ENTRY(IDataStore2)
  40. COM_INTERFACE_ENTRY(IDispatch)
  41. END_COM_MAP()
  42. //////////
  43. // IDataStore2
  44. //////////
  45. STDMETHOD(get_Root)(/*[out, retval]*/ IDataStoreObject** ppObject);
  46. STDMETHOD(Initialize)(
  47. /*[in]*/ BSTR bstrDSName,
  48. /*[in]*/ BSTR bstrUserName,
  49. /*[in]*/ BSTR bstrPassword
  50. );
  51. STDMETHOD(OpenObject)(
  52. /*[in]*/ BSTR bstrPath,
  53. /*[out, retval]*/ IDataStoreObject** ppObject
  54. );
  55. STDMETHOD(Shutdown)();
  56. //////////
  57. // Various OLE-DB commands. These are made public so all OLE-DB objects can
  58. // user them.
  59. //////////
  60. FindMembers members;
  61. CreateObject create;
  62. DestroyObject destroy;
  63. FindObject find;
  64. UpdateObject update;
  65. EraseBag erase;
  66. GetBag get;
  67. SetBag set;
  68. public:
  69. CComPtr<IUnknown> session; // Open session.
  70. CComPtr<IDataStoreObject> root; // The root object in the store.
  71. };
  72. #endif // OLEDBSTORE_H