mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-04 21:50:35 -04:00
Added rtti-reader and made various cleanups, switching to Shutdown_M for error handling
This commit is contained in:
parent
5444c9aea6
commit
6dddbd2efa
25 changed files with 771 additions and 194 deletions
|
@ -27,23 +27,23 @@ int main(){
|
|||
return -1;
|
||||
}
|
||||
|
||||
cEdithEditorCOMDirector * (__stdcall *GZDllGetGZCOMDirector)(void) =
|
||||
(cEdithEditorCOMDirector * (__stdcall *)(void)) GetProcAddress(dllmodule, "GZDllGetGZCOMDirector");
|
||||
cTSOEdithEditorDCOMDirector * (__stdcall *GZDllGetGZCOMDirector)(void) =
|
||||
(cTSOEdithEditorDCOMDirector * (__stdcall *)(void)) GetProcAddress(dllmodule, "GZDllGetGZCOMDirector");
|
||||
if(GZDllGetGZCOMDirector == NULL){
|
||||
printf("TSOEdithEditor: Error: Failed to find GZDllGetGZCOMDirector() in TSOEdithEditorD.dll.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("TSOEdithEditor: Calling GZDllGetGZCOMDirector() ...\n");
|
||||
cEdithEditorCOMDirector * Edith = GZDllGetGZCOMDirector();
|
||||
cTSOEdithEditorDCOMDirector * Edith = GZDllGetGZCOMDirector();
|
||||
printf("TSOEdithEditor: Finished calling GZDllGetGZCOMDirector().\nThe value returned was: %p.\n", (void *) Edith);
|
||||
|
||||
while(true){
|
||||
char buffer[8];
|
||||
printf("\nCall a function (0, 1, 2, ...) or q to exit. ");
|
||||
fgets(buffer, 8, stdin);
|
||||
if(buffer[0] == 'q') break;
|
||||
Edith->Object1.vtable5[atoi(buffer)]();
|
||||
//fgets(buffer, 8, stdin);
|
||||
//if(buffer[0] == 'q') break;
|
||||
//Edith->Object1.vtable5[atoi(buffer)]();
|
||||
}
|
||||
|
||||
printf("TSOEdithEditor: Exiting.\n");
|
||||
|
|
|
@ -41,7 +41,7 @@ DECLARE_INTERFACE(cUnknownObject1)
|
|||
DWORD Unknown12;
|
||||
};
|
||||
|
||||
DECLARE_INTERFACE(cEdithEditorCOMDirector)
|
||||
DECLARE_INTERFACE(cTSOEdithEditorDCOMDirector)
|
||||
{
|
||||
void * vtable2;
|
||||
void * vtable1;
|
||||
|
|
|
@ -1 +1 @@
|
|||
gcc -Wall -Wextra -Wabi -pedantic -m32 -o TSOEdithEditor.exe TSOEdithEditor.cpp -mconsole
|
||||
gcc -Wall -Wextra -Wabi -pedantic -fno-exceptions -m32 -o TSOEdithEditor.exe TSOEdithEditor.cpp -mconsole
|
|
@ -38,7 +38,7 @@ int main(){
|
|||
cTSOSimulatorClientDCOMDirector * Simulator = GZDllGetGZCOMDirector();
|
||||
printf("TSOSimulatorClient: Finished calling GZDllGetGZCOMDirector().\nThe value returned was: %p.\n", (void *) Simulator);
|
||||
|
||||
printf("%s\n%s\n%s\n", Simulator->Object1.Strings1[0], Simulator->Object1.Strings2[0], Simulator->Object1.Strings3[0]);
|
||||
printf("%s\n%s\n%s\n", Simulator->String1.Strings1[0], Simulator->String1.Strings2[0], Simulator->String1.Strings3[0]);
|
||||
|
||||
printf("TSOSimulatorClient: Exiting.\n");
|
||||
FreeLibrary(dllmodule);
|
||||
|
|
|
@ -19,8 +19,9 @@
|
|||
#include <basetyps.h>
|
||||
#pragma pack(0)
|
||||
|
||||
DECLARE_INTERFACE(cUnknownObject1)
|
||||
DECLARE_INTERFACE(cRZString)
|
||||
{
|
||||
//Base classes: cRZString, std::char_traits, ?$_String_base@DV?$__default_alloc_template@$00$0A@@std@@@std, cIGZString, cIGZUnknown
|
||||
DWORD Zero1;
|
||||
DWORD Zero2;
|
||||
void * vtable5;
|
||||
|
@ -43,13 +44,14 @@ DECLARE_INTERFACE(cUnknownObject1)
|
|||
|
||||
DECLARE_INTERFACE(cTSOSimulatorClientDCOMDirector)
|
||||
{
|
||||
//Base classes: cTSOSimulatorClientDCOMDirector, cRZCOMDllDirector, cIGZCOMDirector, cIGZUnknown, cIGZFrameWorkHooks, cIGZUnknown
|
||||
void * vtable2;
|
||||
void * vtable1;
|
||||
cUnknownObject1 Object1;
|
||||
cRZString String1;
|
||||
void * vtable4;
|
||||
void * vtable3;
|
||||
cUnknownObject1 Object2;
|
||||
cUnknownObject1 Object3;
|
||||
cRZString String2;
|
||||
cRZString String3;
|
||||
|
||||
DWORD Zero1;
|
||||
DWORD Zero2;
|
||||
|
|
|
@ -1 +1 @@
|
|||
gcc -Wall -Wextra -Wabi -pedantic -m32 -o TSOSimulatorClient.exe TSOSimulatorClient.cpp -mconsole
|
||||
gcc -Wall -Wextra -Wabi -pedantic -fno-exceptions -m32 -o TSOSimulatorClient.exe TSOSimulatorClient.cpp -mconsole
|
Loading…
Add table
Add a link
Reference in a new issue