ConnectToNewRemoteObject – PB Docs 125

ConnectToNewRemoteObject PowerScript function

Description

Creates a new OLE object in the specified remote server application
(if security on the server allows it) and associates the new object
with a PowerBuilder OLEObject variable. ConnectToNewRemoteObject starts
the server application if necessary.

Controls

OLEObject objects

Syntax

Argument

Description

oleobject

The name of an OLEObject variable which
you want to connect to an OLE object. You cannot specify an OLEObject
that is the Object property of an OLE control.

hostname

A string whose value is the name of the
remote host where the COM server is located.

classname

A string whose value is the name of an
OLE class, which identifies an OLE server application and a type
of object that the server can manipulate via OLE.

Return Values

Integer. Returns 0 if it succeeds and
one of the following negative values if an error occurs:

  •   -1 Invalid
    call: the argument is the Object property of a control

  •   -2 Class name not found

  •   -3 Object could not be created

  •   -4 Could not connect to object

  •   -9 Other error

  • -10 Feature not supported on this platform

  • -11 Server name is invalid

  • -12 Server does not support operation

  • -13 Access to remote host denied

  • -14 Server unavailable

  • -15 COM+ is not loaded on this
    computer

  • -16 Invalid Call: this function not applicable
    to OLETxnObject

Usage

The OLEObject variable is used for OLE automation, in which
the PowerBuilder application asks the server application to manipulate
the OLE object programmatically. ConnectToNewRemoteObject can
only be used with servers that support remote activation.

For more information about OLE automation,
see ConnectToObject. For information about connecting
to objects on a remote host, see ConnectToRemoteObject.

Examples

This example creates an OLEObject variable and calls ConnectToNewRemoteObject to
create and connect to a new Excel object on a remote host named
ulysses:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x