notidaho
notidaho

Reputation: 588

Launch/access applications remotely in Delphi

My Delphi 5 Windows software can link to my Point of Sale (POS.exe) application after creating an OLE object when the form is created:

procedure TForm1.SetupEposLink;
begin
  EposServer := CreateOLEObject('POS.Server');
  {Hide the Server}
  if HideLmPos then
    EposServer.InVisible;
end;

At the users request, items are then passed to it through methods such as:

EposServer.SetMemberDetails(FieldByName('Name').AsString,FieldByName('Member Id').AsString);

EposServer.SellItemAsString(ActCode,'1',FloatToStr(Price),BDate,BTime,RetValue);

EposServer.IsServerOn(Answer1);

EposServer.Visible;

This has never been an issue until now when the POS is installed on a terminal server for remote access, and the process simply times out when attempting to call one of these methods.

Will the application specifically need to be installed locally or is there a getaround I can used to create a better link to the location of the application?

many thanks

Upvotes: 2

Views: 706

Answers (1)

Warren  P
Warren P

Reputation: 68872

You may need to configure DCOM. Check out the paragraph titled "Configuring DCOM on windows xp and windows server 2003" here.

I am not sure if DCOM can remotely launch your service, but it needs to be registered in both places, and you use DCOM Config to specify the machine that hosts the service.

Secondly you might want to check out the help for ComObj.CreateRemoteComObject,

Upvotes: 2

Related Questions