uMod2 Alpha Version: known bugs: I disabled the remove device function inside the gui, because something in the event handling goes terrible wrong.

Implemented a some new features.
This commit is contained in:
code@koerner-de.net
2012-07-15 18:59:03 +00:00
parent d99107a919
commit 0bc7eebede
69 changed files with 7975 additions and 2393 deletions
+51 -5
View File
@@ -29,31 +29,77 @@ along with Universal Modding Engine. If not, see <http://www.gnu.org/licenses/>
#include "../uMod_DX10/uMod_DX10_dll.h"
#endif
/**
* This function is called during the dll load sequence (dll entry)
* @param[in] hModule
*/
void InitInstance(HINSTANCE hModule);
/**
* This function is called, when the dll gets unloaded.
*/
void ExitInstance(void);
/**
* Returns true if this game shall be injected (DirectX hook). It returns also the name and path of the game executable.
* This function always return true, when compiled for "Direct Injection" of for "No Injection".
* @param[out] ret buffer where the name and path of the game executable should be stored
* @param[in] max_len length of the buffer
* @return
*/
bool HookThisProgram( wchar_t *ret, const int max_len);
/**
* This function is called, when the server thread is created. It only calls the mainloop function of the \a TextureServer.
* @param[in] lpParam Pointer to the \a TextureServer.
*/
DWORD WINAPI ServerThread( LPVOID lpParam);
#ifndef NO_INJECTION
#if INJECTION_METHOD==DIRECT_INJECTION || INJECTION_METHOD==HOOK_INJECTION
/**
* Detour a function to another function.
* @param[in] src pointer to function which shall be detoured
* @param[in] dst pointer to function which shall be called instead
* @param[in] len number of byte to be stored
* @return trampoline = pointer to detoured function
*/
void *DetourFunc(BYTE *src, const BYTE *dst, const int len);
/**
* Retour the function.
* @param src pointer to the detoured function
* @param restore trampoline = pointer to the detoured function
* @param len number of saved bytes
* @return
*/
bool RetourFunc(BYTE *src, BYTE *restore, const int len);
#endif
#ifdef HOOK_INJECTION
#if INJECTION_METHOD==HOOK_INJECTION
/**
* This function is insert into the hook.
*/
LRESULT CALLBACK HookProc(int nCode, WPARAM wParam, LPARAM lParam);
/**
* This function install the hook, our dll will be loaded into each running process (if we have sufficient permission).
*/
void InstallHook(void);
/**
* This function remove the hook, our dll will get unloaded from each process.
*/
void RemoveHook(void);
#endif
#ifdef DIRECT_INJECTION
#if INJECTION_METHOD==DIRECT_INJECTION
/**
* Dummy function need for the "Direct Injection" mehtod.
*/
void Nothing(void);
#endif
#endif
#endif