Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / July 2006

Tip: Looking for answers? Try searching our database.

Tlbimp reference problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
netquirer@gmail.com - 24 Jul 2006 22:20 GMT
Hi,

I am using tlbimp like this:

tlbimp module1.dll /OUT:module1.tlb.dll /NAMESPACE:MyModule1
tlbimp module2.dll /OUT:module2.tlb.dll /REF:module1.tlb.dll

Normally this works fine for me, but on a particular machine I get this
error:

TlbImp : warning TI0000 : Error while importing type: parameter
referenced a type library that is not available (type: 'IMyInterface';
parameter: Param1; method: 'Method1').

I am sure the dll is available on the other machine- I have tried
placing module1.tlb.dll in the current directory, but it doesn't seem
to help.

Anybody know what might be causing this?  What mechanism does tlbimp
rely on to resolve references?  Does anyone know of a good tlbimp
FAQ/troubleshooting page?

Thanks!
Dmytro Lapshyn [MVP] - 26 Jul 2006 09:00 GMT
Hi,

I think you use the /R option somewhat incorrectly. Try this:

tlbimp module1.dll /OUT:module1.tlb.dll /NAMESPACE:MyModule1
tlbimp module2.dll /OUT:module2.tlb.dll /REF:module1.dll

Signature

Regards,
Dmytro Lapshyn [MVP]
http://blogs.vbcity.com/DmytroL

> Hi,
>
[quoted text clipped - 19 lines]
>
> Thanks!
netquirer@gmail.com - 27 Jul 2006 14:11 GMT
Thanks for the reply-

Sorry, I mistyped my command line a bit.  It should read:

tlbimp module1.TLB /OUT:module1.tlb.dll /NAMESPACE:MyModule1
tlbimp module2.TLB /OUT:module2.tlb.dll /REF:module1.tlb.dll

So module1.tlb.dll is actually a RCW dll generated from a type library.
Isn't this the correct input for the /REF arg?

I don't particularly understand the "type library" error message, since
/REF imports an assembly, not a type lib.

> Hi,
>
[quoted text clipped - 31 lines]
> >
> > Thanks!
Dmytro Lapshyn [MVP] - 28 Jul 2006 07:46 GMT
Hmm...can it be that the type libraries are not properly registered on the
machine that gives you trouble?
Is "IMyInterface" 100% defined in Module1?
Try to remove the /NAMESPACE option.

Signature

Regards,
Dmytro Lapshyn [MVP]
http://blogs.vbcity.com/DmytroL

> Thanks for the reply-
>
[quoted text clipped - 44 lines]
>> >
>> > Thanks!
netquirer@gmail.com - 31 Jul 2006 16:00 GMT
Yes, the interface is 100% defined.

So that I can understand tlbimp a little better, can you please explain
why the TLB needs to be registered?  Doesn't the RCW module1.tlb.dll
already have all of the type information needed by module2.tlb.dll?  I
specifically don't want to rely on registration of these files.

Also, can you explain why using a namespace would matter?

Thanks!

> Hmm...can it be that the type libraries are not properly registered on the
> machine that gives you trouble?
[quoted text clipped - 54 lines]
> >> >
> >> > Thanks!

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.