From b97ad5093bef1aa1bad477267e041b1754b26c4e Mon Sep 17 00:00:00 2001 From: _xeroxz Date: Thu, 27 May 2021 00:40:02 +0000 Subject: [PATCH] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 524fe0e..1cbb278 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,14 @@ FILE* hook_test(const char* filename, const char* open_type) hook::make_hook(&fopen, &hook_test); ``` +### Calling Original + +`hook::get_func` is templated so that you can pass a function pointer I.E `&fopen` and the returned pointer will be of that type. + +``` +return hook::get_func(&fopen)(filename, open_type); // returned value is of type: FILE* (*)(const char*, const char*); +``` + ### Disable Hook ```