Delphi中的DLL调用中的参数传递问题
在Delphi中的DLL调用中的参数传递问题
用VC编的DLL中,有一个函数,其原形为:
dial(int handle, const char *phone)
请问在Delphi中如何传递参数?谢谢
问题点数:20、回复次数:5Top
1 楼hjd_cw()回复于 2002-07-19 12:20:46 得分 5
funciton dial(handle : int;phone : pchar):long cdecl;external 'dll.dll' name'dial'Top
2 楼genphone_ru(哎,什么都要学,真累)回复于 2002-07-19 12:21:31 得分 5
procedure dial(iHandle: Integer; phone:pChar);stdcall external '123.dll';
Top
3 楼hjd_cw()回复于 2002-07-19 12:21:41 得分 0
更正:
funciton dial(handle : int;phone : pchar):long;cdecl;external 'dll.dll' name 'dial';
Top
4 楼genphone_ru(哎,什么都要学,真累)回复于 2002-07-19 12:22:18 得分 0
procedure dial(iHandle: Integer; phone:pChar);stdcall external '123.dll';
Top
5 楼happyjoe(尘土飞扬)回复于 2002-07-19 12:22:26 得分 10
var
AHandle: HWND;
PhoneString: string;
begin
PhoneString := '867561234567';
AHandle := Self.Handle;
dial(AHandle, PChar(PhoneString));
end;Top




