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
whatfield of the component parameters record indicates the action your component should perform. The parameters that the client invoked your function with are contained in theparamsfield of the component parameters record. Your component can use theCallComponentFunctionorCallComponentFunctionWithStorageroutine 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
SetComponentInstanceStoragefunction to associate the allocated memory with the component connection.DESCRIPTION
When your component receives a request, it should perform the action specified in thewhatfield 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 theSetComponentInstanceErrorprocedure.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.