Solved

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

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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 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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now