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.

66 lines
1.5 KiB

  1. // NILXForm.h -- Declarations for the Null TransformInstance object
  2. #ifndef __NILXFORM_H__
  3. #define __NILXFORM_H__
  4. class CNull_TransformInstance : public CITUnknown
  5. {
  6. public:
  7. ~CNull_TransformInstance();
  8. static HRESULT CreateFromILockBytes
  9. (IUnknown *pUnkOuter, ILockBytes *pLKB,
  10. ITransformInstance **ppTransformInstance
  11. );
  12. private:
  13. CNull_TransformInstance(IUnknown *pUnkOuter);
  14. class CImpITransformInstance : public IITTransformInstance
  15. {
  16. public:
  17. CImpITransformInstance(CNull_TransformInstance *pBackObj, IUnknown *punkOuter);
  18. ~CImpITransformInstance();
  19. HRESULT InitFromLockBytes(ILockBytes *pLKB);
  20. // ITransformInstance interfaces:
  21. HRESULT STDMETHODCALLTYPE ReadAt
  22. (ULARGE_INTEGER ulOffset, void *pv, ULONG cb, ULONG *pcbRead,
  23. ImageSpan *pSpan
  24. );
  25. HRESULT STDMETHODCALLTYPE WriteAt
  26. (ULARGE_INTEGER ulOffset, const void *pv, ULONG cb, ULONG *pcbWritten,
  27. ImageSpan *pSpan
  28. );
  29. HRESULT STDMETHODCALLTYPE Flush();
  30. HRESULT STDMETHODCALLTYPE SpaceSize(ULARGE_INTEGER *puliSize);
  31. private:
  32. ILockBytes *m_pLKB;
  33. CULINT m_cbSpaceSize;
  34. };
  35. CImpITransformInstance m_ImpITransformInstance;
  36. };
  37. inline CNull_TransformInstance::CNull_TransformInstance(IUnknown *pUnkOuter)
  38. : m_ImpITransformInstance(this, pUnkOuter),
  39. CITUnknown(&IID_ITransformInstance, 1, &m_ImpITransformInstance)
  40. {
  41. }
  42. inline CNull_TransformInstance::~CNull_TransformInstance(void)
  43. {
  44. }
  45. #endif // __NILXFORM_H__