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.

61 lines
2.3 KiB

  1. // ITDB.H: ITDatabase interface declaration
  2. #ifndef __ITDB_H__
  3. #define __ITDB_H__
  4. // {8fa0d5a2-dedf-11d0-9a61-00c04fb68bf7} (changed from IT 3.0)
  5. DEFINE_GUID(IID_IITDatabase,
  6. 0x8fa0d5a2, 0xdedf, 0x11d0, 0x9a, 0x61, 0x00, 0xc0, 0x4f, 0xb6, 0x8b, 0xf7);
  7. #ifdef ITPROXY
  8. // {66673452-8C23-11d0-A84E-00AA006C7D01}
  9. DEFINE_GUID(CLSID_IITDatabase,
  10. 0x66673452, 0x8c23, 0x11d0, 0xa8, 0x4e, 0x0, 0xaa, 0x0, 0x6c, 0x7d, 0x1);
  11. #else
  12. // {4662daa9-d393-11d0-9a56-00c04fb68bf7} (changed from IT 3.0)
  13. DEFINE_GUID(CLSID_IITDatabaseLocal,
  14. 0x4662daa9, 0xd393, 0x11d0, 0x9a, 0x56, 0x00, 0xc0, 0x4f, 0xb6, 0x8b, 0xf7);
  15. #endif // ITPROXY
  16. // Guaranteed to be an invalid value for dwObjInstance params in IITDatabase
  17. // methods.
  18. #define IITDB_OBJINST_NULL ((DWORD) 0xFFFFFFFF)
  19. DECLARE_INTERFACE_(IITDatabase, IUnknown)
  20. {
  21. STDMETHOD(Open)(LPCWSTR lpszHost, LPCWSTR lpszMoniker, DWORD dwFlags) PURE;
  22. STDMETHOD(Close)(void) PURE;
  23. // Creates an unnamed object that can be referenced in the future
  24. // by *pdwObjInstance. Note that the value in *pdwObjInstance will be
  25. // persisted by the database when it is asked to save via
  26. // IPersistStorage::Save.
  27. STDMETHOD(CreateObject)(REFCLSID rclsid, DWORD *pdwObjInstance) PURE;
  28. // Retrieves a specified IUnknown-based interface on the object identified
  29. // by dwObjInstance.
  30. STDMETHOD(GetObject)(DWORD dwObjInstance, REFIID riid, LPVOID *ppvObj) PURE;
  31. // To obtain a pointer to a named object's persistence the object's full
  32. // name (including any object-specific type prefix) should be passed in
  33. // lpswszObject. If *lpwszObject is NULL, then the database's own storage
  34. // will be returned. If lpwszObject is NULL, then dwObjInstance will be
  35. // used to identify the object and locate its persistence. On exit,
  36. // *ppvPersistence will be either an IStorage* or an IStream*, depending
  37. // on what the caller specified with the fStream param. The caller should
  38. // assume that only read operations can be performed on *ppvPersistence.
  39. // If the specified object's persistence doesn't exist, or if it exists
  40. // but is of the wrong type, then STG_E_FILENOTFOUND will be returned.
  41. STDMETHOD(GetObjectPersistence)(LPCWSTR lpwszObject, DWORD dwObjInstance,
  42. LPVOID *ppvPersistence, BOOL fStream) PURE;
  43. };
  44. typedef IITDatabase* LPITDB;
  45. #endif // __ITDB_H__