I want to inject my own DLL into a VB6 process, to override the default click behavior of a button. The goal, to call my method, and never call the orig VB6 code in the click event handler.
It appears the Microsoft Detours API can help. The samples show me how-to inject my DLL, into the running process; but I'm not sure the function I should be detouring.
Idealy, I would love a .Net wrapper for the Detours API.
Any help would be appreciated.
No need to use Detours for this task, check out: Subclass External Programs done for you
This C++/ActiveX solution will allow you to subclass windows outside your current process in VB6. I am less familiar with .NET, but I do know that the commercial solution Desaware SpyWorks for .NET also provides this functionality. Do your homework first, there's probably a free solution out there, and if so post back and let us know. :)