diff options
author | m417z <mmm.maltsev@gmail.com> | 2020-12-12 23:43:03 +0300 |
---|---|---|
committer | m417z <mmm.maltsev@gmail.com> | 2020-12-12 23:44:13 +0300 |
commit | 423d1e45af2ed2719a5c31e990e935ef301ed9c3 (patch) | |
tree | f375ff89679c62a8077462551927453744adf0b4 | |
parent | 248aad5d9b719e7db264d920837b96e34f9d553b (diff) |
Minor fixups
-rw-r--r-- | include/MinHook.h | 63 | ||||
-rw-r--r-- | src/buffer.c | 2 |
2 files changed, 32 insertions, 33 deletions
diff --git a/include/MinHook.h b/include/MinHook.h index 15c0a87..492d83f 100644 --- a/include/MinHook.h +++ b/include/MinHook.h @@ -99,45 +99,45 @@ extern "C" { // ONCE at the end of your program. MH_STATUS WINAPI MH_Uninitialize(VOID); - // Creates a Hook for the specified target function, in disabled state. + // Creates a hook for the specified target function, in disabled state. // Parameters: - // pTarget [in] A pointer to the target function, which will be - // overridden by the detour function. - // pDetour [in] A pointer to the detour function, which will override - // the target function. - // ppOriginal [out] A pointer to the trampoline function, which will be - // used to call the original target function. - // This parameter can be NULL. + // pTarget [in] A pointer to the target function, which will be + // overridden by the detour function. + // pDetour [in] A pointer to the detour function, which will override + // the target function. + // ppOriginal [out] A pointer to the trampoline function, which will be + // used to call the original target function. + // This parameter can be NULL. MH_STATUS WINAPI MH_CreateHook(LPVOID pTarget, LPVOID pDetour, LPVOID *ppOriginal); - // Creates a Hook for the specified API function, in disabled state. + // Creates a hook for the specified API function, in disabled state. // Parameters: - // pszModule [in] A pointer to the loaded module name which contains the - // target function. - // pszTarget [in] A pointer to the target function name, which will be - // overridden by the detour function. - // pDetour [in] A pointer to the detour function, which will override - // the target function. - // ppOriginal [out] A pointer to the trampoline function, which will be - // used to call the original target function. - // This parameter can be NULL. + // pszModule [in] A pointer to the loaded module name which contains the + // target function. + // pszProcName [in] A pointer to the target function name, which will be + // overridden by the detour function. + // pDetour [in] A pointer to the detour function, which will override + // the target function. + // ppOriginal [out] A pointer to the trampoline function, which will be + // used to call the original target function. + // This parameter can be NULL. MH_STATUS WINAPI MH_CreateHookApi( LPCWSTR pszModule, LPCSTR pszProcName, LPVOID pDetour, LPVOID *ppOriginal); - // Creates a Hook for the specified API function, in disabled state. + // Creates a hook for the specified API function, in disabled state. // Parameters: - // pszModule [in] A pointer to the loaded module name which contains the - // target function. - // pszTarget [in] A pointer to the target function name, which will be - // overridden by the detour function. - // pDetour [in] A pointer to the detour function, which will override - // the target function. - // ppOriginal [out] A pointer to the trampoline function, which will be - // used to call the original target function. - // This parameter can be NULL. - // ppTarget [out] A pointer to the target function, which will be used - // with other functions. - // This parameter can be NULL. + // pszModule [in] A pointer to the loaded module name which contains the + // target function. + // pszProcName [in] A pointer to the target function name, which will be + // overridden by the detour function. + // pDetour [in] A pointer to the detour function, which will override + // the target function. + // ppOriginal [out] A pointer to the trampoline function, which will be + // used to call the original target function. + // This parameter can be NULL. + // ppTarget [out] A pointer to the target function, which will be used + // with other functions. + // This parameter can be NULL. MH_STATUS WINAPI MH_CreateHookApiEx( LPCWSTR pszModule, LPCSTR pszProcName, LPVOID pDetour, LPVOID *ppOriginal, LPVOID *ppTarget); @@ -183,4 +183,3 @@ extern "C" { #ifdef __cplusplus } #endif - diff --git a/src/buffer.c b/src/buffer.c index 8f9fbce..55412b0 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -276,7 +276,7 @@ VOID FreeBuffer(LPVOID pBuffer) PMEMORY_SLOT pSlot = (PMEMORY_SLOT)pBuffer; #ifdef _DEBUG // Clear the released slot for debugging. - memset(pSlot, 0x00, sizeof(*pSlot)); + memset(pSlot, 0x00, sizeof(MEMORY_SLOT)); #endif // Restore the released slot to the list. pSlot->pNext = pBlock->pFree; |