This question would probably be better answered in the COM forum ... but here goes:
Is this an OCX, DLL, or EXE? Specifically, is it running in process or out of process? If it is running in process, you shouldn't have this problem ... but if you do, chances are it is due to holding onto the sound or video resources so that another instance cannot access them. If it is out of process, are you starting a new instance for each time it is instantiated, or are you trying to use the same instance?
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
I am using dll of the activex control.I give its classId in <object> in HtmlPage(IE).
So whenver i open the IE page,Activex control Dll is downloded and then player starts downloading cam file and plays it.
So if i again open IE page,a new instance is instantiated and new player opens.This player uses the same Dll and starts downloading the cam file.
The problem is,as soon as 2nd player opens,the first player is crashing.
Where is the class B?
If you have mistyped it , it should be like
class B:public A
Then In this case two VTABLEs will be created one for each class .
A VTABLE is created for each class containing a virtual function and for each of the class that is derived from it.
Somethings seem HARD to do, until we know how to do them. _AnShUmAn_
In this example only one vtable will be created which (ignoring RTTI) will contain a pointer to the single virtual function A::fun. The constructor (implicitly generated by the compiler) will set the vtable pointer in class A's instance data to point to this table. If B had overridden this method then there would be another vtable for class B and B's constructor would replace the vtable pointer (set in A) with a pointer to B's vtable.
Make a dialog box as you want. Now create this dialog using DoModal() in a thread function. Just initiate that thread when you want to show that dialog and kill the thread when you want to make the dialog disappeared.