Hi Experts:
I have a single thread ActiveX which has a Method_A and Event_A. The Event_A will be triggered after Method_A is called and does some work.
In my MFC application, I call the ActiveX Method_A in the source code of Button_1 (of the GUI) and wait for the Event_A in a message loop without returning to the MFC main GUI's message loop. However, I never get the Event_A from Method_A. It seems there is a dead loop...
User Profile
Collapse
-
Problems on ActiveX Messages / Events of VC++ 6.0 programming
-
thanks a lot. It does help. We used a message loop in our solution and now it works well.... -
This problem was solved yesterday. Our solution was almost the same as yours. Anyway, thanks a lot....Leave a comment:
-
Thanks for your explanation.
Actually we only solved 50% of our problem. The DLL and OCX were created with Visual C++ 6.0 but our application is being created with Delphi 7.0. The project requirement is that we have to create two threads in this application. We need to load the DLL, which will be interacting with the OCX, in the secondary thread (not the main thread). At the beginning, we failed. After we changed the registration...Leave a comment:
-
Thanks.
We changed two things: (1) register the OCX as "Apartment Threading"; (2) Create the second thread as "User Interface Thread" (previously it was Worker Thread).
Now we can load the DLL in the second thread and the DLL loads and initializes the OCX in the same thread without problem.
The question is: Why does it work in this way? Could you please comment on this issue? Thanks...Leave a comment:
-
Yes, the LoadLibrary() fails because this DLL interacts with an OCX. The OCX was initialized inside the DLL. The DLL was being loaded in a second thread.
Thanks....Leave a comment:
-
User Interface Thread in Delphi?
Does anyone know whether Delphi has a similar thread like the user interface thread in Visual C++ 6.0?
Thanks.
Rob -
How to load a DLL in a second thread?
Hi experts:
I have a DLL created under Visual C++ 6.0 and I have an OCX which is created under VS 2005 .NET. The DLL calls this OCX. The application has two threads. If I load the DLL in the main thread, there is not a problem. Because of architectural limitation, I can not load the DLL in the main thread but just the secondary thread. However, I failed loading the DLL dynamically in the secondary thread.
Anyone who...
No activity results to display
Show More
Leave a comment: