游戏开发论坛

 找回密码
 立即注册
搜索
查看: 2314|回复: 2

??DLL?????? ?

[复制链接]

10

主题

24

帖子

24

积分

注册会员

Rank: 2

积分
24
发表于 2011-9-4 08:20:00 | 显示全部楼层 |阅读模式
??DLL?????? ?

??vc6.0???VC++????__cdecl??????
C??????
?????__cdecel ???????"_???"
?????__stdcall???????"_???@?????"
dll?????????
extern "C" int  __declspec(dllexport)   add(int x, int y);
????????? _add,???? add???????????
extern "C" int  __declspec(dllexport) __stdcall   add(int x, int y);
??????? _add@8??????
__stdcall????stdcall????????????????????????? ?

1

主题

3

帖子

7

积分

新手上路

Rank: 1

积分
7
发表于 2011-9-8 14:35:00 | 显示全部楼层

Re: ??DLL?????? ?

extern "C" int  __declspec(dllexport)   add(int x, int y);
??????add????????_add??
???????????
hModule=LoadLibrary("testC.dll");
pFunc func=GetProcAddress(hModule,"TestFunc");
TestFunc??testC.dll??_cdecl??????.?????_??

6

主题

74

帖子

230

积分

中级会员

Rank: 3Rank: 3

积分
230
发表于 2011-9-11 20:56:00 | 显示全部楼层

Re:??DLL?????? ?

???#pragma comment(linker,"/export:xxx")

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-11-22 13:26

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表