dll导出函数
来源:互联网 发布:图片合成软件代码 编辑:程序博客网 时间:2024/06/06 03:57
</pre><pre name="code" class="cpp">#pragma once#include "stdafx.h"#ifdef API_EXPORT#define DLL_EXPORT extern "C" __declspec(dllexport)#define DLL_EXPORT_CLASS __declspec(dllexport)#else#define DLL_EXPORT extern "C" __declspec(dllimport)#define DLL_EXPORT_CLASS __declspec(dllimport)#endif//声明该方法为导出dll接口DLL_EXPORT int Add(int a, int b);DLL_EXPORT int Sub(int a, int b);class DLL_EXPORT_CLASS CMath//声明这个类为导出的类在导出C++的类的时候不能用extern "C" 要去掉{public:int Add(int a, int b);int Sub(int a, int b);};#include "StdAfx.h"#define API_EXPORT //在include头文件之前定义#include "Math.h"int Add(int a, int b){return (a + b);}int Sub(int a, int b){return (a - b);}int CMath::Add(int a, int b){return (a + b);}int CMath::Sub(int a, int b){return (a - b);}
0 0
- vs2008 dll 导出函数
- dll导出函数
- vs2008 dll 导出函数
- 导出 DLL 函数
- C++ DLL导出函数
- DLL导出函数
- dll lib 导出函数
- DLL如何导出函数
- VC DLL导出函数
- VC++ DLL 导出函数
- DLL函数导出类型
- Dll 导出函数
- DLL导出函数名
- DLL--导出函数
- dll导出函数
- DLL导出函数
- dll 导出函数
- DLL导出函数示例
- 第六周上机实践项目-武器类
- java 程序性能调优(总结一:概述)
- 指针
- 整型与字符型转换
- FlashFXP破解版下载
- dll导出函数
- springmvc bean初始化
- C语言中内存以及堆栈情况
- eclipse 简介
- Android 自定义控件的属性
- WKWebView的简单介绍
- Nginx负载均衡配置实例详解
- 数据库误删除恢复
- 重要类