#include "pch.h"
#include <iostream>
//system
#include <Windows.h>
//local
typedef int(*xj_TestAdd)(const int &a, const int &b); // 声明
typedef void(*xj_TestReadImage)(const std::string &imgPath, int &width, int &height);
HMODULE hm = LoadLibrary(L"xj.dll"); // 引用dll
int main()
{
if (hm != NULL)
{
int a = 11, b = 55;
xj_TestAdd xjAdd = (xj_TestAdd)GetProcAddress(hm, "xjTestAdd");
int sum = xjAdd(11, 55);
std::cout << a << " + " << b << " = " << sum << std::endl << std::endl;
std::string path = "F:/test.jpg";
int width = -3, height = -3;
xj_TestReadImage xjReadImage = (xj_TestReadImage)GetProcAddress(hm, "xjTestReadImage");
xjReadImage(path, width, height);
std::cout << "width = " << width << ", height = " << height << std::endl << std::endl;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
VS2017 C++ 生成dll并调用
共70个文件
tlog:14个
ipch:10个
cpp:5个
1星 需积分: 50 120 下载量 40 浏览量
2020-04-17
21:21:39
上传
评论 4
收藏 58.2MB RAR 举报
温馨提示
通过VS2017,生成dll项目,生成dll,并在另外程序中调用dll。....................
资源推荐
资源详情
资源评论
收起资源包目录
xj_xjTest.rar (70个子文件)
xj_xjTest
xjTest
xjTest.sln 1KB
xjTest
xjTest.vcxproj.user 165B
pch.cpp 200B
xjTest.vcxproj 8KB
xjTest.vcxproj.filters 1KB
pch.h 639B
x64
Release
xjTest.log 333B
vc141.pdb 404KB
xjTest.obj 969KB
xjTest.tlog
xjTest.write.1u.tlog 834B
CL.write.1.tlog 516B
link.command.1.tlog 1KB
xjTest.lastbuildstate 185B
CL.read.1.tlog 28KB
CL.command.1.tlog 1KB
link.write.1.tlog 296B
link.read.1.tlog 3KB
xjTest.Build.CppClean.log 717B
xjTest.pch 1.94MB
pch.obj 3KB
xjTest.cpp 818B
.vs
xjTest
v15
ipch
e745f5b49540a9ad.ipch 320KB
3f85a1c2ea42a3c0.ipch 320KB
97c03bdfafad63e0.ipch 320KB
.suo 28KB
Browse.VC.db 33.84MB
x64
Release
xjTest.exe 16KB
xj.dll 23KB
xjTest.ipdb 39KB
xjTest.iobj 121KB
xjTest.pdb 716KB
xj
xj.sln 1KB
.vs
xj
v15
ipch
42c1ff85ff047067.ipch 21.81MB
1b74c95dfdb3da52.ipch 21.94MB
AutoPCH
8fdd248fd69bff4b
STDAFX.ipch 21.94MB
7e9fa208fb10e498
STDAFX.ipch 21.94MB
9fdb22ab2d5acdab
XJ.ipch 93.63MB
ed7df32756a3644e
DLLMAIN.ipch 21.94MB
2f9005ebd5ef03a7.ipch 21.81MB
.suo 35KB
Browse.VC.db 41.59MB
xj
dllmain.cpp 448B
stdafx.h 374B
xj.vcxproj.user 165B
stdafx.cpp 19B
xj.vcxproj 8KB
xj.h 303B
targetver.h 296B
xj.vcxproj.filters 1KB
xj.cpp 246B
x64
Release
xj.log 315B
xj.Build.CppClean.log 617B
xj.tlog
CL.write.1.tlog 802B
link.command.1.tlog 1KB
CL.read.1.tlog 52KB
xj.write.1u.tlog 258B
CL.command.1.tlog 2KB
link.write.1.tlog 296B
xj.lastbuildstate 181B
link.read.1.tlog 3KB
vc141.pdb 1.79MB
xj.obj 3.56MB
stdafx.obj 55KB
dllmain.obj 55KB
x64
Release
xj.exp 746B
xj.dll 23KB
xj.pdb 1.82MB
xj.lib 2KB
xj.ipdb 132KB
xj.iobj 387KB
共 70 条
- 1
资源评论
- weixin_410092452022-04-14缺文件,调不了。
- hymaliang11202021-11-18调用不起来
累了就要打游戏
- 粉丝: 1493
- 资源: 39
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功