|
You last visited: Today at 16:19
Advertisement
Using GUI in a DLL
Discussion on Using GUI in a DLL within the C/C++ forum part of the Coders Den category.
04/30/2017, 00:35
|
#1
|
elite*gold: 0
Join Date: Jun 2009
Posts: 64
Received Thanks: 138
|
Using GUI in a DLL
Hi, I have coded a simple hack for Metin2 but now i want to add some simple GUI.
The problem is that i don't know how to implement a GUI in a DLL, i can easily make a GUI in a .exe but i can't implement it on a DLL. I have tried to use CLR support on my main hack but the DLL won't inject and i don't know why.
I have never work with graphical interfaces before.
Any tips or sugestions?
|
|
|
04/30/2017, 03:13
|
#2
|
elite*gold: 0
Join Date: Dec 2014
Posts: 442
Received Thanks: 211
|
>2017 and still doing hacks for metin2
back to topic:
well, since your hack is simple I'd suggest you using the win32 api and code the message loop and events by hand without any toolkit.
this approach is much more lightweight than using Qt or other various frameworks.
I also recommend you to look into wxWidgets. It's extremely lightweight and has a well written documentation and useful libraries.
the only thing left to do is to create a separate thread for the window. this is required since you're directly injecting into the game's mainthread which would block your window from appearing.
simply use or other implementations such as std::thread, CreateThread, wxThread (if you're using wxWidgets) etc.
|
|
|
04/30/2017, 13:19
|
#3
|
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
|
you can use sfml too.
for example:
Code:
#include <SFML/Graphics.hpp>
#include <windows.h>
DWORD WINAPI loop(LPVOID unused){
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
CreateThread(0,0,&loop,0,0,0);
break;
case DLL_PROCESS_DETACH:
// detach from process
break;
case DLL_THREAD_ATTACH:
// attach to thread
break;
case DLL_THREAD_DETACH:
// detach from thread
break;
}
return TRUE; // succesful
}
|
|
|
04/30/2017, 19:34
|
#4
|
elite*gold: 0
Join Date: Jun 2009
Posts: 64
Received Thanks: 138
|
Quote:
Originally Posted by _asm
>2017 and still doing hacks for metin2
|
I'm still a newbie in the area. I Just want to learning more and this is a simple game with leaked source and with almost no protection.
Quote:
Originally Posted by _asm
>
well, since your hack is simple I'd suggest you using the win32 api and code the message loop and events by hand without any toolkit.
this approach is much more lightweight than using Qt or other various frameworks.
I also recommend you to look into wxWidgets. It's extremely lightweight and has a well written documentation and useful libraries.
the only thing left to do is to create a separate thread for the window. this is required since you're directly injecting into the game's mainthread which would block your window from appearing.
simply use or other implementations such as std::thread, CreateThread, wxThread (if you're using wxWidgets) etc.
|
Thanks for the sugestions, i will take a look ate those and decide wich use.
Quote:
Originally Posted by maxi39
you can use sfml too.
for example:
Code:
#include <SFML/Graphics.hpp>
#include <windows.h>
DWORD WINAPI loop(LPVOID unused){
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
CreateThread(0,0,&loop,0,0,0);
break;
case DLL_PROCESS_DETACH:
// detach from process
break;
case DLL_THREAD_ATTACH:
// attach to thread
break;
case DLL_THREAD_DETACH:
// detach from thread
break;
}
return TRUE; // succesful
}
|
That looks a simple and easy to use i will probably go for that one
Thank You
|
|
|
04/30/2017, 22:36
|
#5
|
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
|
Quote:
Originally Posted by martinx1
That looks a simple and easy to use i will probably go for that one
Thank You
|
if u only use the framework, u have to code the gui elements by ur self. maybe u will get new experiences .
|
|
|
05/01/2017, 01:37
|
#6
|
elite*gold: 0
Join Date: May 2013
Posts: 175
Received Thanks: 123
|
How in depth of a UI are you trying to do? And is this attempting to be external or internal in the game itself?
|
|
|
05/01/2017, 02:35
|
#7
|
elite*gold: 0
Join Date: Dec 2014
Posts: 442
Received Thanks: 211
|
Quote:
Originally Posted by atom0s
How in depth of a UI are you trying to do? And is this attempting to be external or internal in the game itself?
|
Internal. He is trying to attach a DLL with a GUI. I guess this thread can be closed since there are enough answers with possible solutions to his problem.
with kind regards,
_asm
|
|
|
05/01/2017, 16:31
|
#8
|
elite*gold: 0
Join Date: Jun 2009
Posts: 64
Received Thanks: 138
|
Thanks to all the sugestions, i will take a look in some of them in a near future, as my free time now is not much and, as _asm said, the thread can be closed
|
|
|
07/11/2017, 04:10
|
#9
|
elite*gold: 0
Join Date: Feb 2016
Posts: 94
Received Thanks: 22
|
Use Qt Visual Studio Addin.
|
|
|
07/12/2017, 23:37
|
#10
|
elite*gold: 0
Join Date: Dec 2014
Posts: 442
Received Thanks: 211
|
Quote:
Originally Posted by Cøre
Use Qt Visual Studio Addin.
|
too much of an overhead
|
|
|
|
Similar Threads
|
[HOW TO] MSVCR110.dll fehlt BEHEBEN | [MSVCR120.dll MSVCP110.dll MSVCP100.dll etc]
03/25/2014 - Tutorials - 2 Replies
Hier ist ein Youtube Video:
MSVCR100.dll feht BEHEBEN / MSVCR110.dll fehlt MSVCR120.dll MSVCP110.dll MSVCP100.dll MSVCP120.dll - YouTube
Aber den ganzen Kram könnt ihr auch als Text haben:
Viele von euch kennen bestimmt das Problem das ne dll auf dem PC fehlt und das Programme dann nicht laufen. Hier ist die Lösung:
Schaut erstmal nach, welche Microsoft Redistributables auf eurem PC installiert sind. Geht hierzu auf Start > Sytemsteuerung > Programme > Programme und Funktionen
und...
|
[HELP]Using SmartWHZ.DLL and hyperpeer.dll
04/08/2011 - Soldier Front Philippines - 25 Replies
hello ..
sir ask ko lng po ,, ung gmit ko pong wallhack eh ung" smartwhz and hyperpeer"
dll's after po ng 20mins connection been lost po... :(
im using double mounting method
can any one helps me?
tnx
|
cmd gui+0.dll para sa mga nahihirapan paganahin ang 0.dll
12/22/2009 - Soldier Front Hacks, Bots, Cheats & Exploits - 11 Replies
1. Double click lang yun Gyro.exe
2. Double click yun Gyro shortcut na lumabas sa desktop
lalabas
George Estregan GUI ko
3. Click yun Disable Command Prompt para ma disable Command Prompt
para ito sa 0.dll Bypass
4. Click yun Gyro Internet/Games Wallhack may lalabas na window
wag nang galawin nka-set na yan
5. Log on kayo sa account
nyo sa SF tapos may lalabas Command prompt
|
All times are GMT +2. The time now is 16:19.
|
|