Gui + dll

10/01/2020 14:04 Hatz~#1
Hello dear community, i have the next problem, i would like to use a gui for my dll to display information and interact with the dll but i can't find a way of doing it. I know you can create a gui very easy with Qt but i dont know how to implement that to my dll. Does anyone know how to do it? I'd very thankful :)
10/01/2020 15:19 FI0w#2
Quote:
Originally Posted by Hatz~ View Post
Hello dear community, i have the next problem, i would like to use a gui for my dll to display information and interact with the dll but i can't find a way of doing it. I know you can create a gui very easy with Qt but i dont know how to implement that to my dll. Does anyone know how to do it? I'd very thankful :)
You could use CLI its outdated but yea you can still implement a QT GUI inside a dll just use google first few links should have the answer.
10/01/2020 15:46 Hatz~#3
Quote:
Originally Posted by FI0w View Post
You could use CLI its outdated but yea you can still implement a QT GUI inside a dll just use google first few links should have the answer.
Would you mind sharing that? I already searched but everything i found doens't solve my question. I'd very thankful :)
10/01/2020 17:07 Apourtartt#4
You can also hook direct3d9 to make an "internal gui" lot of interisting stuff on google by searching "hook direct3d9 imgui" for example
10/01/2020 17:33 Hatz~#5
Quote:
Originally Posted by Apourtartt View Post
You can also hook direct3d9 to make an "internal gui" lot of interisting stuff on google by searching "hook direct3d9 imgui" for example
Ty for the answer, but i'd like to make it external gui
10/01/2020 18:01 WalrossGreat#6
This project uses Qt for external GUI in DLL that you can inject into game [Only registered and activated users can see links. Click Here To Register...]
10/01/2020 18:15 Hatz~#7
I was just looking at that project when i saw your answer lol. Im trying to make a simple program dll with a gui but im getting a lot of errors. This is the code i want to work:
Code:
#include "mainwindow.h"
#include <windows.h>
#include <QApplication>

DWORD WINAPI DLLStart(LPVOID param)
{
    int argc = 0;
    QApplication app(argc, NULL);
    MainWindow window;
    window.show();
    app.exec();

    return 0;
}

void MyThread()
{
    // My code would be here
}


BOOL APIENTRY  DllMain(HINSTANCE hinstDLL, DWORD reason,LPVOID lpReserved)
{
    if (reason == DLL_PROCESS_ATTACH)
    {
        CreateThread(0, 0, DLLStart, 0, 0, 0);
        DisableThreadLibraryCalls(hinstDLL);
        CreateThread(0, 0, (LPTHREAD_START_ROUTINE)MyThread, 0, 0, 0);
    }
    return TRUE;
}
And this are the errors:

[Only registered and activated users can see links. Click Here To Register...]

I just made a qt application and changed the main file

[Only registered and activated users can see links. Click Here To Register...]
10/01/2020 18:31 FI0w#8
Quote:
Originally Posted by Hatz~ View Post
I was just looking at that project when i saw your answer lol. Im trying to make a simple program dll with a gui but im getting a lot of errors. This is the code i want to work:
Code:
#include "mainwindow.h"
#include <windows.h>
#include <QApplication>

DWORD WINAPI DLLStart(LPVOID param)
{
    int argc = 0;
    QApplication app(argc, NULL);
    MainWindow window;
    window.show();
    app.exec();

    return 0;
}

void MyThread()
{
    // My code would be here
}


BOOL APIENTRY  DllMain(HINSTANCE hinstDLL, DWORD reason,LPVOID lpReserved)
{
    if (reason == DLL_PROCESS_ATTACH)
    {
        CreateThread(0, 0, DLLStart, 0, 0, 0);
        DisableThreadLibraryCalls(hinstDLL);
        CreateThread(0, 0, (LPTHREAD_START_ROUTINE)MyThread, 0, 0, 0);
    }
    return TRUE;
}
And this are the errors:

[Only registered and activated users can see links. Click Here To Register...]

I just made a qt application and changed the main file

[Only registered and activated users can see links. Click Here To Register...]
This works for me:
10/01/2020 18:35 Hatz~#9
Quote:
Originally Posted by FI0w View Post
This works for me:
Then i have no idea what i'm doing wrong, in these case you used vs to compile it right?
10/01/2020 18:36 FI0w#10
yes i used vs with qt extension
10/01/2020 18:37 Hatz~#11
In my case i compiled directly from qt, i'll try that

EDIT: anyways i would also like to compile it directly from qt, any ideas? :)
10/01/2020 23:06 FI0w#12
Quote:
Originally Posted by Hatz~ View Post
In my case i compiled directly from qt, i'll try that

EDIT: anyways i would also like to compile it directly from qt, any ideas? :)
the project from walrose is QT only, so no visual studio maybe you should check his project files.
10/01/2020 23:14 Hatz~#13
Yup that project really helped me, now i understand how to do it but im getting a lot of erros i dont know why, and it's annoying af
10/01/2020 23:26 WalrossGreat#14
In the project I've linked above you already have the .pro file. Just click it twice and Qt Creator should open up, check if it builds for you, don't create your own project.
10/01/2020 23:32 Hatz~#15
Since the project was made on qt4 and im using qt5 i can't compile it :(
[Only registered and activated users can see links. Click Here To Register...]