1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #pragma once
- // 下列 ifdef 块是创建使从 DLL 导出更简单的
- // 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 APEXDRDETECTOR_EXPORTS
- // 符号编译的。在使用此 DLL 的
- // 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
- // APEXDRDETECTOR_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
- // 符号视为是被导出的。
- #ifndef APEXDRDETECTOR_EXPORTS
- #ifdef WIN_64BIT
- #ifdef _DEBUG
- #pragma comment(lib, "APEXDRDETECTORX64D.lib")
- #else
- #pragma comment(lib, "APEXDRDETECTORX64.lib")
- #endif
- #else
- #ifdef _DEBUG
- #pragma comment(lib, "APEXDRDETECTORD.lib")
- #else
- #pragma comment(lib, "APEXDRDETECTOR.lib")
- #endif
- #endif
- #endif
- #include <string>
- using namespace std;
- #include "DPC.h"
- #include "DiosThread.h"
- #include "TcpipSCF.h"
- #include "DiosPacket.h"
- #ifdef APEXDRDETECTOR_EXPORTS
- #define APEXDRDETECTOR_API __declspec(dllexport)
- #define APEXDRDETECTOR_C_API extern "C" __declspec(dllexport)
- #else
- #define APEXDRDETECTOR_API __declspec(dllimport)
- #define APEXDRDETECTOR_C_API extern "C" __declspec(dllimport)
- #endif
- APEXDRDETECTOR_C_API DPC* GetDPC();
- APEXDRDETECTOR_C_API void ReleaseDPC(DPC *p);
- class APEXDRDETECTOR_API ApexDrDetector : public DPC
- {
- PVOID m_pDetector;
- public:
- ApexDrDetector(void);
- virtual ~ApexDrDetector(void);
- virtual bool DpcEntry(ResDataObject &Configuration);
- virtual ResDataObject GetConnectionType();
- virtual bool Connect(ResDataObject &Connection);
- virtual bool Probe(ResDataObject &HardwareInfo);
- virtual bool SetWorkPath(const char *pWorkPath);
- virtual PVOID LoadLogicDevices();
- virtual void UnloadLogicDevices(PVOID p);
- virtual bool DisConnect();
- virtual bool OnNotify(HANDLE ExitNotify);
- };
|