Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 15-03-2008
Avatar de MaMu
MaMu MaMu is offline
Miembro
 
Registrado: abr 2006
Ubicación: Argentina
Posts: 863
Poder: 19
MaMu Va por buen camino
DLL desmistificada

Yo tengo una pregunta, por un lado yo puedo saber si una DLL contiene determinada función, haciendo:

Código Delphi [-]
function AsignaProcedure(EnQueDll,Procedimiento: string):TFarProc;
   var
     MangoProc,
     MangoLib    : THandle;

   begin
     Result:=nil;
     MangoLib:=GetModuleHandle(Pchar(EnQueDll));
     if MangoLib <> 0 then
       Result:=GetProcAddress(MangoLib,Pchar(Procedimiento));
     {Si la DLL o la procedure no esta disponible... error}
     if (MangoLib=0) or (Result=nil) then
       raise Exception.create( Procedimiento+
                               ' en '+
                               EnQueDll+
                               ' no encontrado.');
   end;

Pero, es posible obtener todos los exports? es decir, sabiendo la DLL obtener un listado de las funciones que contiene?

Saludos
__________________
Código Delphi [-]
 
try 
ProgramarMicro(80C52,'Intel',MnHex,True);
except
On Exception do
MicroChip.IsPresent(True);
end;
Responder Con Cita
  #2  
Antiguo 15-03-2008
Robert01 Robert01 is offline
Miembro
 
Registrado: feb 2006
Ubicación: Córdoba, Argentina
Posts: 895
Poder: 19
Robert01 Va por buen camino
Hola

Yo probaría con TDump que viene con Borland.

TDump nombreDll.dll -ee, si no me equivoco. Mira la ayuda para más seguridad.

Saludos
Responder Con Cita
  #3  
Antiguo 15-03-2008
JXJ JXJ is offline
Miembro
 
Registrado: abr 2005
Posts: 2.475
Poder: 22
JXJ Va por buen camino
¿Te refieres a esto manu¡?

This utility displays the list of all exported functions and their virtual memory addresses for the specified DLL files. You can easily copy the memory address of the desired function, paste it into your debugger, and set a breakpoint for this memoery address. When this function is called, the debugger will stop in the beginning of this function.
For example: If you want to break each time that a message box is going to be displayed, simply put breakpoints on the memory addresses of message-box functions: MessageBoxA, MessageBoxExA, and MessageBoxIndirectA (or MessageBoxW, MessageBoxExW, and MessageBoxIndirectW in unicode based applications) When one of the message-box functions is called, your debugger should break in the entry point of that function, and then you can look at call stack and go backward into the code that initiated this API call.

http://www.nirsoft.net/utils/dll_export_viewer.html
Responder Con Cita
  #4  
Antiguo 15-03-2008
luisgutierrezb luisgutierrezb is offline
Miembro
 
Registrado: oct 2005
Ubicación: México
Posts: 925
Poder: 19
luisgutierrezb Va por buen camino
Tambien lo puedes saber con "dependency walker" asi busca el programita, es gratis
Responder Con Cita
  #5  
Antiguo 17-03-2008
Avatar de MaMu
MaMu MaMu is offline
Miembro
 
Registrado: abr 2006
Ubicación: Argentina
Posts: 863
Poder: 19
MaMu Va por buen camino
Cita:
Empezado por JXJ Ver Mensaje
¿Te refieres a esto manu¡?

This utility displays the list of all exported functions and their virtual memory addresses for the specified DLL files. You can easily copy the memory address of the desired function, paste it into your debugger, and set a breakpoint for this memoery address. When this function is called, the debugger will stop in the beginning of this function.
For example: If you want to break each time that a message box is going to be displayed, simply put breakpoints on the memory addresses of message-box functions: MessageBoxA, MessageBoxExA, and MessageBoxIndirectA (or MessageBoxW, MessageBoxExW, and MessageBoxIndirectW in unicode based applications) When one of the message-box functions is called, your debugger should break in the entry point of that function, and then you can look at call stack and go backward into the code that initiated this API call.

http://www.nirsoft.net/utils/dll_export_viewer.html
Si, tal cual lo que decía.
Ahora me pregunto, habrá forma de abrir una DLL?, es decir, ver el source.

Saludos
__________________
Código Delphi [-]
 
try 
ProgramarMicro(80C52,'Intel',MnHex,True);
except
On Exception do
MicroChip.IsPresent(True);
end;
Responder Con Cita
  #6  
Antiguo 17-03-2008
Robert01 Robert01 is offline
Miembro
 
Registrado: feb 2006
Ubicación: Córdoba, Argentina
Posts: 895
Poder: 19
Robert01 Va por buen camino
Cita:
Empezado por mamu Ver Mensaje
Si, tal cual lo que decía.
Ahora me pregunto, habrá forma de abrir una DLL?, es decir, ver el source.

Saludos
No, no creo que exista una forma de hacerlo. Además el ilegal y contrario a la ética
Responder Con Cita
Respuesta



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 08:08:32.


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