OLE Exception when calling an external COM exe from a Web Server Project

I have a database at the back-end,
a VB COM exe accessing the DB, and a delphi Web Server Project calling the VB COM object (by importing type lib), and a web front-end calling the delphi app.
I made a dummy delphi program to call the VB app to get data from the DB and it worked fine, but now when I use a Web Server Project and call from IExplorer, it returns with an OLE Object creation error.
It can no longer create the object defined within the Type Library...

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What is the detailed error message?
You could try adding a call to COInitialize(Nil); in the initialization section of an appropriate unit. The Web Server Project _may_ not call this automatically.



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ma8yrAuthor Commented:
I found a solution to this the night I put this question on the web,

rWilson is correct, borland put the coInitialize call in the application.initialize section of all projects, but for whatever reason they missed it out of the web server project, so the answer to this problem is to add the coInitialize call before trying to create you're COM class.
ma8yrAuthor Commented:
You have the right answer so I feel obliged to give you some points even though I found the answer before I read you're comment, so here you go.

ThanX anyway,

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.