Link to home
Start Free TrialLog in
Avatar of ali_elmahi
ali_elmahi

asked on

'CoInitialize has not been called ' Exception Message

I work with C++ Builder 5
I have Problem using AdO Connection in Thread
On i try to open ADOConnection in side my thread i received this exception message
'CoInitialize has not been called'
how can i solved this problem ...
waiting for help
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jhance
jhance

Note that you must call CoInitializeEx() from EVERY THREAD that is going to use COM.
By the way, to quote MSDN from the CoInitialize() page:

"New applications should call CoInitializeEx instead of CoInitialize."