aboutsummaryrefslogtreecommitdiff
path: root/subhook.h
diff options
context:
space:
mode:
Diffstat (limited to 'subhook.h')
-rw-r--r--subhook.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/subhook.h b/subhook.h
index 7689adf..d37205f 100644
--- a/subhook.h
+++ b/subhook.h
@@ -85,8 +85,6 @@
#endif
#endif
-#define SUBHOOK_FLAG_INSTALLED 0x01
-
SUBHOOK_EXPORT struct subhook *SUBHOOK_API subhook_new();
SUBHOOK_EXPORT void SUBHOOK_API subhook_free(struct subhook *hook);
@@ -100,16 +98,12 @@ SUBHOOK_EXPORT void *SUBHOOK_API subhook_get_dst(struct subhook *hook);
SUBHOOK_EXPORT int SUBHOOK_API subhook_install(struct subhook *hook);
SUBHOOK_EXPORT int SUBHOOK_API subhook_remove(struct subhook *hook);
-SUBHOOK_EXPORT int SUBHOOK_API subhook_get_flags(struct subhook *hook);
-SUBHOOK_EXPORT void SUBHOOK_API subhook_set_flags(struct subhook *hook, int flags);
+/* Checks whether a hook has been installed. */
+SUBHOOK_EXPORT int SUBHOOK_API subhook_is_installed(struct subhook *hook);
/* Sets read+write+execute permissions for memory region. */
SUBHOOK_EXPORT void *SUBHOOK_API subhook_unprotect(void *address, size_t size);
-static int subhook_is_installed(struct subhook *hook) {
- return (subhook_get_flags(hook) & SUBHOOK_FLAG_INSTALLED) != 0;
-}
-
/* Reads hook destination address from code.
*
* This is useful when you don't know the address or want to check