Here's a complex one ...
I've created an ActiveX DLL (in VB6) that has one method and one event it can raise. The method executes a function in a .bas module that can take up to about 20 seconds to complete it's work, and I'm looking for a way let the main program (which is executing the COM method) know what's going on.
The event is basically there to throw a new status message back to the parent app whenever a new message is available, so that's the route I've picked.
The problem is that since all the logic is in the .bas module, I do not have access to the event and therefore cannot raise it. For all intents and purposes, it looks like only methods in the Class (.cls file) are allowed to raise it.
I've thought of having a method in that class be solely responsible for raising this event, and then whenever my module functions want to send a status message back to the app, they'll call this new method and he will raise the exception. Problem is - I don't seem to have access to these methods. I tried passing them as callbacks, but that is not allowed either.
My code is turning into a bit of sphagetti at this point (more commented code than anything else), so I'm not sure how to proceed.
Any ideas/suggestions would be greatly appreciated.
I know some code samples (on my part) would be helpful. I'll try to clean this mess up a bit and post a snipet.
Thx in advance.
I've created an ActiveX DLL (in VB6) that has one method and one event it can raise. The method executes a function in a .bas module that can take up to about 20 seconds to complete it's work, and I'm looking for a way let the main program (which is executing the COM method) know what's going on.
The event is basically there to throw a new status message back to the parent app whenever a new message is available, so that's the route I've picked.
The problem is that since all the logic is in the .bas module, I do not have access to the event and therefore cannot raise it. For all intents and purposes, it looks like only methods in the Class (.cls file) are allowed to raise it.
I've thought of having a method in that class be solely responsible for raising this event, and then whenever my module functions want to send a status message back to the app, they'll call this new method and he will raise the exception. Problem is - I don't seem to have access to these methods. I tried passing them as callbacks, but that is not allowed either.
My code is turning into a bit of sphagetti at this point (more commented code than anything else), so I'm not sure how to proceed.
Any ideas/suggestions would be greatly appreciated.
I know some code samples (on my part) would be helpful. I'll try to clean this mess up a bit and post a snipet.
Thx in advance.