Hi,
I was looking at Apoc's code (WhiteMagic) and I am wondering what the hell is patching and what is the difference to detouring? I found this class PatcherManager and it has almost the same methods as DetourManager, these are Apply and Remove and they basically replace some original addresses with your own.
Code:
/// <summary>
/// Removes this Patch from memory. (Reverts the bytes back to their originals.)
/// </summary>
/// <returns></returns>
public bool Remove()
{
if (_win32.WriteBytes(_address, _originalBytes) == _originalBytes.Length)
{
IsApplied = false;
return true;
}
return false;
}
/// <summary>
/// Applies this Patch to memory. (Writes new bytes to memory)
/// </summary>
/// <returns></returns>
public bool Apply()
{
if (_win32.WriteBytes(_address, _patchBytes) == _patchBytes.Length)
{
IsApplied = true;
return true;
}
return false;
}
http://www.mmowned.com/forums/wow-me...ml#post1680184