You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
661 B
C
25 lines
661 B
C
#ifndef SERIALPORTTOOL_GLOBAL_H
|
|
#define SERIALPORTTOOL_GLOBAL_H
|
|
|
|
#include <QtCore/qglobal.h>
|
|
#include "BaseSerialport.h"
|
|
#ifdef SERIALPORTTOOL_LIB
|
|
# define SERIALPORT_EXPORT Q_DECL_EXPORT
|
|
#else
|
|
# define SERIALPORT_EXPORT Q_DECL_IMPORT
|
|
#endif
|
|
|
|
extern "C" SERIALPORT_EXPORT ISerialPortTool* SerialPortCreate();
|
|
extern "C" SERIALPORT_EXPORT void SerialPortDelete(ISerialPortTool* pCtrl);
|
|
typedef ISerialPortTool* (*_SerialPortCreate)();
|
|
|
|
#endif // SERIALPORTTOOL_GLOBAL_H
|
|
/*
|
|
使用方法:
|
|
添加global头文件
|
|
|
|
QLibrary lib("SerialPortTool");//库文件名
|
|
_SerialPortCreate func = (_SerialPortCreate)lib.resolve("SerialPortCreate");
|
|
ISerialPortTool m_pUserCtrl = func();
|
|
*/
|