Am 22.06.2017 um 16:05 schrieb Heinz-Mario Frühbeis:
> Hallo,
>
> ich habe hier ein Projekt das darauf basiert, das eine Variable einer
> Bibliothek die einem Programm in Main aufgerufen wurde gehalten wird bis
> der Ablauf innerhalb der Bibliothek beendet ist.
> [...]
Ich denke, ich hab's...
Jedenfalls habe ich jetzt IDABrowse am laufen und auch, zum "direkt mal
schau'n, IDAEdit.
-------------------------------------------------------------
Der Header:
#include <ida.h>
#include <xida.h>
#include <ida.h>
#include <xida_font.h>
#include <xida_color.h>
#include <xida_eventmask.h>
#include <idasection.h>
#include <xidabutton.h>
#include <iostream>
class cSections{
public:
class cSecEdit {
public:
class cAreas{
public:
XIDAButton *btnIDA;
XIDA_Button_Event ev_Btn_IDA;
};
cAreas Areas;
IDASection *Section;
XIDA_EventMask Events;
};
};
extern IDA *m_IDA;
extern XIDA *mXIDA;
extern cSections Sections;
extern cSections::cSecEdit SecEdit;
extern void Create_SecEdit();
inline void Quit(){
SecEdit.Section = NULL;
mXIDA = NULL;
mXIDA = NULL;
}
-------------------------------------------------------------
main:
#include "hsections.h"
using namespace std;
IDA *m_IDA = NULL;
XIDA *mXIDA = NULL;
cSections Sections;
cSections::cSecEdit SecEdit;
std::string mIdent, mIdentFrom;
int main(int argc, char *argv[]){
if(argc < 3){return 1;}
mIdentFrom = (std::string) argv[1];
mIdent = (std::string) argv[2];
IDA mIDA(mIdentFrom.c_str(), mIdent.c_str());
m_IDA = &mIDA;
mXIDA = mIDA._XIDA();
Create_SecEdit();
mXIDA->Load(SecEdit.Section);
SecEdit.Section->Show(1);
cout << "MAIN ENDE +++++++++++++++++++++ IDAEDIT --- " << mIdent << endl;
return 0;
}
-------------------------------------------------------------
secedit.cpp:
#include "hsections.h"
#include "hsecedit.h"
void Create_SecEdit(){
SecEdit.Events.mEvent_Click = &SecEdit_Click;
SecEdit.Events.mEvent_KeyPress = &SecEdit_KeyPress;
SecEdit.Events.mEvent_Unload = &SecEdit_Unload;
SecEdit.Section = mXIDA->RegisterSection("SecEdit", (int) Sec_Style_Normal
, (int) StatBox_Full, 0);
SecEdit.Section->SetEventMask(&SecEdit.Events);
SecEdit.Section->Caption("IDA Edit");
SecEdit.Section->SetPos(500, 400);
SecEdit.Section->Width(400);
SecEdit.Section->Height(450);
}
hsecedit.h erspare ich hier mal, weil a) länger und b) da sind die
Events (SecEdit_Click() z. Bsp.). Hat #include"hsections.h"...
Ich hab' keine Ahnung, warum das so ein Problem mit IDABrowse war! Ich
habe zich mal hin und her probiert... Dann habe ich 'en altes BackUp
genommen und das lief, dann habe ich es etwas angepasst (auf den Stand,
wie hier gepostet) und dann nochmal komplett neu mit QT Creator
hochgezogen, um sicher zu gehen.
Noch ein, zwei laufen lassen, bevor ich den Senden-Button klicke. :)
Ja, läuft. :)
Für alle, die es interessiert:
<
http://www.bilder-upload.eu/show.php?file=08fe2f-1498229208.png>
Mit Gruß
Heinz-Mario Frühbeis