Lo siento mucho pero es tal el cacao que tengo que me he equivocado de funcion.
Es esta:
Código Delphi
[-]
function getIPs: Tstrings;
type
TaPInAddr = array[0..10] of PInAddr;
PaPInAddr = ^TaPInAddr;
var
phe: PHostEnt;
pptr: PaPInAddr;
Buffer: array[0..63] of Char;
I: Integer;
GInitData: TWSAData;
begin
WSAStartup($101, GInitData);
Result := TstringList.Create;
Result.Clear;
GetHostName(Buffer, SizeOf(Buffer));
phe := GetHostByName(buffer);
if phe = nil then Exit;
pPtr := PaPInAddr(phe^.h_addr_list);
I := 0;
while pPtr^[i] <> nil do
begin
Result.Add(inet_ntoa(pptr^[i]^));
Inc(I);
end;
WSACleanup;
end;
Y es resultado de esta funcion es el que lo quiero pasar a una variable de String
Y supongo que seria asi:
Código Delphi
[-]
function Operaciones : string;
var
temp: TStrings;
begin
Result := 'GetIPs';
temp := TStringList.Create;
try
Result := temp.Text;
finally
temp.Free;
end;
end;`
Y la variable de String seria Operaciones???????
Es asi verdad??????
Perdonar por haber cometido tan gran error.
Y muchas gracias por vuestra ayuda.