Link to home
Start Free TrialLog in
Avatar of ma8yr
ma8yr

asked on

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...

why????
Avatar of Madshi
Madshi

What is the detailed error message?
ASKER CERTIFIED SOLUTION
Avatar of rwilson032697
rwilson032697

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 ma8yr

ASKER

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.
Avatar of ma8yr

ASKER

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,

Mat