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.

96 lines
3.0 KiB

  1. // txfac.h -- Header file for this transform
  2. #ifndef __TXFAC_H__
  3. #define __TXFAC_H__
  4. class CLZX_TransformFactory : public CITUnknown
  5. {
  6. public:
  7. // Main Object Destructor.
  8. ~CLZX_TransformFactory(void);
  9. // Creator:
  10. static STDMETHODIMP Create(IUnknown *punkOuter, REFIID riid, PVOID *ppv);
  11. private:
  12. // Main Object Constructor
  13. CLZX_TransformFactory(IUnknown* pUnkOuter);
  14. // We declare nested class interface implementations here.
  15. // We implement the IClassFactory interface (ofcourse) in this class
  16. // factory COM object class.
  17. class CImpITransformFactory : public IITTransformFactory
  18. {
  19. public:
  20. // Interface Implementation Constructor & Destructor.
  21. CImpITransformFactory(CLZX_TransformFactory* pBackObj,
  22. IUnknown* pUnkOuter);
  23. ~CImpITransformFactory(void);
  24. STDMETHODIMP Init();
  25. // ITransformFactory methods.
  26. HRESULT STDMETHODCALLTYPE DefaultControlData(XformControlData **ppXFCD);
  27. HRESULT STDMETHODCALLTYPE CreateTransformInstance
  28. (ITransformInstance *pTxInstMedium, // Container data span for transformed data
  29. ULARGE_INTEGER cbUntransformedSize, // Untransformed size of data
  30. PXformControlData pXFCD, // Control data for this instance
  31. const CLSID *rclsidXForm, // Transform Class ID
  32. const WCHAR *pwszDataSpaceName, // Data space name for this instance
  33. ITransformServices *pXformServices, // Utility routines
  34. IKeyInstance *pKeyManager, // Interface to get enciphering keys
  35. ITransformInstance **ppTransformInstance // Out: Instance transform interface
  36. ) ;
  37. private:
  38. // Data private to this interface implementation of IClassFactory.
  39. CLZX_TransformFactory* m_pBackObj; // Parent Object back pointer.
  40. IUnknown* m_pUnkOuter; // Outer unknown for Delegation.
  41. UINT m_uiMulResetFactor;
  42. };
  43. // Make the otherwise private and nested IClassFactory interface
  44. // implementation a friend to COM object instantiations of this
  45. // selfsame CFCar COM object class.
  46. friend CImpITransformFactory;
  47. // Private data of CFCar COM objects.
  48. // Nested IClassFactory implementation instantiation.
  49. CImpITransformFactory m_ImpITXFactory;
  50. };
  51. typedef CLZX_TransformFactory* PCLZX_TransformFactory;
  52. inline CLZX_TransformFactory::CLZX_TransformFactory(IUnknown* pUnkOuter)
  53. : m_ImpITXFactory(this, pUnkOuter),
  54. CITUnknown(&IID_ITransformFactory, 1, &m_ImpITXFactory)
  55. {
  56. }
  57. inline CLZX_TransformFactory::~CLZX_TransformFactory()
  58. {
  59. }
  60. inline CLZX_TransformFactory::CImpITransformFactory::CImpITransformFactory
  61. (CLZX_TransformFactory* pBackObj,IUnknown* pUnkOuter)
  62. : IITTransformFactory(pBackObj, pUnkOuter)
  63. {
  64. }
  65. inline CLZX_TransformFactory::CImpITransformFactory::~CImpITransformFactory(void)
  66. {
  67. }
  68. inline STDMETHODIMP CLZX_TransformFactory::CImpITransformFactory::Init()
  69. {
  70. return NO_ERROR;
  71. }
  72. #endif // __TXFAC_H__