SubSystemDPC.h 2.5 KB

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