特简单的程序,只是为了连接。
C部分:extern "C" __declspec(dllexport) short __stdcall aaa(short a,short b);
short __stdcall aaa(short a,short b)
{
short c=a+b;
return c;
}
并且在*.def 中写到:LIBRARY add
EXPORTS aaa
VB部分:Option Explicit
Private Declare Function aaa Lib "F:\dll\add\Debug\add.dll" (ByVal a As Integer, ByVal b As Integer) As Integer
Dim a As Integer, b As Integer, c As Integer Private Sub Command1_Click()
a = Text1.Text
b = Text2.Text
c = aaa(a, b)
Text3.Text = c
End Sub 但总是连接不上,显示错误453 找不到dll入口点 aaa in add.dll
望哪位好心人帮忙看看错在哪里?
C部分:extern "C" __declspec(dllexport) short __stdcall aaa(short a,short b);
short __stdcall aaa(short a,short b)
{
short c=a+b;
return c;
}
并且在*.def 中写到:LIBRARY add
EXPORTS aaa
VB部分:Option Explicit
Private Declare Function aaa Lib "F:\dll\add\Debug\add.dll" (ByVal a As Integer, ByVal b As Integer) As Integer
Dim a As Integer, b As Integer, c As Integer Private Sub Command1_Click()
a = Text1.Text
b = Text2.Text
c = aaa(a, b)
Text3.Text = c
End Sub 但总是连接不上,显示错误453 找不到dll入口点 aaa in add.dll
望哪位好心人帮忙看看错在哪里?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货