Solved

Accesing to a com object in a application from a webservice.

Posted on 2003-11-06
4
182 Views
Last Modified: 2010-04-05
I have developed a windows aplications, and this application contains a com object.
And I want to access from a webservice to this com object. The aplication and webservice have been developed with Delphi.

This is my problem: This application is just running in the sistem, and when the webservice tries to access to the com object of the aplication, instead of accessing the application wich is running, the webservices creates another application as process. And I want the webservice to connect with the application is running, because this application has the data the webservice needs.

My application is a form, with a com object with the default values that Delphi enviroment give me
and i create the com object from the webservice with the function :
int: IClassX
int := CoClassX.Create;

Thanks in advance.
0
Comment
Question by:joblato
4 Comments
 
LVL 6

Accepted Solution

by:
swift99 earned 250 total points
ID: 9699182
a COM object is always of type "Variant" in Delphi.

variant myObject;

begin

    myObject := CreateOLEObject ("classname");

   myObject.property := xxx;
   myProperty.someMethod (yyyy);

   myObject := unassigned;
end;
0
 
LVL 12

Expert Comment

by:andrewjb
ID: 9700218
I haven't got Delphi installed and to hand. What you're looking for is a 'singleton' option - possibly when you generate the Delphi COM object in the first place. There's a wizard, right? Maybe it's there? In c++ it's a macro you have to include, so it's not in the type library. Perhaps the help has indication. I'll try to peek next time I'm on a Delphi machine.
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi : could not find program, '...exe' 2 212
find a node in VST 2 78
QRReport  TQrmemo vertical stretching 1 55
Slow Restore if incremental backups using RDiff.exe 4 39
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question