Code
//DllName.cpp 内容
#include <windows.h>
#include <stdio.h>
int m_Age =120;
int _stdcall getAge(void)
{
return m_Age;
}
void _stdcall SetAge(int age)
{
m_Age = age;
MessageBox(NULL,"修改成功!","AgeSample",NULL);
}
//DllName.def 内容
EXPORTS
getAge
SetAge
//Net 中DllImport 即可