// the root product is the first element of root elements
CATListValCATBaseUnknown_var *pRootProducts = piDocRootsOnDoc->GiveDocRoots();
CATIProduct_var spRootProduct = NULL_var;
if (NULL != pRootProducts && pRootProducts->Size() > 0) {
spRootProduct = (*pRootProducts)[1];
...
// Get CATIProduct handle on the root product.
CATIProduct *piProductOnRoot = NULL;
rc = spRootProduct->QueryInterface(IID_CATIProduct,
(void**) &piProductOnRoot);
spRootProduct 是Top Product
CATIProduct::GetAllChildren()
为子Product List
CATISpecObject_var = CATIProduct_var