Skip to content

Calling original function from within hooked function calls hooked function once again #25

@Bonjour123

Description

@Bonjour123

I'm having a problem:

HookedFunction(hdc){
	DebugWrite("HookedFunction"+HtoString(hdc));
	return OriginalFunction(hdc);
}

Is writting:

 HookedFunction FFFFFFFF9C214357
 HookedFunction FFFFFFFF9C214357

I've noticed the problem when I got errors from the fact the Function was deleting an object that had already been deleted (because of the first call). This means that OriginalFunction is calling the HookedFunction once and then the "real"-untouched-original function.
Is it a bug or am I missing something ? This is not the first time I'm seing it, but last time I don't remember how the error disappeared.
I checked, there is no other calls to HookedFunction in my code, I 've cleaned and rebuilt my solution to be sure. And APIMonitor detects only one call to Function. And when I remove the call to OriginalFunction, I have only one "HookedFunction FFFFFFFF9C214357" instead of two in the debug file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions