VB调用C语言的dll时,出现"找不到DLL入口点"的错误.
1、Hello.c
#include <stdio.h>
int retIntValue()
{
return 1;
}
2、Hello.def
; Hello.def - defines the exports for Hello.dll
LIBRARY Hello
DESCRIPTION 'A C++ dll that can be called from VB'
EXPORTS
retIntValue
3、VB中的调用。
Private Declare Function retIntValue Lib "Hello.dll" Alias "HelloA" () As Integer
Private Sub Command1_Click()
MsgBox (retIntValue())
End Sub