AbstractAcqExDPC.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. // 下列 ifdef 块是创建使从 DLL 导出更简单的
  2. // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 WHEELDPC_EXPORTS
  3. // 符号编译的。在使用此 DLL 的
  4. // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
  5. // SYNCFPDDPC_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
  6. // 符号视为是被导出的。
  7. #ifndef ABSTRACTACQDPC_EXPORTS
  8. #ifdef _WIN64
  9. #ifdef _DEBUG
  10. #pragma comment(lib, "AbstractAcqDPCX64D.lib")
  11. #else
  12. #pragma comment(lib, "AbstractAcqDPCX64.lib")
  13. #endif
  14. #else
  15. #ifdef _DEBUG
  16. #pragma comment(lib, "AbstractAcqDPCD.lib")
  17. #else
  18. #pragma comment(lib, "AbstractAcqDPC.lib")
  19. #endif
  20. #endif
  21. #endif
  22. #ifdef ABSTRACTACQDPC_EXPORTS
  23. #define ABSTRACTACQDPC_API __declspec(dllexport)
  24. #else
  25. #define ABSTRACTACQDPC_API __declspec(dllimport)
  26. #endif
  27. //#include "DPC.h"
  28. //
  29. //extern "C" ABSTRACTACQDPC_API DPC* GetDPC();
  30. //extern "C" ABSTRACTACQDPC_API void ReleaseDPC(DPC *p);
  31. //
  32. //class ABSTRACTACQDPC_API AbstractAcqDPC : public DPC
  33. //{
  34. // std::string *m_pWorkpath;
  35. //public:
  36. // AbstractAcqDPC(void);
  37. // virtual ~AbstractAcqDPC(void);
  38. //
  39. // virtual bool DpcEntry(ResDataObject &Configuration);
  40. //
  41. // virtual ResDataObject GetConnectionType();
  42. //
  43. // virtual bool Connect(ResDataObject &Connection);
  44. //
  45. // virtual bool Probe(ResDataObject &HardwareInfo);
  46. //
  47. // virtual bool SetWorkPath(const char *pWorkPath);
  48. //
  49. // virtual PVOID LoadLogicDevices();
  50. //
  51. // virtual void UnloadLogicDevices(PVOID p);
  52. //
  53. // virtual bool DisConnect();
  54. // void LogInfo(string str);
  55. //};
  56. #include "LogicDriver.h"
  57. class ABSTRACTACQDPC_API AbstractAcqDPC : public LogicDriver
  58. {
  59. std::string *m_pWorkpath;
  60. public:
  61. AbstractAcqDPC(void);
  62. virtual ~AbstractAcqDPC(void);
  63. virtual bool DriverEntry(ResDataObject &Configuration);
  64. virtual bool SYSTEM_CALL Driver_Probe(ResDataObject& PARAM_OUT HardwareInfo);
  65. virtual bool SetDriverWorkPath(const char *pWorkPath);
  66. virtual PVOID SYSTEM_CALL LoadDriver();//无根节点
  67. virtual void SYSTEM_CALL UnloadDriver();
  68. //actions
  69. virtual bool Connect();
  70. virtual void DisConnect();
  71. //virtual bool SYSTEM_CALL GetDeviceType(GUID &DevType);
  72. virtual bool SYSTEM_CALL Device_Probe(ResDataObject& PARAM_OUT HardwareInfo);
  73. virtual bool SYSTEM_CALL SetDeviceWorkPath(const char * PARAM_IN pWorkPath);
  74. virtual PVOID LoadLogicDevices();
  75. virtual void UnloadLogicDevices();
  76. virtual DWORD SYSTEM_CALL OnNotify(HANDLE evtList[], DWORD count);
  77. RET_STATUS SYSTEM_CALL GetDriverDictionary(ResDataObject& PARAM_OUT DriverInfo);
  78. private:
  79. void *pObj;
  80. };
  81. extern "C" ABSTRACTACQDPC_API DriverDPC* GetDriverDPC();
  82. extern "C" ABSTRACTACQDPC_API void ReleaseDriverDPC(DriverDPC *p);