add functionality to the compiled OCX
We have an old OCX that is used in an old VB application. Both are currently not supported by the developer. and the source code is also not available. OCX contains a function that calculates the value, and now we have to change the calculation formula. Is there a way to override the method and create a news ocx with the same functionality?
Edit: ocx contains a date picker that uses mscomctl2.ocx, our formula is based on the selected date, so if we can find a solution to change the date after the selection, we can achieve our need.
source to share
You can decompile the OCX, use hooks, patch memory, or rewrite it entirely as pointed out in other comments and answers.
But first, I'll try to make a wrapper around your OCX. If your functionality replaces some functionality, or adds before or after, a wrapper (AKA Proxy template) is your best option.
An example of this technique is DLL files around dx3d, which uses OpenGL.
source to share