Version 6.3.8 für Windows
 —  Extending Natural Studio with Plug-ins  —

INatAutoApplication

This document covers the following topics:


Purpose

An application available on the current application server. Applications and the application server are only available with Natural Single Point of Development. See also Remote Development Using SPoD.

Top of page

Properties

The following properties are available:

Parent

Used to navigate to the parent interface of this interface.

Natural Data Format Variant Type Remark
HANDLE OF OBJECT VT_DISPATCH (INatAutoApplications) Get only

Studio

Used to navigate to the root interface.

Natural Data Format Variant Type Remark
HANDLE OF OBJECT VT_DISPATCH (INatAutoStudio) Get only

BaseApplication

TRUE if this is a base application.

Natural Data Format Variant Type Remark
L VT_BOOL Get only

MainframeApplication

TRUE if this is a base application on a mainframe platform. FALSE if this is a base application on an Open Systems platform or a compound application.

Natural Data Format Variant Type Remark
L VT_BOOL Get only

Mapped

TRUE if this application is mapped into the application workspace.

Natural Data Format Variant Type Remark
L VT_BOOL Get only

Connected

TRUE if

Natural Data Format Variant Type Remark
L VT_BOOL Get only

Active

TRUE if

Natural Data Format Variant Type Remark
L VT_BOOL Get only

Name

Name of the application.

Natural Data Format Variant Type Remark
A VT_BSTR  

Description

The description of the application.

Natural Data Format Variant Type Remark
A VT_BSTR  

Host

The host name of the development server. Returns an empty string for a compound application.

Natural Data Format Variant Type Remark
A VT_BSTR Get only

Port

The port number of the development server. Returns 0 for compound applications.

Natural Data Format Variant Type Remark
I4 VT_I4 Get only

Profile

The profile (mainframe) or NATPARM parameter file (Open Systems) under which the development server is running. Returns an empty string for compound applications.

Natural Data Format Variant Type Remark
A VT_BSTR Get only

ProfileDBnr

The profile database number of the development server. Returns 0 for compound applications and for base applications running on Open Systems platforms.

Natural Data Format Variant Type Remark
I4 VT_I4 Get only

ProfileFnr

The profile file number of the development server. Returns 0 for compound applications and for base applications running on Open Systems platforms.

Natural Data Format Variant Type Remark
I4 VT_I4 Get only

UserId

The user ID under which a base applicaton is mapped. Returns an empty string for compound applications.

Natural Data Format Variant Type Remark
A VT_BSTR Get only

MainLibrary

The main library of the application. Returns an empty string for compound applications and for base applications for which no main library has been defined.

Natural Data Format Variant Type Remark
A VT_BSTR  

HasLinkedObjects

TRUE if a base application has linked objects. Always FALSE for compound applications.

Natural Data Format Variant Type Remark
A VT_BSTR Get only

LinkedObjects

Returns the list of objects linked to a base application, formatted as an XML document according to the DTD shown below. Returns an empty document for compound applications.

Natural Data Format Variant Type Remark
A VT_BSTR Get only

Document Type Description

