摘要: 一:创建C++ DLL类库,名称:Dll11.Dll.h_declspec(dllimport) int add(int a, int b); 2.Dll.cpp// Dll.cpp : 定义 DLL 应用程序的导出函数。//#include "stdafx.h"#include//#include"Dll.h"using namespace std;extern "C" _declspec(dllexport) int add(int a, int b){ return (a+b);} 二:C++启动项目win32项目,名称:Dyn 阅读全文
posted @ 2013-11-17 22:32 nanyangzp 阅读(563) 评论(0) 推荐(0)
摘要: 一:创建C++ DLL类库,名称:Dll11.Dll1.h/*#ifndef Dll_API#else#define Dll_API _declspec(dllimport)#endif*/#include "stdafx.h"class _declspec(dllexport) Point{public: int output(int x,int y);}; 2.Dll1.cpp// Dll1.cpp : 定义 DLL 应用程序的导出函数。//#include "stdafx.h"#include"Dll1.h"#include & 阅读全文
posted @ 2013-11-17 22:07 nanyangzp 阅读(573) 评论(0) 推荐(0)
摘要: 我用vs2008建的C++ dll类库,名字test_interopVC,和C#的CeshiVC项目一:C++项目dll类库:1.test_interopVC.h,主要简单的测试,所以就在一个类里直接定义了一个常量a=9;#pragma onceusing namespace System;using namespace System::Runtime::InteropServices;#include#includenamespace test_interopVC{ public ref class VcClass { public: static const int a=9; }... 阅读全文
posted @ 2013-11-17 22:04 nanyangzp 阅读(225) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2013-11-17 21:30 nanyangzp 阅读(34) 评论(0) 推荐(0)