一、DLL 生成
#ifndef DllTest2_H_
#define DllTest2_H_
#ifdef MYLIBDLL
#define MYLIBDLL extern "C" _declspec(dllimport)
#else
#define MYLIBDLL extern "C" _declspec(dllexport)
#endif
MYLIBDLL int Add(int plus1, int plus2);
// you can also write like this:
// extern "C"{
// _declspec(dllexport) int Add(int plus1, int plus2)
//}
#endif
// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
BOOL APIENTRY DllMain( HMODULE hModule,