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.

55 lines
2.2 KiB

  1. #ifndef __IDLDATA_H__
  2. #define __IDLDATA_H__
  3. #include "idlcomm.h"
  4. #define MAX_FORMATS ICF_MAX
  5. STDAPI CIDLData_CreateInstance(LPCITEMIDLIST pidlFolder, UINT cidl, LPCITEMIDLIST apidl[], IDataObject *pdtInner, IDataObject **ppdtobj);
  6. class CIDLDataObj : public IDataObject, public IAsyncOperation
  7. {
  8. friend HRESULT CIDLData_CreateInstance(LPCITEMIDLIST pidlFolder, UINT cidl, LPCITEMIDLIST apidl[], IDataObject *pdtInner, IDataObject **ppdtobj);
  9. protected:
  10. CIDLDataObj(IDataObject *pdtInner);
  11. CIDLDataObj(LPCITEMIDLIST pidlFolder, UINT cidl, LPCITEMIDLIST apidl[]);
  12. CIDLDataObj(LPCITEMIDLIST pidlFolder, UINT cidl, LPCITEMIDLIST apidl[], IDataObject *pdtInner);
  13. virtual ~CIDLDataObj(void);
  14. public:
  15. void InitIDLData1(IDataObject *pdtInner);
  16. void InitIDLData2(LPCITEMIDLIST pidlFolder, UINT cidl, LPCITEMIDLIST apidl[]);
  17. // IUnknown
  18. STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj);
  19. STDMETHODIMP_(ULONG) AddRef(void);
  20. STDMETHODIMP_(ULONG) Release(void);
  21. // IDataObject
  22. STDMETHODIMP GetData(FORMATETC *pFmtEtc, STGMEDIUM *pstm);
  23. STDMETHODIMP GetDataHere(FORMATETC *pFmtEtc, STGMEDIUM *pstm);
  24. STDMETHODIMP QueryGetData(FORMATETC *pFmtEtc);
  25. STDMETHODIMP GetCanonicalFormatEtc(FORMATETC *pFmtEtcIn, FORMATETC *pFmtEtcOut);
  26. STDMETHODIMP SetData(FORMATETC *pFmtEtc, STGMEDIUM *pstm, BOOL fRelease);
  27. STDMETHODIMP EnumFormatEtc(DWORD dwDirection, LPENUMFORMATETC *ppEnum);
  28. STDMETHODIMP DAdvise(FORMATETC *pFmtEtc, DWORD grfAdv, LPADVISESINK pAdvSink, DWORD *pdwConnection);
  29. STDMETHODIMP DUnadvise(DWORD dwConnection);
  30. STDMETHODIMP EnumDAdvise(LPENUMSTATDATA *ppEnum);
  31. // IAsyncOperation
  32. STDMETHODIMP SetAsyncMode(BOOL fDoOpAsync);
  33. STDMETHODIMP GetAsyncMode(BOOL *pfIsOpAsync);
  34. STDMETHODIMP StartOperation(IBindCtx * pbc);
  35. STDMETHODIMP InOperation(BOOL * pfInAsyncOp);
  36. STDMETHODIMP EndOperation(HRESULT hResult, IBindCtx * pbc, DWORD dwEffects);
  37. private:
  38. LONG _cRef;
  39. IDataObject *_pdtInner;
  40. IUnknown *_punkThread;
  41. BOOL _fEnumFormatCalled; // TRUE once called.
  42. BOOL _fDidAsynchStart;
  43. FORMATETC _fmte[MAX_FORMATS];
  44. STGMEDIUM _medium[MAX_FORMATS];
  45. };
  46. #endif