Fix pointers

This commit is contained in:
FusixGit 2014-12-09 06:52:51 +03:00
parent 539bdbfc52
commit c9a393fa7d
1 changed files with 6 additions and 12 deletions

View File

@ -714,10 +714,8 @@ void Hook()
Bool = IniFile->GetVariableInSection(Sect, "LocalOnlyCode.x86", &PatchName); Bool = IniFile->GetVariableInSection(Sect, "LocalOnlyCode.x86", &PatchName);
#endif #endif
if (Bool) Bool = IniFile->GetVariableInSection("PatchCodes", PatchName.Value, &Patch); if (Bool) Bool = IniFile->GetVariableInSection("PatchCodes", PatchName.Value, &Patch);
// Patch.Value is char
// WriteProcessMemory uses LPCVOID lpBuffer, so... if (Bool && (SignPtr > TermSrvBase)) WriteProcessMemory(GetCurrentProcess(), (LPVOID)SignPtr, &Patch.Value, Patch.ArraySize, &bw);
// maybe &Patch.Value ?
if (Bool && (SignPtr > TermSrvBase)) WriteProcessMemory(GetCurrentProcess(), (LPVOID)SignPtr, Patch.Value, Patch.ArraySize, &bw);
} }
#ifdef _WIN64 #ifdef _WIN64
if (!(IniFile->GetVariableInSection(Sect, "SingleUserPatch.x64", &Bool))) Bool = false; if (!(IniFile->GetVariableInSection(Sect, "SingleUserPatch.x64", &Bool))) Bool = false;
@ -736,10 +734,8 @@ void Hook()
Bool = IniFile->GetVariableInSection(Sect, "SingleUserCode.x86", &PatchName); Bool = IniFile->GetVariableInSection(Sect, "SingleUserCode.x86", &PatchName);
#endif #endif
if (Bool) Bool = IniFile->GetVariableInSection("PatchCodes", PatchName.Value, &Patch); if (Bool) Bool = IniFile->GetVariableInSection("PatchCodes", PatchName.Value, &Patch);
// Patch.Value is char
// WriteProcessMemory uses LPCVOID lpBuffer, so... if (Bool && (SignPtr > TermSrvBase)) WriteProcessMemory(GetCurrentProcess(), (LPVOID)SignPtr, &Patch.Value, Patch.ArraySize, &bw);
// maybe &Patch.Value ?
if (Bool && (SignPtr > TermSrvBase)) WriteProcessMemory(GetCurrentProcess(), (LPVOID)SignPtr, Patch.Value, Patch.ArraySize, &bw);
} }
#ifdef _WIN64 #ifdef _WIN64
if (!(IniFile->GetVariableInSection(Sect, "DefPolicyPatch.x64", &Bool))) Bool = false; if (!(IniFile->GetVariableInSection(Sect, "DefPolicyPatch.x64", &Bool))) Bool = false;
@ -758,10 +754,8 @@ void Hook()
Bool = IniFile->GetVariableInSection(Sect, "DefPolicyCode.x86", &PatchName); Bool = IniFile->GetVariableInSection(Sect, "DefPolicyCode.x86", &PatchName);
#endif #endif
if (Bool) Bool = IniFile->GetVariableInSection("PatchCodes", PatchName.Value, &Patch); if (Bool) Bool = IniFile->GetVariableInSection("PatchCodes", PatchName.Value, &Patch);
// Patch.Value is char
// WriteProcessMemory uses LPCVOID lpBuffer, so... if (Bool && (SignPtr > TermSrvBase)) WriteProcessMemory(GetCurrentProcess(), (LPVOID)SignPtr, &Patch.Value, Patch.ArraySize, &bw);
// maybe &Patch.Value ?
if (Bool && (SignPtr > TermSrvBase)) WriteProcessMemory(GetCurrentProcess(), (LPVOID)SignPtr, Patch.Value, Patch.ArraySize, &bw);
} }
#ifdef _WIN64 #ifdef _WIN64
if (!(IniFile->GetVariableInSection(Sect, "SLPolicyInternal.x64", &Bool))) Bool = false; if (!(IniFile->GetVariableInSection(Sect, "SLPolicyInternal.x64", &Bool))) Bool = false;