Ver Mensaje Individual
  #19  
Antiguo 29-03-2014
Avatar de aguml
aguml aguml is offline
Miembro
 
Registrado: may 2013
Posts: 885
Reputación: 14
aguml Va por buen camino
Vale, esto ya compila y corre y lanza el depurador y solo me falta un detalle. He creado esto:

En el protected del THiloDebugger:
TEventDebugCallBack FuncEventos;

En el Execute:
Synchronize(GetFuncEvents);

Este es el metodo:
Código:
void __fastcall THiloDebugger::GetFuncEvents()
{
        Dbg->GetCallBack(&FuncEventos);
}

Y aqui en el TDebugger:
// Obtener los CallBacks

void TDebugger::GetOnSystemBreakPoint(SYSTEMBREAKPOINT func){
    func = FuncSystemBreakPoint;
}
//---------------------------------------------------------------------------

void TDebugger::GetOnBPs(BREAKPOINT func){
    func = FuncBPs;
}
//---------------------------------------------------------------------------

void TDebugger::GetOnSingleStep(SINGLESTEP func){
    func = FuncSingleStep;
}
//---------------------------------------------------------------------------

void TDebugger::GetOnException(EXCEPTION func){
    func = FuncException;
}
//---------------------------------------------------------------------------

void TDebugger::GetOnCreateProcess(CREATEPROCESS func){
    func = FuncCreateProcess;
}
//---------------------------------------------------------------------------

void TDebugger::GetOnExitProcess(EXITPROCESS func){
    func = FuncExitProcess;
}
//---------------------------------------------------------------------------

void TDebugger::GetOnCreateThread(CREATETHREAD func){
    func = FuncCreateThread;
}
//---------------------------------------------------------------------------

void TDebugger::GetOnExitThread(EXITTHREAD func){
    func = FuncExitThread;
}
//---------------------------------------------------------------------------

void TDebugger::GetOnLoadDll(LOADDLL func){
    func = FuncLoadDLL;
}
//---------------------------------------------------------------------------

void TDebugger::GetOnUnLoadDll(UNLOADDLL func){
    func = FuncUnLoadDLL;
}
//---------------------------------------------------------------------------

void TDebugger::GetOnOutPutString(OUTPUTSTRING func){
    func = FuncOutPutString;
}
//---------------------------------------------------------------------------

void TDebugger::GetOnRIP(RIP func){
    func = FuncRIP;
}
//---------------------------------------------------------------------------

void TDebugger::GetCallBack(TEventDebugCallBack *tEstruc){
    GetOnSystemBreakPoint(tEstruc->FuncSystemBreakPoint);
    GetOnBPs(tEstruc->FuncBPs);
    GetOnException(tEstruc->FuncException);
    GetOnCreateProcess(tEstruc->FuncCreateProcess);
    GetOnExitProcess(tEstruc->FuncExitProcess);
    GetOnCreateThread(tEstruc->FuncCreateThread);
    GetOnExitThread(tEstruc->FuncExitThread);
    GetOnLoadDll(tEstruc->FuncLoadDLL);
    GetOnUnLoadDll(tEstruc->FuncUnLoadDLL);
    GetOnOutPutString(tEstruc->FuncOutPutString);
    GetOnRIP(tEstruc->FuncRIP);
    GetOnSingleStep(tEstruc->FuncSingleStep);
}
El problema es el siguiente, no me guarda los punteros a las funciones en la estructura y eso que si pongo un breakpoint por ejemplo en GetOnSystemBreakPoint veo como le asigna correctamente {TFormPrincipal::OnSystemBreakPoint,:00A16EF0} al miembro de la estructura pero al salir de ese metodo me aparece ese miembro de la estructura como NULL,NULL y no se como solucionarlo ya que es lo ultimo que tengo que solucionar para que esto corra como quiero por ahora.

Última edición por ecfisa fecha: 29-03-2014 a las 01:26:54. Razón: Agregar etiquetas [code]
Responder Con Cita