Special Considerations for Visual Basic Pipeline Components
Visual Basic supports the creation of apartment-threaded components, but does not support the creation of free-threaded components. Consequently, if you use Visual Basic to create components for either the Order Processing pipeline (OPP) or Content Selection Framework (CSF) pipeline architectures, you should be aware of certain limitations.
If you include the component in a pipeline you load using the OrderPipeline object, and if you make this object globally available, your component will work as expected. This is because the OrderPipeline object checks the threading model of each component at load-time to determine how to marshal the data of that component.
For performance reasons, however, the MtsOrderPipeline or MtsTxOrderPipeline objects do not perform this checking because these objects are generally created on a per-page basis. The MtsOrderPipeline or MtsTxOrderPipeline objects that you create on a per-page basis have no bearing on the proper functioning of Visual Basic pipeline components.
However, including such components in an MtsOrderPipeline or MtsTxOrderPipeline object that you make globally available (through the Application object, for example) is unsupported behavior. If you include a Visual Basic component in a globally available pipeline object instance, you must use the OrderPipeline object to load and execute that pipeline.
Always mark Visual Basic objects as Retain in Memory to keep the reference count above zero.
To mark Visual Basic objects as Retain in Memory
In Visual Basic, on the Project menu, click <project name> Properties.
On the General tab, select the Unattended Execution and Retained In Memory boxes.
See Also
Using the Visual Basic Pipeline Component Wizard
Implementing the IPipelineComponent Interface