diff options
Diffstat (limited to 'chrome_frame/vtable_patch_manager.h')
-rw-r--r-- | chrome_frame/vtable_patch_manager.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome_frame/vtable_patch_manager.h b/chrome_frame/vtable_patch_manager.h index f326def..acf3cdb 100644 --- a/chrome_frame/vtable_patch_manager.h +++ b/chrome_frame/vtable_patch_manager.h @@ -12,9 +12,20 @@ #include "base/lock.h" struct FunctionStub; + // This namespace provides methods to patch VTable methods of COM interfaces. namespace vtable_patch { +// Internal implementation, exposed only for testing. +namespace internal { + +// Replaces *entry with new_proc iff *entry is curr_proc. +// Returns true iff *entry was rewritten. +// Note: does not crash on access violation. +bool ReplaceFunctionPointer(void** entry, void* new_proc, void* curr_proc); + +} // namespace internal + // This structure represents information about one VTable method. // We allocate an array of these structures per VTable that we patch to // remember the original method. We also use this structure to actually |