API 找不到dll入口点

hq0927 2009-04-28 04:56:12
  在演示程序中把dll文件声明于implementation中下面
function Rcard(rdata:pchar;track:integer):integer;stdcall;external'JINCARD7.dll';
function Wcard(wdata:pchar;track:integer):integer;stdcall;external'JINCARD7.dll';

//主程序 :

if 1 = Init_com('1,9600,n,8,1') then //初始化端口成功
begin
if 1 = Rcard(rdata,5) then //调用库中的读函数,读二,三磁道,若成功则
begin
i:=pos ('a',rdata);
strlcopy(str2,rdata,i-1); //拷贝磁道二中的内容于str2中
strcopy(str3,rdata+i); //拷贝磁道三中的内容于str3中
ShowMessage('读卡成功!'); //显示读卡成功对话框
end;
wdata:= '2222222222a333333333';
if 1 = Wcard(wdata,5) then //调用库中的写函数进行写二,三磁道,若成功则
begin
ShowMessage('写卡成功!'); //显示写卡成功对话框
end;
end;




现在我要写成vb代码.

模块

Public Declare Function Rcard Lib "JINCARD7.DLL" (ByVal radata As String, ByVal track As Integer) As Integer
Public Declare Function Wcard Lib "JINCARD7.DLL" (ByVal radata As String, ByVal track As Integer) As Integer
Public Declare Function Init_com Lib "CARD.DLL" (ByVal sett As String) As Integer


form1

If 1 = Init_com("1,9600,n,8,1") Then
MsgBox "test"
End If
...全文
165 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
清晨曦月 2009-05-06
  • 打赏
  • 举报
回复
楼主还真认真啊!!!!老马还是很活跃啊
舉杯邀明月 2009-04-29
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 myjian 的回复:]
...............................
[/Quote]


嗷嗷叫的老马 2009-04-28
  • 打赏
  • 举报
回复
...............................
hq0927 2009-04-28
  • 打赏
  • 举报
回复
哦哦...

谢谢楼上的提醒了..



原来引用错了dll


给分给分..
嗷嗷叫的老马 2009-04-28
  • 打赏
  • 举报
回复
Init_com在CARD.DLL中确认有?

DLL及DLL所需要的组件确认存在与正确?

1,485

社区成员

发帖
与我相关
我的任务
社区描述
VB API
社区管理员
  • API
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