I've only done it with COM objects, not plain C++ objects - I'm not sure if the virtual table is defined in the same way.
Also, I haven't managed to resolve the problem I posted above with hooking the methods from the managed API.
But anyway, the code is something like this - you need Managed C++ for it :
IntPtr vTable = Marshal::ReadIntPtr(retComObj);
IntPtr addFilterAddress = Marshal::ReadIntPtr(vTable, 3 * IntPtr::Size);
realAddFilter = (type_RealAddFilter)addFilterAddress.ToPointer();
LocalHook::CreateUnmanaged(IntPtr(realAddFilter), IntPtr((void*)&DetouredAddFilter), IntPtr((void*)&realAddFilter));
type_RealAddFilter is defined as a normal C++ function but with the first argument being the object itself.
I am in the middle of doing this completely unmanaged with the EasyHook unmanaged API - I think it'll work better.