Solved

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

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

732 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