delphi调用DLL,提示“无法定位程序输入点opencommport于动态链接库js168comm.dll上”

来源:百度知道 编辑:UC知道 时间:2024/06/18 07:05:32
delphi调用DLL,提示“无法定位程序输入点opencommport于动态链接库js168comm.dll上”
以下是源码:

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
btn_1: TButton;
lbl_1: TLabel;
cbb_1: TComboBox;
lbl_2: TLabel;
cbb_2: TComboBox;
procedure btn_1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}
function opencommport(BaudRate:DWord;PortNum:PChar):Integer;stdcall;external 'js168Comm.dll'
procedure CloseCommPort(hCOM:integer);stdcall;external 'js168Comm.dll'

procedure TForm1.btn_1Click(Sender: TObject);
var
h:Integer;
begin
opencommport(38400,'com1');
{ h:=opencommpo

js168comm.dll没有提供名为opencommport的函数,把函数名改为OpenCommPort试下。

看起来没问题啊。不知道你那为什么报错 。。你提供的这个下载地址,下载不了