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.

54 lines
1.9 KiB

  1. #ifndef __IOBLOCK
  2. #define __IOBLOCK
  3. #include "ioblockdefs.h"
  4. #include "devscriptsite.h"
  5. #include "devprop.h"
  6. #include "devaction.h"
  7. #include "devctrl.h"
  8. #include "lasterr.h"
  9. class CIOBlock {
  10. public:
  11. CIOBlock();
  12. ~CIOBlock();
  13. void Initialize(PGSD_INFO pGSDInfo);
  14. HRESULT DebugDumpScannerSettings();
  15. HRESULT StartScriptEngine();
  16. HRESULT StopScriptEngine();
  17. HRESULT LoadScript();
  18. HRESULT ProcessScript();
  19. HRESULT InitializeProperties();
  20. // operations
  21. HRESULT ReadValue(LONG ValueID, PLONG plValue);
  22. HRESULT WriteValue(LONG ValueID, LONG lValue);
  23. HRESULT Scan(LONG lPhase, PBYTE pBuffer, LONG lLength, LONG *plReceived);
  24. BOOL GetEventStatus(PGSD_EVENT_INFO pGSDEventInfo);
  25. BOOL DeviceOnLine();
  26. HRESULT ResetDevice();
  27. HRESULT EventInterrupt(PGSD_EVENT_INFO pGSDEventInfo);
  28. SCANSETTINGS m_ScannerSettings; // scanner model settings
  29. private:
  30. // helpers
  31. LONG InsertINTIntoByteBuffer(PBYTE szDest, PBYTE szSrc, BYTE cPlaceHolder, INT iValueToInsert);
  32. LONG ExtractINTFromByteBuffer(PINT iDest, PBYTE szSrc, BYTE cTerminatorByte, INT iOffset);
  33. protected:
  34. TCHAR m_szFileName[255]; // main product line file name
  35. CDeviceScriptSite *m_pDeviceScriptSite; // scripting site
  36. CComObject<CDeviceProperty> *m_pDeviceProperty; // IDeviceProperty Interface
  37. CComObject<CDeviceAction> *m_pDeviceAction; // IDeviceAction Interface
  38. CComObject<CDeviceControl> *m_pDeviceControl; // IDeviceControl Interface
  39. CComObject<CLastError> *m_pLastError; // ILastError Interface
  40. IActiveScript *m_pActiveScript; // IActiveScript Interface
  41. IActiveScriptParse *m_pActiveScriptParser; // IActiveScriptParse Interface
  42. WCHAR *m_wszScriptText; // scriptlet
  43. };
  44. #endif