C++ Detours "DetourFunction" issue.
Using the "detours library" I have a message box when someone logs into a server and selects a character:
Code:
//the function
void NewUser(void)
{
MessageBox(0, "User Logged On.", "Function Called", MB_OK);
}
NewUserHook = (int (__stdcall*)(void))DetourFunction((PBYTE)0x004BA74D, (PBYTE)NewUser); //the hook line im calling on DLL_PROCESS_ATTACH
NOTE: this is just small snippets
Now on to the problem I get the messagebox when a user logs on but after I close the box and they load the map they are unable to move or do anything so I guess I need a way to return properly and allow the server to continue running normally(if someone else connects it acts fine until of course they load the map and cannot load not sure if that is from threading probably is)