J
jacer
Unregistered / Unconfirmed
GUEST, unregistred user!
以下出自 Charlie Calvert 《DELPHI AND THE INTERNET》
function TMyFtp.GetCurrentDirectory: string;
var
Len: Integer;
S: string;
begin
Len := 0;
ftpGetCurrentDirectory(FFTPHandle, PChar(S), Len); << 这里
SetLength(S, Len);
ftpGetCurrentDirectory(FFTPHandle, PChar(S), Len);
Result := S;
end;
FFTPHandle:Pointer; 取InternetConnect的返回值。
可是编译通不过,错误:
Types of actual and formal var parameters must be identical
究竟错在哪?
function TMyFtp.GetCurrentDirectory: string;
var
Len: Integer;
S: string;
begin
Len := 0;
ftpGetCurrentDirectory(FFTPHandle, PChar(S), Len); << 这里
SetLength(S, Len);
ftpGetCurrentDirectory(FFTPHandle, PChar(S), Len);
Result := S;
end;
FFTPHandle:Pointer; 取InternetConnect的返回值。
可是编译通不过,错误:
Types of actual and formal var parameters must be identical
究竟错在哪?