USSubSystemDPC.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // 下列 ifdef 块是创建使从 DLL 导出更简单的
  2. // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 WHEELDPC_EXPORTS
  3. // 符号编译的。在使用此 DLL 的
  4. // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
  5. // SYNCFPDDPC_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
  6. // 符号视为是被导出的。
  7. #ifndef USSUBSYSTEMDPC_EXPORTS
  8. #ifdef WIN_64BIT
  9. #ifdef _DEBUG
  10. #pragma comment(lib, "USSubSystemDPCX64D.lib")
  11. #else
  12. #pragma comment(lib, "USSubSystemDPCX64.lib")
  13. #endif
  14. #else
  15. #ifdef _DEBUG
  16. #pragma comment(lib, "USSubSystemDPCD.lib")
  17. #else
  18. #pragma comment(lib, "USSubSystemDPC.lib")
  19. #endif
  20. #endif
  21. #endif
  22. #ifdef USSUBSYSTEMDPC_EXPORTS
  23. #define USSUBSYSTEM_API __declspec(dllexport)
  24. #else
  25. #define USSUBSYSTEM_API __declspec(dllimport)
  26. #endif
  27. #include "DPC.h"
  28. extern "C" USSUBSYSTEM_API DPC* GetDPC();
  29. extern "C" USSUBSYSTEM_API void ReleaseDPC(DPC *p);
  30. class USSUBSYSTEM_API USSubSystemDPC : public DPC
  31. {
  32. std::string *m_pWorkpath;
  33. public:
  34. USSubSystemDPC(void);
  35. virtual ~USSubSystemDPC(void);
  36. virtual bool DpcEntry(ResDataObject &Configuration);
  37. virtual ResDataObject GetConnectionType();
  38. virtual bool Connect(ResDataObject &Connection);
  39. virtual bool Probe(ResDataObject &HardwareInfo);
  40. virtual bool SetWorkPath(const char *pWorkPath);
  41. virtual PVOID LoadLogicDevices();
  42. virtual void UnloadLogicDevices(PVOID p);
  43. virtual bool DisConnect();
  44. };