GetHostObject – PB Docs 2017

GetHostObject

PowerScript function

Description

Provides a reference to the context’s host object.

Host object support

Currently, host object support is implemented only in the window
ActiveX when running under Internet Explorer. In this situation
GetHostObject returns a reference to the IWebBrowserApp ActiveX
automation server object.

Applies to

ContextInformation objects

Syntax

Argument

Description

servicereference

Reference to the Context Information service
instance

hostobject

PowerObject into which the function places a
reference to the ActiveX automation server object

Return value

Integer.

Returns 1 if the function succeeds and -1 if an error occurs.

Usage

Call this function to obtain a reference to the context object
model. If running the window ActiveX under Internet Explorer 3.0 or
greater and hostobject is an uninstantiated OleObject variable, the
function returns a reference to an ActiveX automation server object, which
you can use to control the hosting browser. If host object support is not
available, the function returns -1 and hostobject is null.

Examples

This example calls the GetHostObject function. Ici_info is an
instance variable of type ContextInformation, which has been populated
using the GetContextService function; ole1 is an instance variable of type
OLEObject:

See also

GetCompanyName

GetName

GetShortName

GetVersionName


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