1 Attachment(s)
[VB6] Friend Callback Procedures
The attached project below demonstrates how to set up Friend procedures inside object modules (FRM, CLS, CTL, etc.) for Windows API callback purposes. The goal of such a technique is to keep as much code as possible within the object module in order to make it as self-contained as possible and also to reduce memory consumption once the object module is unloaded. There is a possibly significant disadvantage to this approach however - the overhead of redirecting calls to procedures in an object module naturally imposes some performance penalty.
(This code has been inspired by the following post: Re: Problem with Public UDT: 'Only public user defined types......)
1 Attachment(s)
Re: [VB6] Friend Callback Procedures
The updated demo project below reorganizes most of the code and also now includes a Hook callback function inside the Class module.