You can save the function pointer to the original copy of OLEOBJECTVTBL and call the original OLECLI.DLL functions. For example, you may want to create your own DllDraw function, but you may still want to call the original Activate function. On the other hand, you might want to call the original GetData function from inside a new DllGetData function. For each function you can modify, you have the choice to substitute a new function, add functionality to the old function, or use the original function.
Figure 34 shows three options for a single object handler:
The DllDraw function completely takes over from the original Draw function.
The DllGetData function does some task and then lets the original GetData perform its tasks.
The Activate function is done by the original function in OLECLI.DLL.
When you save the pointer to the VTBL, the VTBL pointers point to the original OLECLI.DLL functions; any function pointer you do not change to point to your new functions will point back to the functions in OLECLI.DLL.
Figure 34. Object handler function options