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.

49 lines
1.4 KiB

  1. /*****************************************************************************
  2. * ftpmi.h
  3. *****************************************************************************/
  4. #ifndef _FTPMALLOCITEM_H
  5. #define _FTPMALLOCITEM_H
  6. /*****************************************************************************
  7. *
  8. * CMallocItem
  9. *
  10. * Really nothing doing.
  11. *
  12. *****************************************************************************/
  13. class CMallocItem : public IMalloc
  14. {
  15. public:
  16. //////////////////////////////////////////////////////
  17. // Public Interfaces
  18. //////////////////////////////////////////////////////
  19. // *** IUnknown ***
  20. virtual STDMETHODIMP_(ULONG) AddRef(void);
  21. virtual STDMETHODIMP_(ULONG) Release(void);
  22. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  23. // *** IMalloc ***
  24. virtual STDMETHODIMP_(LPVOID) Alloc(ULONG cb);
  25. virtual STDMETHODIMP_(LPVOID) Realloc(LPVOID pv, ULONG cb);
  26. virtual STDMETHODIMP_(void) Free(LPVOID pv);
  27. virtual STDMETHODIMP_(ULONG) GetSize(LPVOID pv);
  28. virtual STDMETHODIMP_(int) DidAlloc(LPVOID pv);
  29. virtual STDMETHODIMP_(void) HeapMinimize();
  30. public:
  31. CMallocItem();
  32. ~CMallocItem(void);
  33. // Friend Functions
  34. friend HRESULT CMallocItem_Create(IMalloc ** ppm);
  35. protected:
  36. int m_cRef;
  37. };
  38. #endif // _FTPMALLOCITEM_H