Ver Mensaje Individual
  #3  
Antiguo 18-05-2006
Avatar de seoane
[seoane] seoane is offline
Miembro Premium
 
Registrado: feb 2004
Ubicación: A Coruña, España
Posts: 3.717
Reputación: 24
seoane Va por buen camino
Aunque la solucion de Sotrono me parece muy adecuada, puede que lo que tu necesites saber, por algun motivo, es el nombre del cliente de correo. Pues entonces podemos utilizar algo asi:

Código Delphi [-]
uses Registry;

function Correo: string;
var
  Cliente: String;
begin
  Result:= '';
  with TRegistry.Create do
  try
    RootKey:= HKEY_LOCAL_MACHINE;
    Cliente:= '';
    if OpenKey('\SOFTWARE\Clients\Mail' ,FALSE) then
    begin
      Cliente:= ReadString('');
      CloseKey;
    end;
    if OpenKey('\SOFTWARE\Clients\Mail\' + Cliente + '\shell\open\command' ,FALSE) then
    begin
      Result:= ReadString('');
      CloseKey;
    end;
  finally
    Free;
  end;
end;

Última edición por seoane fecha: 18-05-2006 a las 14:25:54.
Responder Con Cita