Solved

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

Posted on 2003-11-06
4
184 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

707 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