com.esri.arcgis.framework
Interface IAppROT

All Superinterfaces:
Serializable
All Known Implementing Classes:
AppROT, IAppROTProxy

public interface IAppROT
extends Serializable

Provides access to members that manipulate the Esri application running object table, AppROT.

When To Use

Use the IAppROT interface to work with the Application Running Object Table (AppROT) for ESRI applications. This interface has methods for adding and removing instances of an application to/from the AppROT. Also using this interface you can get a count of how many application are registered with the AppROT or return a particular instance of an application.

Product Availability

Available with ArcGIS Desktop.


Method Summary
 int add(IApplication pApp)
          Adds an application reference to the running object table.
 int getCount()
          The count of application references within the running object table.
 IApplication getItem(int index)
          The application reference at the specified index in the running object table.
 void remove(int cookie)
          Removes an application reference from the running object table.
 

Method Detail

add

int add(IApplication pApp)
        throws IOException,
               AutomationException
Adds an application reference to the running object table.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
pApp - A reference to a com.esri.arcgis.framework.IApplication (in)
Returns:
The cookie
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IApplication

remove

void remove(int cookie)
            throws IOException,
                   AutomationException
Removes an application reference from the running object table.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
cookie - The cookie (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCount

int getCount()
             throws IOException,
                    AutomationException
The count of application references within the running object table.

Remarks

The following example uses AppROT's Count property to determine if any applications are already running. You would get m_app from the hook in ICommand::OnCreate().

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getItem

IApplication getItem(int index)
                     throws IOException,
                            AutomationException
The application reference at the specified index in the running object table.

Product Availability

Available with ArcGIS Desktop.

Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.framework.IApplication
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.