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.

68 lines
2.3 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORP., 1999
  4. *
  5. * TITLE: fstidev.h
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: ByronC
  10. *
  11. * DATE: 7 Dec, 1999
  12. *
  13. * DESCRIPTION:
  14. * Header for fake StiDevice implementation which gets handed down to WIA
  15. * driver.
  16. *
  17. *******************************************************************************/
  18. class FakeStiDevice : public IStiDevice
  19. {
  20. public:
  21. FakeStiDevice();
  22. FakeStiDevice(BSTR bstrDeviceName, IStiDevice **ppStiDevice);
  23. ~FakeStiDevice();
  24. HRESULT Init(ACTIVE_DEVICE *pDevice);
  25. HRESULT Init(BSTR bstrDeviceName);
  26. /*** IUnknown methods ***/
  27. HRESULT _stdcall QueryInterface(const IID& iid, void** ppv);
  28. ULONG _stdcall AddRef(void);
  29. ULONG _stdcall Release(void);
  30. /*** IStiDevice methods ***/
  31. HRESULT _stdcall Initialize(HINSTANCE hinst,LPCWSTR pwszDeviceName,DWORD dwVersion,DWORD dwMode);
  32. HRESULT _stdcall GetCapabilities( PSTI_DEV_CAPS pDevCaps);
  33. HRESULT _stdcall GetStatus( PSTI_DEVICE_STATUS pDevStatus);
  34. HRESULT _stdcall DeviceReset( );
  35. HRESULT _stdcall Diagnostic( LPSTI_DIAG pBuffer);
  36. HRESULT _stdcall Escape( STI_RAW_CONTROL_CODE EscapeFunction,LPVOID lpInData,DWORD cbInDataSize,LPVOID pOutData,DWORD dwOutDataSize,LPDWORD pdwActualData) ;
  37. HRESULT _stdcall GetLastError( LPDWORD pdwLastDeviceError);
  38. HRESULT _stdcall LockDevice( DWORD dwTimeOut);
  39. HRESULT _stdcall UnLockDevice( );
  40. HRESULT _stdcall RawReadData( LPVOID lpBuffer,LPDWORD lpdwNumberOfBytes,LPOVERLAPPED lpOverlapped);
  41. HRESULT _stdcall RawWriteData( LPVOID lpBuffer,DWORD nNumberOfBytes,LPOVERLAPPED lpOverlapped);
  42. HRESULT _stdcall RawReadCommand( LPVOID lpBuffer,LPDWORD lpdwNumberOfBytes,LPOVERLAPPED lpOverlapped);
  43. HRESULT _stdcall RawWriteCommand( LPVOID lpBuffer,DWORD nNumberOfBytes,LPOVERLAPPED lpOverlapped);
  44. HRESULT _stdcall Subscribe( LPSTISUBSCRIBE lpSubsribe);
  45. HRESULT _stdcall GetLastNotificationData(LPSTINOTIFY lpNotify);
  46. HRESULT _stdcall UnSubscribe( );
  47. HRESULT _stdcall GetLastErrorInfo( STI_ERROR_INFO *pLastErrorInfo);
  48. private:
  49. LONG m_cRef; // Ref count
  50. ACTIVE_DEVICE *m_pDevice; // Pointer to ACTIVE_DEVICE node
  51. };