Important: The information in this document is obsolete and should not be used for new development.
MyComponent
Here's how to declare a component function namedMyComponent
:
FUNCTION MyComponent (params: ComponentParameters; storage: Handle): ComponentResult;
params
- A component parameters record. The
what
field of the component parameters record indicates the action your component should perform. The parameters that the client invoked your function with are contained in theparams
field of the component parameters record. Your component can use theCallComponentFunction
orCallComponentFunctionWithStorage
routine to extract the parameters from this record.storage
- A handle to any memory that your component has associated with the connection. Typically, upon receiving an open request, your component allocates memory and uses the
SetComponentInstanceStorage
function to associate the allocated memory with the component connection.DESCRIPTION
When your component receives a request, it should perform the action specified in thewhat
field of the component parameters record. Your component should return a value of typeComponentResult
(a long integer). If your component does not return error information as its function result, it should indicate errors using theSetComponentInstanceError
procedure.SEE ALSO
For information on the component parameters record, see page 6-52. For information on writing a component, see "Creating Components" beginning on page 6-12.