Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 18-06-2004
Avatar de __marcsc
__marcsc __marcsc is offline
Miembro
 
Registrado: may 2003
Ubicación: Girona
Posts: 577
Poder: 24
__marcsc Va por buen camino
Si te interesa tengo este código para obtener la lista de funciones de una DLL.

Código Delphi [-]
procedure ListDLLFunctions(DLLName: String; List: TStrings);
var
  Image: TLoadedImage;
  PExpDir: PImageExportDirectory;
  PExportedNames: Pointer; //pointer to list of exported functions
  Ptr: PImageSectionHeader;
  i: Integer;
  ExportedFunctionName: PChar;
begin
  List.Clear;
  //load the file into memory.
 if FileExists(DLLName) then
 begin
   try
      MapAndLoad(PChar(DLLName),PChar('#0'),@Image,True,True);
      pExpDir:= PImageExportDirectory(Image.FileHeader.OptionalHeader.DataDirectory
       [IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress);
      pExpDir:= PImageExportDirectory(ImageRvaToVa(Image.FileHeader,
       Image.MappedAddress,DWORD(pExpDir),Ptr));
      PExportedNames:= pExpDir.AddressOfNames;
      PExportedNames:= ImageRvaToVa(Image.FileHeader,Image.MappedAddress,DWORD(PExportedNames),Ptr);
      for i:= 0 to pExpDir.NumberOfFunctions - 1 do
      begin
        ExportedFunctionName:= PChar(ImageRvaToVa(Image.FileHeader,
         Image.MappedAddress,DWORD(PExportedNames^),Ptr));
        List.Add(ExportedFunctionName);
        inc(PInteger(PExportedNames));
      end;
  finally         
     UnMapAndLoad(@Image); //Unload the mapped file from memory.
  end;
 end;
end;

Si no te interesa hacerlo por código, puedes utilizar, en el intérprete de comandos:

Código:
tdump -ee Midll.dll
No hay forma de conocer los parámetros, para eso necesitarás la documentación. Sorry.

Saludos!
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

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


La franja horaria es GMT +2. Ahora son las 01:04:15.


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