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.

45 lines
1.6 KiB

  1. // WiaDataCallback.h: interface for the CWiaDataCallback class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_WIADATACALLBACK_H__5125F8A0_29CF_4E4D_9D39_53DF7C29BD88__INCLUDED_)
  5. #define AFX_WIADATACALLBACK_H__5125F8A0_29CF_4E4D_9D39_53DF7C29BD88__INCLUDED_
  6. #include "WiaAcquireDlg.h" // Added by ClassView
  7. #if _MSC_VER > 1000
  8. #pragma once
  9. #endif // _MSC_VER > 1000
  10. #define MEMORY_BLOCK_FACTOR 2
  11. class CWiaDataCallback : public IWiaDataCallback
  12. {
  13. public:
  14. BOOL IsBITMAPDATA();
  15. BYTE* GetCallbackMemoryPtr(LONG *plDataSize);
  16. void SetBufferSizeRequest(LONG lBufferSize);
  17. void SetDialog(CWiaAcquireDlg *pAcquireDlg);
  18. CWiaAcquireDlg *m_pAcquireDlg;
  19. CWiaDataCallback();
  20. virtual ~CWiaDataCallback();
  21. // IUnknown members that delegate to m_pUnkRef.
  22. HRESULT _stdcall QueryInterface(const IID&,void**);
  23. ULONG _stdcall AddRef();
  24. ULONG _stdcall Release();
  25. HRESULT _stdcall Initialize(HWND hPreviewWnd = NULL);
  26. HRESULT _stdcall BandedDataCallback(LONG lMessage, LONG lStatus, LONG lPercentComplete,
  27. LONG lOffset, LONG lLength, LONG lReserved,
  28. LONG lResLength, BYTE* pbBuffer);
  29. private:
  30. void UpdateAcqusitionDialog(TCHAR *szMessage, LONG lPercentComplete);
  31. ULONG m_cRef; // Object reference count.
  32. PBYTE m_pBuffer; // complete data buffer
  33. LONG m_MemBlockSize;
  34. LONG m_BytesTransferred;
  35. long m_lPageCount;
  36. LONG m_lBufferSize;
  37. BOOL m_bBitmapData;
  38. BOOL m_bNewPageArrived;
  39. };
  40. #endif // !defined(AFX_WIADATACALLBACK_H__5125F8A0_29CF_4E4D_9D39_53DF7C29BD88__INCLUDED_)