If a plug-in does not explicitly provide access to its parameter blocks, one can still access it by iterating over the references. The following will return a pointer to the first parameter block of any plug-in:
IParamBlock2* GetParamBlock(ReferenceMaker* obj) {
intnRefs = obj->NumRefs();
for ( int i = 0; i < nRefs; ++i ) {
ReferenceTarget* ref = obj->GetReference(j);
if ( ref && ref->SuperClassID() == PARAMETER_BLOCK2_CLASS_ID ) {
returndynamic_cast<IParamBlock2*>( ref );
}
}
returnNULL;
}