CodeAcqDPC.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #pragma once
  2. // 下列 ifdef 块是创建使从 DLL 导出更简单的
  3. // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 CODEACQDPC_EXPORTS
  4. // 符号编译的。在使用此 DLL 的
  5. // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
  6. // CODEACQDPC_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
  7. // 符号视为是被导出的。
  8. #ifndef CODEACQDPC_EXPORTS
  9. #ifdef _WIN64
  10. #ifdef _DEBUG
  11. #pragma comment(lib, "CodeAcqDPCX64D.lib")
  12. #else
  13. #pragma comment(lib, "CodeAcqDPCX64.lib")
  14. #endif
  15. #else
  16. #ifdef _DEBUG
  17. #pragma comment(lib, "CodeAcqDPCD.lib")
  18. #else
  19. #pragma comment(lib, "CodeAcqDPC.lib")
  20. #endif
  21. #endif
  22. #endif
  23. #include "LogicDriver.h"
  24. #ifdef CODEACQDPC_EXPORTS
  25. #define CODEACQDPC_API __declspec(dllexport)
  26. #define CODEACQDPC_C_API extern "C" __declspec(dllexport)
  27. #else
  28. #define CODEACQDPC_API __declspec(dllimport)
  29. #define CODEACQDPC_C_API extern "C" __declspec(dllimport)
  30. #endif
  31. CODEACQDPC_C_API DriverDPC* GetDriverDPC();
  32. CODEACQDPC_C_API void ReleaseDriverDPC(DriverDPC *p);
  33. class CODEACQDPC_API CodeAcqDPC : public LogicDriver
  34. {
  35. std::string *m_pWorkpath;
  36. public:
  37. CodeAcqDPC(void);
  38. virtual ~CodeAcqDPC(void);
  39. virtual bool DriverEntry(ResDataObject &Configuration);
  40. virtual bool Driver_Probe(ResDataObject &HardwareInfo);
  41. virtual bool SYSTEM_CALL SetDriverWorkPath(const char * PARAM_IN pWorkPath);
  42. virtual PVOID SYSTEM_CALL LoadDriver();//无根节点
  43. virtual void SYSTEM_CALL UnloadDriver();
  44. virtual DWORD SYSTEM_CALL OnNotify(HANDLE evtList[], DWORD count);
  45. virtual bool SYSTEM_CALL SetDeviceWorkPath(const char * PARAM_IN pWorkPath);
  46. //逻辑设备树的加载和卸载
  47. virtual PVOID SYSTEM_CALL LoadLogicDevices();
  48. virtual void SYSTEM_CALL UnloadLogicDevices();
  49. virtual bool Device_Probe(ResDataObject &HardwareInfo);
  50. };