forked from Public-Mirror/Textractor
prepare for /r code
This commit is contained in:
parent
c32066e43c
commit
9a299f357f
@ -103,6 +103,7 @@ enum HookParamType : unsigned long {
|
|||||||
, NO_CONTEXT = 0x400
|
, NO_CONTEXT = 0x400
|
||||||
, HOOK_EMPTY = 0x800
|
, HOOK_EMPTY = 0x800
|
||||||
, FIXING_SPLIT = 0x1000
|
, FIXING_SPLIT = 0x1000
|
||||||
|
, DIRECT_READ = 0x2000 // /R read code instead of classic /H hook code
|
||||||
//, HOOK_AUXILIARY = 0x2000 // jichi 12/13/2013: None of known hooks are auxiliary
|
//, HOOK_AUXILIARY = 0x2000 // jichi 12/13/2013: None of known hooks are auxiliary
|
||||||
//, RELATIVE_SPLIT = 0x2000 // Artikash 8/3/2018: does nothing
|
//, RELATIVE_SPLIT = 0x2000 // Artikash 8/3/2018: does nothing
|
||||||
, HOOK_ENGINE = 0x4000
|
, HOOK_ENGINE = 0x4000
|
||||||
|
@ -59,7 +59,7 @@ bool DeterminePCEngine()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Util::CheckFile(L"PPSSPP*.exe")) { // jichi 7/12/2014 PPSSPPWindows.exe, PPSSPPEX.exe PPSSPPSP.exe
|
if (Util::CheckFile(L"PPSSPP*.exe")) { // jichi 7/12/2014 PPSSPPWindows.exe, PPSSPPEX.exe PPSSPPSP.exe
|
||||||
InsertPPSSPPHooks();
|
//InsertPPSSPPHooks(); // Artikash 8/4/2018: removed for now as doesn't work for non ancient ppsspp versions
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -465,7 +465,7 @@ int TextHook::InitHook(const HookParam &h, LPCSTR name, WORD set_flag)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TextHook::RemoveHook()
|
int TextHook::RemoveHookCode()
|
||||||
{
|
{
|
||||||
enum : int { yes = 1, no = 0 };
|
enum : int { yes = 1, no = 0 };
|
||||||
if (!hp.address)
|
if (!hp.address)
|
||||||
@ -489,7 +489,7 @@ int TextHook::RemoveHook()
|
|||||||
int TextHook::ClearHook()
|
int TextHook::ClearHook()
|
||||||
{
|
{
|
||||||
WaitForSingleObject(hmMutex, 0);
|
WaitForSingleObject(hmMutex, 0);
|
||||||
int err = RemoveHook();
|
int err = RemoveHookCode();
|
||||||
NotifyHookRemove(hp.address);
|
NotifyHookRemove(hp.address);
|
||||||
if (hook_name) {
|
if (hook_name) {
|
||||||
delete[] hook_name;
|
delete[] hook_name;
|
||||||
|
@ -28,16 +28,16 @@ void InitFilterTable();
|
|||||||
// interprocedure communication, where constructor/destructor will NOT work.
|
// interprocedure communication, where constructor/destructor will NOT work.
|
||||||
class TextHook : public Hook
|
class TextHook : public Hook
|
||||||
{
|
{
|
||||||
|
int InsertHookCode();
|
||||||
int UnsafeInsertHookCode();
|
int UnsafeInsertHookCode();
|
||||||
DWORD UnsafeSend(DWORD dwDataBase, DWORD dwRetn);
|
DWORD UnsafeSend(DWORD dwDataBase, DWORD dwRetn);
|
||||||
int RemoveHook();
|
int RemoveHookCode();
|
||||||
|
int SetHookName(LPCSTR name);
|
||||||
public:
|
public:
|
||||||
int InsertHook();
|
int InsertHook();
|
||||||
int InsertHookCode();
|
|
||||||
int InitHook(const HookParam &hp, LPCSTR name = 0, WORD set_flag = 0);
|
int InitHook(const HookParam &hp, LPCSTR name = 0, WORD set_flag = 0);
|
||||||
DWORD Send(DWORD dwDataBase, DWORD dwRetn);
|
DWORD Send(DWORD dwDataBase, DWORD dwRetn);
|
||||||
int ClearHook();
|
int ClearHook();
|
||||||
int SetHookName(LPCSTR name);
|
|
||||||
int GetLength(DWORD base, DWORD in); // jichi 12/25/2013: Return 0 if failed
|
int GetLength(DWORD base, DWORD in); // jichi 12/25/2013: Return 0 if failed
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user