ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 1482

Threading

by SeriousModz - 04-11-2021 - 06:32 PM
#1
Dear demons,

 is there a way to use threading and call game functions in a thread?
Reply
#2
Code:
DWORD Thread(PVOID)
{
        // call game functions here
}

CreateThread(0, 0, Thread, 0, 0, 0);
Reply
#3
That doesn't work. It does crash if you call specified functions in there.
Reply
#4
(04-12-2021 - 08:05 AM)Polarize Wrote:
Code:
DWORD Thread(PVOID)
{
        // call game functions here
}

CreateThread(0, 0, Thread, 0, 0, 0);

I think he mean Multi Threading.
DISCORD: xexghosted
Reply
#5
If the game is crashing when you call specific game functions you should look at exactly where it is crashing, you may need to initialize your own threads in a different way.
Reply
#6
(04-12-2021 - 12:36 PM)Polarize Wrote: If the game is crashing when you call specific game functions you should look at exactly where it is crashing, you may need to initialize your own threads in a different way.
What exactly do you mean "you need to initialize the thread in a different way."?
Reply
#7
What I mean is the game itself creates and closes thread in a specific way so that's why creating your own and accessing game functions/data can cause a crash. You need to create a thread the same way the game does.

Refer to this github for a different example of creating threads

https://github.com/forceinline/csgo-exte...r/main.cpp
Reply

Users browsing: 2 Guest(s)