API | ITcModuleManager Error codes E_POINTER : One of the required pointers, or bstrModuleType , is NULL . E_INVALIDARG : The type name is empty, or no instance of this type was found. E_OUTOFMEMORY : The temporary results array could not be created. Additional errors: QueryInterface or ModuleTypeName failed for a found TCom object. 5.31.2.2 ITcModuleManager2::TryLookupModule | ITcModuleManager2::TryLookupModule Initialize pipModules with NULL and pbFound with VARIANT_FALSE , then search for all module instances with matching module type names.
If matches are found, an ITcEnumModuleInstances enumerator is returned over the found ITcModuleInstance2 objects, and pbFound is set to VARIANT_TRUE . Signature HRESULT TryLookupModule(BSTR bstrModuleType, ITcEnumModuleInstances** pipModules, VARIANT_BOOL* pbFo und); Parameter Return value Error codes E_POINTER : pipModules , pbFound , or bstrModuleType is NULL . E_INVALIDARG : The type name is empty. E_OUTOFMEMORY : The temporary results array could not be created. Other errors: QueryInterface or ModuleTypeName failed for a module instance. 5.31.3 ITcModuleManager3 | ITcModuleManager3 Inherits from: ITcModuleManager2 ITcModuleManager3 adds the collection-based view of all module instances.
It is more convenient for automation clients that want to use Count , index access, and IEnumVARIANT enumeration. Properties Methods (none) TE1000 134 Version: 1.7.0 Name Type Description bstrModuleType BSTR [in] Sought-after module type name. Name Type Description pipModules ITcEnumModuleInstances [} 151]** [out] Enumerator of the found module instances or NULL. pbFound VARIANT BOOL* _ [out, retval] VARIANT TRUE if at least one instance was _ found. (HRESULT) HRESULT S OK if successful, otherwise an error code. _ Property Type get/set Description Modules ITcModuleInstanceCollecti on [} 135]** get Collection of all module instances in the document.