Disclosed are a hook re-entry prevention device and a recording medium, in which a program for executing the method thereof in a computer is recorded thereon. A state information management module sets or releases a state information flag which indicates whether a hook function is called. If the state information flag is set when the hook function is called, a re-entry prevention module determines that the calling of the hook function has been conducted from the inside of a hook layer and returns a value to a system layer. According to the present invention, an entry/breakaway layer which is independent from the hook layer functions in such a manner that the hook layer is safely isolated from the hook, thereby preventing hook re-entry caused by the callback of an original function of a lower function while a hook routine within the hook layer is performed during a dynamic API hooking.
展开▼