N
ntbbc
Unregistered / Unconfirmed
GUEST, unregistred user!
一个动态联接库(wek.dll)提供了一下调用方法:
HRESULT _stdcall Login([in] long Id, [in] BSTR Passwd, [out, retval] long * Value );
请问如何在delphi中调用?
作如下调用时提示无法定位程序输入点lonin于动态联接库wek.dll上,那位高手能解决?200分相送!
unit unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Label2: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
function login(const OperatorId:longint;const OperatorPasswd:string;out i:Iunknown):HRESULT;stdcall;
var
Form1: TForm1;
implementation
function login ;External 'TwPageOp.dll' name 'login';
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var
OperatorId:longint;
OperatorPasswd:string;
i:Iunknown;
begin
OperatorId:=90;
OperatorPasswd:='9d';
if login(90,'',Iunknown(i))=s_ok then
begin
Label2.Caption :='ok';
end;
end;
end.
HRESULT _stdcall Login([in] long Id, [in] BSTR Passwd, [out, retval] long * Value );
请问如何在delphi中调用?
作如下调用时提示无法定位程序输入点lonin于动态联接库wek.dll上,那位高手能解决?200分相送!
unit unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Label2: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
function login(const OperatorId:longint;const OperatorPasswd:string;out i:Iunknown):HRESULT;stdcall;
var
Form1: TForm1;
implementation
function login ;External 'TwPageOp.dll' name 'login';
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var
OperatorId:longint;
OperatorPasswd:string;
i:Iunknown;
begin
OperatorId:=90;
OperatorPasswd:='9d';
if login(90,'',Iunknown(i))=s_ok then
begin
Label2.Caption :='ok';
end;
end;
end.