dll1.cpp

来自「dll获得ip dll获得ip dll获得ip dll获得ip dll获得ip」· C++ 代码 · 共 28 行

CPP
28
字号
#include "windows.h"
#include "stdio.h"

#define DLL1_API _declspec(dllexport)
#include "dll1.h"

int add(int a,int b)
{
	return a+b;
}
int 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()
{
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?