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.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
//////////////////////////////////////////////////////////////////////////////
//文件: dfPluginDLL.h
//主要功能:
// 双狐格式读写插件标准接口文件头定义,该定义不能更改
//
//程序编写: 2009-4-16
//
//
/////////////////////////////////////////////////////////////////////////////
# if !defined ( __DF_PLUGIN_FORMAT_DLL_H__ )
# define __DF_PLUGIN_FORMAT_DLL_H__
# include <windows.h>
# include "dfPluginBase.h"
# define DF_PLUGIN_API __declspec( dllexport )
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//在插件中如果不使用资源设置时可调用以下宏定义
# define DF_DEFINE_PLUGIN_DLLMAIN() \
\
BOOL APIENTRY DllMain( HANDLE a_hModule, \
DWORD a_dwReason, \
LPVOID a_lpReserved ) \
{ \
switch( a_dwReason ) \
{ \
case DLL_PROCESS_ATTACH: \
case DLL_THREAD_ATTACH: \
case DLL_THREAD_DETACH: \
case DLL_PROCESS_DETACH: \
break; \
} \
return TRUE; \
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//插件接口开始
//设置插件接口, 需要从类CPluginFormatBase派生一个类后定义一个对象将其指针赋值给下面的变量
extern CPluginFormatBase * m_pPluginFormatBase ;
//定义导出函数
# define DF_DEFINE_PLUGIN_EXPORTS() \
\
extern "C" DF_PLUGIN_API CPluginFormatBase* DF_GET_PLUGIN_FORMAT_CODE( void ); \
//获得插件的接口类指针
# define DF_IMPLEMENT_GET_PLUGIN_FORMAT_CODE() \
\
DF_PLUGIN_API CPluginFormatBase* DF_GET_PLUGIN_FORMAT_CODE( void ) \
{ \
return m_pPluginFormatBase; \
}
//插件接口结束
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
# endif //__DF_PLUGIN_FORMAT_DLL_H__