Re: Automation Error Library not registered
"Herby" <prmarjoram@gmail.com> wrote in message
news:1175601453.647211.141650@b75g2000hsg.googlegroups.com
It has become necessary for us to have two versions of the same
component registered on the same machine. So that the second
component can reside seperately from the first its GUID's and progIds
etc were updated.
Everything seemed fine, registered correctly.
But get the above error when using late binding;
But if i replace the first line with:
Dim plmnList As ai_dsruleEngine2.DatasafePLMNList
Then is fine. Problem is i need the first way to work.
You are using IDispatchImpl to implement IDispatch in your component.
IDispatchImpl takes LIBID and version number of a type library as
template parameters, and tries to load this type library at run time.
The error suggests this type library was not registered on the machine.
I guess you have two type libraries with different LIBIDs, but
IDispatchImpl is hardcoded to use one of them. The problem then arises
when you try to use the component when only the other TLB is registered.
Make sure the LIBID passed to IDispatchImpl matches the type library
actually registered on the machine. Alternatively, if the TLB is bound
as a resource to your DLL, pass 0xFFFF for wMajor and wMinor template
parameters. These special values instruct IDispatchImpl to load the TLB
directly from your module's resources. In this case, LIBID is ignored,
and the TLB does not need to be registered at all (as far as
IDispatchImpl is concerned: you may still want to register it for the
benefit of other parties).
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925