Главная страница | назад





Article #17509: ActiveX conrols in a DLL

 Question and Answer Database
FAQ2509C.txt ActiveX conrols in a DLL
Category :ActiveX
Platform :All
Product :C++Builder 3.x
Question:
I tried to use an ActiveX Control on a form in a DLL. No problems
occurred in BCB 1.0 but BCB 3.0 gives the following error while
running:
"Project raised exception class EOleSysError with message
'CoInitialize has not been called.' "
This problem even occurrs when using the ActiveX delivered with
BCB 3.0.
Answer:
Try the following:
- Add '#include ' at the top of you application's main
.CPP file (the one with WinMain)
- Declare a global instance of the TInitOle class:
#include 
TInitOle initOle;
7/2/98 10:32:32 AM

Last Modified: 01-SEP-99