拿VC写了一个DLL,里面有一个函数是void disable(),那用delphi调用这个函数,应该用什么来声明?我如下写了,结果报错:
procedure disable():void;stdcall;
external 'VC_UPhone.dll';procedure TForm1.Button3Click(Sender: TObject);
begin
disable();
end;[Error] disable.pas(36): Identifier redeclared: 'disable'
[Error] disable.pas(51): '.' expected but '(' found
[Fatal Error] disabel.dpr(5): Could not compile used unit 'disable.pas'请高手指教,谢谢。
procedure disable():void;stdcall;
external 'VC_UPhone.dll';procedure TForm1.Button3Click(Sender: TObject);
begin
disable();
end;[Error] disable.pas(36): Identifier redeclared: 'disable'
[Error] disable.pas(51): '.' expected but '(' found
[Fatal Error] disabel.dpr(5): Could not compile used unit 'disable.pas'请高手指教,谢谢。
把这个去掉.
procedure后什么都不要.
external 'VC_UPhone.dll';这样写,现在行了,刚才不知道程序出了什么问题所以不行