Re: hook virtual destructor
I have done some disassembly, and according to
http://www.openrce.org/articles/full_view/23, MSVC places a "scalar deleting destructor function" into the vtable instead of the destructor. It has this prototype: Code:
virtual void * A::'scalar deleting destructor'(uint flags) { Code:
SH_DECL_MANUALHOOK1_void(TestClass_Vdtor, 0, 0, 0, unsigned int); Works for me at least, though I don't know if there are cases where it doesn't do this. You can ignore the flags parameter. I don't know what GCC does for now, I'll look at that over the weekend :) Greetings, PM EDIT: 1) As BAIL says, the destructor really has to be virtual! 2) I'd like to strongly suggest against superceding the original destructor call. |
All times are GMT -4. The time now is 19:51. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.