I am trying to do something in VB6 that perhaps would be better done in C++ (which I am trying to avoid due to incompetence).
I have a dll that interacts with the sound card and returns events through windows messages. To set up the subclass to intercept the messages I need to use the AddressOf operator which requires the function to be in a module. That function then calls other functions back on the form which is accessed by call form1.myProc(). This works fine in a regular VB EXE program.
But trying to do the same thing when making an activeX control is problematic. The control code on "UserControl1" can call subs in the module but I can't get the sub on the module (which must be there to get AddressOf to work) to return the call. Call UserControl1.myProc() doesn't work from the module.
Is there another way or is there some other construct needed to allow procedures in the module to call procedures in the ActiveX control or do modules have a limited role in activeX or possibly can the windows messaging scheme be handled differently within an ActiveX control?
Thanks
I have a dll that interacts with the sound card and returns events through windows messages. To set up the subclass to intercept the messages I need to use the AddressOf operator which requires the function to be in a module. That function then calls other functions back on the form which is accessed by call form1.myProc(). This works fine in a regular VB EXE program.
But trying to do the same thing when making an activeX control is problematic. The control code on "UserControl1" can call subs in the module but I can't get the sub on the module (which must be there to get AddressOf to work) to return the call. Call UserControl1.myProc() doesn't work from the module.
Is there another way or is there some other construct needed to allow procedures in the module to call procedures in the ActiveX control or do modules have a limited role in activeX or possibly can the windows messaging scheme be handled differently within an ActiveX control?
Thanks