Discord
Steam
/
Developers
/
Problems hooki..
Login/Join
Event Log
Problems hooking LuaBase
4 replies, posted
Search
In This Thread
I am having troubles interacting with it because it instantly crashes my game. Please help DWORD WINAPI Main(LPVOID lParam) { Internal::ErasePEHeader((DWORD)myModule); HMODULE LuaShared_modhandle = GetModuleHandle("lua_shared.dll"); if (LuaShared_modhandle != NULL) { typedef void* (*CreateInterfaceFn)(const char* name, int* returncode); CreateInterfaceFn LuaShared_createinter = (CreateInterfaceFn)GetProcAddress(LuaShared_modhandle, "CreateInterface"); luaL_loadstring = (tluaL_loadstring)GetProcAddress(LuaShared_modhandle, "luaL_loadstring"); luaL_loadfile = (tluaL_loadfile)GetProcAddress(LuaShared_modhandle, "luaL_loadfile"); CLuaShared* LuaShared = (CLuaShared*)LuaShared_createinter("LUASHARED003", NULL); if (LuaShared != NULL) { ILuaInterface* ClientLua = LuaShared->GetLuaInterface(LUA_CLIENT); if (ClientLua != NULL) { lua_State* state = ClientLua->GetLuaState(); } } } return 0; } BOOL __stdcall DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { if (ul_reason_for_call == DLL_PROCESS_ATTACH) CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)Main , hModule, 0, nullptr); return true; }
What? Maybe more details xD?
If you solved your question, do not snip it
You mean that he deleted his post with edit or what?
He edited it, so we don't know what was here
Sorry, you need to
Log In
to post a reply to this thread.