Solved

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

Posted on 2003-11-06
4
180 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

831 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