www.gusucode.com > VC++中的dll动态链接库应用实例源码-源码程序 > VC++中的dll动态链接库应用实例源码-源码程序/code/DLL/Dll1/Dll1.cpp
#define DLL1_API extern "C" _declspec(dllexport) #include "Dll1.h" #include <Windows.h> #include <stdio.h> // Download by http://www.NewXing.com int _stdcall add(int a,int b) { return a+b; } int _stdcall subtract(int a,int b) { return a-b; } /*void Point::output(int x,int y) { HWND hwnd=GetForegroundWindow(); HDC hdc=GetDC(hwnd); char buf[20]; memset(buf,0,20); sprintf(buf,"x=%d,y=%d",x,y); TextOut(hdc,0,0,buf,strlen(buf)); ReleaseDC(hwnd,hdc); } void Point::test() { }*/