Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Delphi web service and COM


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Dec 15, 2016 7:08 AM Last Post By: Rene Laursen
Rene Laursen

Posts: 15
Registered: 3/22/10
Delphi web service and COM  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 2, 2015 7:42 AM
We got a Delphi SOAP Server Application that is written in Delphi 2010, which is hosted within a IIS 7 server, running as a 32bit application.
Within the service we like to call a function from a C# compiled DLL that has been COM enabled, through the function CreateOleObject.

However calling CreateOleObject on this DLL results in following error:
The system cannot find the file specified, ProgID: "XXX.YYY.ZZZ"

The same call works when we run it from a Win32 desktop application written in Delphi.

In both cases the C# assembly shares the same directory with the Delphi application.

Does anyone have a clue what’s happening here?
Dan Barclay

Posts: 889
Registered: 11/9/03
Re: Delphi web service and COM  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 2, 2015 8:48 PM   in response to: Rene Laursen in response to: Rene Laursen
Rene Laursen wrote:
We got a Delphi SOAP Server Application that is written in Delphi 2010, which is hosted within a IIS 7 server, running as a 32bit application.
Within the service we like to call a function from a C# compiled DLL that has been COM enabled, through the function CreateOleObject.

However calling CreateOleObject on this DLL results in following error:
The system cannot find the file specified, ProgID: "XXX.YYY.ZZZ"

The same call works when we run it from a Win32 desktop application written in Delphi.

In both cases the C# assembly shares the same directory with the Delphi application.

Does anyone have a clue what’s happening here?

Are you calling CoInitialize/CoUnitialize?

If not, on entry to your service

CoInitialize(nil);

then before you exit the response

CoUnitialize;

I'm assuming you run the COM object from the same thread as the service. If not, you'll need to do that on the thread com uses.

Dan
Rene Laursen

Posts: 15
Registered: 3/22/10
Re: Delphi web service and COM  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 15, 2016 7:08 AM   in response to: Rene Laursen in response to: Rene Laursen
Old question. Not relevant anymore. Just realized question was marked unanswered.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02