Important: The information in this document is obsolete and should not be used for new development.
OpenComponent
TheOpenComponentfunction 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 theFindNextComponentfunction.Alternatively, you can use the
OpenDefaultComponentfunction, as previously described, to open a component without calling theFindNextComponentfunction.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
FindNextComponentfunction. If your application registers a component, it can also obtain a component identifier from theRegisterComponentorRegisterComponentResourcefunction.DESCRIPTION
TheOpenComponentfunction 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 theCloseComponentfunction.If it cannot open the specfied component, the
OpenComponentfunction returns a function result ofNIL.SEE ALSO
For examples of opening a specific component by using theFindNextComponentandOpenComponentfunctions, see Listing 6-1 on page 6-8 and Listing 6-2 on page 6-9, respectively. For a description of theFindNextComponentfunction, see page 6-40.
 
  
  
 