Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Proyecto SIF/Veri*Factu/Ley Antifraude > Envío de registros y sus respuestas
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #11  
Antiguo 07-02-2025
Avatar de DarkDudae
DarkDudae DarkDudae is offline
Miembro
 
Registrado: abr 2006
Posts: 177
Poder: 21
DarkDudae Va por buen camino
Nueva sugerencia para el componente:

Obtener fechas de caducidad de los certificados.

Para ello, bastaría con hacer una pequeña modificación en la función loadCertificados y en el tipo TCertificados.

Código Delphi [-]
function loadCertificados(aList, aFechas:TStringList):integer;
var
  hStore: HCERTSTORE;
  PrevContext, CurContext: PCERT_CONTEXT;
  cbSize: DWORD;
  SysTime: TSystemTime;
  sNombre: String;
begin
  aList.Clear;
  aFechas.Clear;
  Result := 0;
  hStore := CertOpenSystemStore(0, PChar('MY'));
  if hStore <> nil then begin
     PrevContext := nil;
     CurContext := CertEnumCertificatesInStore(hStore, PrevContext);
     while CurContext <> nil do begin
       sNombre := '';
       cbSize := CertGetNameString(CurContext, CERT_NAME_SIMPLE_DISPLAY_TYPE, 0, nil, nil, 0);
       if cbSize > 0 then
       begin
          SetLength(sNombre, cbSize-1);
          CertGetNameString(CurContext, CERT_NAME_SIMPLE_DISPLAY_TYPE, 0, nil, PChar(sNombre), cbSize);
          aList.Add(sNombre);
          if FileTimeToSystemTime(CurContext^.pCertInfo^.NotAfter, SysTime) then
          begin
            AFechas.Add(datetimetostr(SystemTimeToDateTime(SysTime)));
          end;
       end;
       PrevContext := CurContext;
       CurContext  := CertEnumCertificatesInStore(hStore, PrevContext);
     end;
  end;
  result:=aList.count;
end;
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Verifactu o por requerimiento (no-verifactu) ¿decisión del usuario? Maska10 Temas legales 2 07-12-2024 12:34:47
Demo de una applicación para una estación de enfermera con RAD Studio AgustinOrtu La Taberna 1 21-07-2015 17:41:35
Demo Delphi, EMail Caral Internet 1 19-12-2006 00:37:56
Demo de delphi 2005 mazinger Varios 2 18-12-2004 09:23:09
El Rave que viene con Delphi es una Demo? apicito Impresión 0 04-06-2003 11:33:36


La franja horaria es GMT +2. Ahora son las 10:36:00.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi