Important: The information in this document is obsolete and should not be used for new development.
OpenComponent
TheOpenComponent
function allows your application to gain access to the services provided by a component. Your application must open a component before it can call any component functions. You specify the component with a component identifier that your application previously obtained from theFindNextComponent
function.Alternatively, you can use the
OpenDefaultComponent
function, as previously described, to open a component without calling theFindNextComponent
function.Note that your application may maintain several connections to a single component, or it may have connections to several components at the same time.
FUNCTION OpenComponent (aComponent: Component): ComponentInstance;
aComponent
- A component identifier that specifies the component to open. Your application obtains this identifier from the
FindNextComponent
function. If your application registers a component, it can also obtain a component identifier from theRegisterComponent
orRegisterComponentResource
function.DESCRIPTION
TheOpenComponent
function returns a component instance. The returned component instance identifies your application's connection to the component. You must supply this component instance whenever you call the functions provided by the component. When you close the component, you must also supply this component instance to theCloseComponent
function.If it cannot open the specfied component, the
OpenComponent
function returns a function result ofNIL
.SEE ALSO
For examples of opening a specific component by using theFindNextComponent
andOpenComponent
functions, see Listing 6-1 on page 6-8 and Listing 6-2 on page 6-9, respectively. For a description of theFindNextComponent
function, see page 6-40.