Home : AutomationException: 0x80029c4a - Error Loading Type Library/DLL in 'Invoke'
Q34490 - ERRMSG: AutomationException: 0x80029c4a - Error Loading Type Library/DLL in 'Invoke'

AutomationException: 0x80029c4a - Error Loading Type Library/DLL in 'Invoke'


This error can occur if the registry settings for the COM application you wish to access are somehow "out of synch" (this can happen for any number of reasons). Try reinstalling the COM application and run your application again. If you know the location of the type library for the COM application, you can also try reregistering it using the regtlb tool that comes in the jintegra\bin directory.

    > regtlb [TLB filename]

This error can also occur if the COM application's type library contains a type that is defined in a missing DLL (i.e. a DLL which was not included in the current installation/configuration). For example, say a COM component exposes two interfaces: IWork and IProblem.

  1. IWork has one method:
    • meth1() which returns a pointer to an IProblem.
  2. IProblem has two methods and one property:
    • methBad(): Method which takes a parameter of the undefined type
    • methGood(): Method which takes no parameters
    • title: String property

You will not be able to call IProblem->methBad() from Java or VB since the parameter is an undefined type. But the problem is that calling any method of the IProblem interface (via J-Integra in DCOM mode) gives the above exception.

However, there is a workaround for calling IProblem->methGood() and IProblem->getTitle(). The solution is to use late binding by following these two rules:

  1. Instead of creating an instance of the problematic object (IProblem in this case), create an instance of com.linar.jintegra.Dispatch.
  2. Instead of calling methods on the problematic object, use getPropertyByName() and invokeMethodByName().

Original Code

IProblem problemObj = IWork.meth1();

// Any method called on problemObj will fail
String title = problemObj.getTitle(); // fails!

Late Binding Version

com.linar.jintegra.Dispatch problemObj = new com.linar.jintegra.Dispatch(IWork.meth1());

// All methods may be called on problemObj except methBad()
Object[] params = {null};
problemObj.invokeMethodByName("methGood", params);
String title = (String) problemObj.getPropertyByName("title");

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?


Tell us why you rated the content this way. (optional)
Approved Comments...
No user comments available for this article.
Created on 6/23/2006.
Last Modified on 7/11/2006.
Last Modified by No Author Name Available!.
Article has been viewed 6556 times.
Rated 7 out of 10 based on 2 votes.
Print Article
Email Article