audioOpenFromFileAddress = LocalHook.GetProcAddress("sfml-audio-2.dll", "?openFromFile@InputSoundFile@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z");
smfl_loadFromFile = Marshal.GetDelegateForFunctionPointer<SmflAudio2_SoundBuffer_loadFromFile>(audioOpenFromFileAddress);
unsafe bool SoundGetFromFileHook(void* filename)
{
return smfl_loadFromFile(filename);
}
Facing the following error, when trying to hook a dll.
Exception thrown at 0x0015ED74 in Target.exe: 0xC0000005: Access Violation executing location 0x0015ED74.
If there is a handler for this exception, the program may be safely continued.
What could be the possible reasons for this Access Violation error?
Hi, I'm having an issue with hooking some 64 bit apis which apparently have an unsupported far jump at the beginning. Is there any way around this limitation? Could EasyHook be extended (by whomever :)) to support this or is there some theoretical reason why supporting it would be infeasible?
@pheber yes it should be possible to extend EasyHook to support this, feel free to raise a feature request.
Completely unrelated I have another question: I have a function in ole32.dll (OleIsCurrentClipboard) which in turn calls another function (GetClipboardOwner) in user32.dll. I want to hook GetClipboardOwner and want the hook to also be called when OleIsCurrentClipboard calls it. API Monitor can hook and modify the underlying call, but when I create a LocalHook in EasyHook, it doesn't get called for the nested call to GetClipboardOwner from OleIsCurrentClipboard. Is there any way to achieve this with the current version of EasyHook?
@pheber what thread ACL do you have setup? I don't see any reason why your scenario wouldn't be supported by EasyHook.
@pheber what thread ACL do you have setup? I don't see any reason why your scenario wouldn't be supported by EasyHook.
We have an inclusive ACL for the current thread (SetInclusiveACL(new[] {0})) as API Monitor tells me the nested call is happening on the same thread. Is there anything else that might be wrong with my configuration or could API Monitor be wrong?