Moving from game external hack to DLL!

Hi guys I currently learning making game hacks. I usually make external exe for my hacks. But now want to learn making internals dll.

In external project the main function is int main ().
But for internal I assume it is called DLL Main right?

- What I want to know and confused about is DLL Main Function has parameters that need to be passed in. What I want to know is where is dll main getting hinstance hinstdll, dword fdwreason, lpvoid lpvreserved from?



BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)myStuff, 0, 0, 0);
return 1;
}



Thanks, just asking these types of question to understand more of how it works etc.
The parameters are filled by the system when the DLL is loaded, threads are created, etc.
Topic archived. No new replies allowed.