OpenComponent
Opens a connection to the component with the component identifier specified by your application.
Declaration
ComponentInstance OpenComponent(Component aComponent);Parameters
- aComponent:
The component you wish to open. Your application obtains this identifier from the 1516552 Findnextcomponent function. If your application registers a component, it can also obtain a component identifier from the
RegisterComponentfunction or theRegisterComponentResourcefunction.
Return Value
A component instance which 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 the CloseComponent function.
If it cannot open the specified component, the function returns NULL.
See the description of the ComponentInstance data type.
Discussion
Your application must open a component before it can call any component functions. To use this function, you must already have obtained a component identifier. Alternatively, you can use the OpenDefaultComponent function to open a component without calling FindNextComponent.
Note that your application may maintain several connections to a single component, or it may have connections to several components at the same time.