Delphi web service and COM

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?
0
Rene
3/2/2015 3:42:05 PM
embarcadero.delphi.webservices 976 articles. 0 followers. Follow

1 Replies
903 Views

Similar Articles

[PageSpeed] 2

> {quote:title=Rene Laursen wrote:}{quote}
> 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
0
Dan
3/3/2015 4:48:19 AM
Reply:

Web resources about - Delphi web service and COM - embarcadero.delphi.webservices

Public Broadcasting Service - Wikipedia, the free encyclopedia
... such as PBS NewsHour , Masterpiece , and Frontline . Since the mid-2000s, Roper polls commissioned by PBS have consistently placed the service ...

Public service retirees set for pension shock
Pension cut a "bull in a China policy shop", say retirees.

New airfield to boost public service in South China Sea: Chinese official
New airfield to boost public service in South China Sea: Chinese official

Researchers uncover JavaScript-based ransomware-as-service
... previous ransomware variants in two key ways: it was coded using JavaScript, and it’s being offered to would-be cybercriminals as a paid service. ...

Self-driving taxi service program already in testing in South Korea
It’ll be a while until we’ll be able to rent self-driving cars or hail driverless taxis, but it’s more than clear that the self-driving car is ...

Competition among cyber criminals is so fierce that they now have customer support, service guarantees ...
... by anyone with a little cyber know-how , they are competing with each other for the business of the low-level criminals that use their services. ...

SES Expands Government Services Portfolio in Canada
SES S.A. (NYSE Paris:SESG) (LuxX:SESG) announced today that the Kativik Regional Government in Canada has awarded SES a contract for the delivery ...

China shares rally after services sector data
China's markets, closely watched after a wild ride this week, rallied after services sector data showed expansion, but other Asian markets were ...

Sky Chooses Security Software and Services Solutions From Cisco for Next ...
Sky Chooses Security Software and Services Solutions From Cisco for Next ... CNNMoney CES 2016 Sky, Europe's leading entertainment company ...

Comcast's 2 Gbps Service Arrives in Minneapolis -
Comcast continues to deploy the company's ultra-fast 2 Gbps fiber to the home service, this week turning the service in in parts of Minneapolis. ...

Resources last updated: 1/6/2016 6:18:50 AM