<?xml version="1.0"?>
<!ELEMENT aobjects (ccount, aobject*)>
<!ELEMENT ccount (#PCDATA)>
<!ELEMENT aobject (atype, akey)>
<!ELEMENT atype (#PCDATA)>
<!ELEMENT akey (#PCDATA)>
Element Meaning
ccount The number of objects in the list.
atype The type of the object. This must be one of the predefined development object types that is allowed to be used as entry object of an application.
akey The key that identifies the object within its type.

LinkedEntries

Returns the list of entry objects linked to a base application, formatted as an XML document according to the DTD shown below. Returns an empty document for compound applications.

Natural Data Format Variant Type Remark
A VT_BSTR Get only

Document Type Description

<?xml version="1.0"?>
<!ELEMENT aobjects (ccount, aobject*)>
<!ELEMENT ccount (#PCDATA)>
<!ELEMENT aobject (atype, akey)>
<!ELEMENT atype (#PCDATA)>
<!ELEMENT akey (#PCDATA)>
Element Meaning
ccount The number of objects in the list.
atype The type of the object. This must be one of the predefined development object types that is allowed to be used as entry object of an application.
akey The key that identifies the object within its type.

Environment

Returns the Natural environment of a base application. Returns NULL-HANDLE for compound applications.

Natural Data Format Variant Type Remark
A VT_BSTR Get only

LinkedApplications

Returns the collection of applications linked to a compound application. Returns NULL-HANDLE for base applications.

Natural Data Format Variant Type Remark
A VT_BSTR Get only

Top of page

Methods

The following methods are available:

Map

Maps an application into the application workspace.

Parameters:

Name Natural Data Format Variant Type Remark
UserID A VT_BSTR Optional
Password A VT_BSTR Optional
ProfilePassword A VT_BSTR Optional
Quiet L VT_BOOL Optional
IgnoreWarnings L VT_BOOL Optional
UserID

The user ID under which the application will be mapped.This parameter is ignored for compound applications

Password

The password of the user ID under which the application will be mapped. This parameter is ignored for compound applications.

ProfilePassword

The password for the profile which has been defined for the application. This parameter is ignored for compound applications.

Quiet

If set to FALSE or not specified, the Map Application dialog is shown if the session cannot be started with the given parameters.The dialog is then preset with the given parameters.

If set to TRUE, the Map Application dialog is not shown.

IgnoreWarnings

If set to FALSE or not specified, warnings that occur during mapping are treated like errors.

If set to TRUE, warnings are ignored.

Unmap

Unmaps the application.

If this application was the active one, the previously active application gets activated.

Connect

Connects an application to a development server session.

This method is not applicable to compound applications or base applications that are already connected.

Parameters

Name Natural Data Format Variant Type Remark
UserID A VT_BSTR Optional
Password A VT_BSTR Optional
ProfilePassword A VT_BSTR Optional
Quiet L VT_BOOL Optional
IgnoreWarnings L VT_BOOL Optional
UserID

The user ID under which the application will be connected.

Password

The password of the user ID under which the application will be connected.

ProfilePassword

The password of the profile which is defined for the application.

Quiet

If set to FALSE or not specified, the Map Application dialog is shown if the session cannot be started with the given parameters. The dialog is then preset with the given parameters.

If set to TRUE, the Map Application dialog is not shown.

IgnoreWarnings

If set to FALSE or not specified, warnings that occur during connecting are treated like errors.

If set to TRUE, warnings are ignored.

Disconnect

Disconnects the application (closes the development server session).

If this application was the active one, the previously active application gets activated.

This method is not applicable to compound applications or base application that are already disconnected.

Activate

Makes this application the active one.

An application cannot explicitly be deactivated. An application is implicitly deactivated when another application is activated.

This method is not applicable to compound applications or base application that are disconnected or not mapped.

Remove

Removes the application from the collection (effectively deletes it from the application server).

If this application was the active one, the previously active application gets activated.

LinkObject

Links the specified development object to the application. Applicable only to base applications.

Parameters

Name Natural Data Format Variant Type Remark
Type I4 VT_I4  
Object A VT_BSTR  
Library A VT_BSTR Optional
Type

The type numbers used here correspond to the type numbers described in the section Predefined Node Types.

Object

The name of the object.

Library

The library containing the object. This parameter is not applicable to DDMs.

UnlinkObject

Unlinks the specified object from the application. Applicable only to base applications.

Parameters

Name Natural Data Format Variant Type Remark
Type I4 VT_I4  
Object A VT_BSTR  
Library A VT_BSTR Optional
Type

The type numbers used here correspond to the type numbers described in the section Predefined Node Types.

Object

The name of the object.

Library

The library containing the object. This parameter is not applicable to DDMs.

LinkEntry

Links the specified entry point to the application. Applicable only to base applications.

Parameters

Name Natural Data Format Variant Type Remark
Type I4 VT_I4  
Object A VT_BSTR  
Library A VT_BSTR  
Type

The type numbers used here correspond to the type numbers described in the section Predefined Node Types.

Object

The name of the entry point object.

Library

The library containing the entry point object.

UnlinkEntry

Unlinks the specified entry point object from the application. Applicable only to base applications.

Parameters

Name Natural Data Format Variant Type Remark
Type I4 VT_I4  
Object A VT_BSTR  
Library A VT_BSTR  
Type

The type numbers used here correspond to the type numbers described in the section Predefined Node Types.

Object

The name of the entry point object.

Library

The library containing the entry point object.

Top of page