Attempted to implement LastCalledFunctionPointer and NextCalledFunctionPointer, aborted as not useful enough and unsure how to make these user-friendly.

This commit is contained in:
Michael Dirks
2016-01-04 03:43:35 +01:00
parent 57c310b0fc
commit 2941a6b740
3 changed files with 19 additions and 0 deletions
+15
View File
@@ -53,6 +53,21 @@ DLL_METHOD intptr_t DLL_CALL BP_GetFunctionPointer()
} }
#pragma comment(linker, "/EXPORT:BP_GetFunctionPointer=_BP_GetFunctionPointer@0") #pragma comment(linker, "/EXPORT:BP_GetFunctionPointer=_BP_GetFunctionPointer@0")
// Didn't work out, overloading a Runtime Function makes it disappear.
/*DLL_METHOD intptr_t DLL_CALL BP_GetLastCalledFunctionPointer( )
{
// Scan backwards in executable memory for a eax assign.
return 0;
}
#pragma comment(linker, "/EXPORT:BP_GetLastCalledFunctionPointer=_BP_GetLastCalledFunctionPointer@0")
DLL_METHOD intptr_t DLL_CALL BP_GetNextCalledFunctionPointer()
{
// Scan forwards in executable memory for a eax assign.
return 0;
}
#pragma comment(linker, "/EXPORT:BP_GetNextCalledFunctionPointer=_BP_GetNextCalledFunctionPointer@0")*/
DLL_METHOD intptr_t DLL_CALL BP_GetVariablePointer(int32_t pVariable) DLL_METHOD intptr_t DLL_CALL BP_GetVariablePointer(int32_t pVariable)
{ {
intptr_t BasePointer; intptr_t BasePointer;
+2
View File
@@ -19,6 +19,8 @@
; BlitzPointer ; BlitzPointer
BP_GetReturnAddress%() BP_GetReturnAddress%()
BP_GetFunctionPointer%() BP_GetFunctionPointer%()
BP_GetLastCalledFunctionPointer%()
BP_GetNextCalledFunctionPointer%()
;BP_GetVariablePointer%(pVariable%) ;BP_GetVariablePointer%(pVariable%)
BP_GetVariablePointerInt%(pVariable%) : "BP_GetVariablePointer" BP_GetVariablePointerInt%(pVariable%) : "BP_GetVariablePointer"
BP_GetVariablePointerFloat%(pVariable#) : "BP_GetVariablePointer" BP_GetVariablePointerFloat%(pVariable#) : "BP_GetVariablePointer"
+2
View File
@@ -29,6 +29,8 @@ typedef int32_t(__stdcall *BP_BlitzFunction5_t)(int32_t, int32_t, int32_t, int32
// Basic Functionality (Pointer retrieval) // Basic Functionality (Pointer retrieval)
DLL_METHOD intptr_t DLL_CALL BP_GetReturnAddress(); DLL_METHOD intptr_t DLL_CALL BP_GetReturnAddress();
DLL_METHOD intptr_t DLL_CALL BP_GetFunctionPointer(); DLL_METHOD intptr_t DLL_CALL BP_GetFunctionPointer();
/*DLL_METHOD intptr_t DLL_CALL BP_GetLastCalledFunctionPointer( );
DLL_METHOD intptr_t DLL_CALL BP_GetNextCalledFunctionPointer();*/
DLL_METHOD intptr_t DLL_CALL BP_GetVariablePointer(int32_t pVariable); DLL_METHOD intptr_t DLL_CALL BP_GetVariablePointer(int32_t pVariable);
DLL_METHOD intptr_t DLL_CALL BP_GetVariablePointerType(int32_t pVariable); DLL_METHOD intptr_t DLL_CALL BP_GetVariablePointerType(int32_t pVariable);