Microsoft KB Archive/327130

= BUG: Tlbimp.exe creates a partial wrapper when the imported type library has dependencies on other unregistered libraries =

Article ID: 327130

Article Last Modified on 9/13/2005

-

APPLIES TO


 * Microsoft Visual Studio .NET 2002 Academic Edition
 * Microsoft Visual Studio .NET 2002 Professional Edition
 * Microsoft Visual Studio .NET 2002 Enterprise Developer
 * Microsoft Visual Studio .NET 2002 Enterprise Architect

-



This article was previously published under Q327130



SYMPTOMS
The Type Library Importer tool (Tlbimp.exe) creates a partial wrapper when the imported type library has dependencies from other unregistered libraries. This partial wrapper has limited functionality and it is not guaranteed to function correctly (even partially).



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce the Behavior
  Open a text editor, and then use the following code to create the 1.idl file: [uuid(24b4580a-3c4d-412c-b83d-4e8917af07a2)] library One {      importlib(&quot;stdole2.tlb&quot;);

[       odl, uuid(2be7bcfc-e450-4431-9a10-323f7b6d51bc) ]   interface One : IUnknown {   };   };                      Create the 2.idl file that references type library &quot;One&quot;: [uuid(6f225a10-3c20-4705-a2ac-2e872d943b0e)] library One {      importlib(&quot;1.tlb&quot;);

[       odl, uuid(82f08559-73b6-4093-884b-840f7c69b10f) ]   interface Two: One {   };   };                     Compile these .idl files:  Click Start, click Programs, and then click Microsoft Visual Studio .NET. In Visual Studio .NET, on the Tools menu, click Command Prompt.  Run the following commands to compile the .idl files: C:\>midl /win32 1.idl C:\>midl /win32 2.idl </li></ol> </li> Verify the creation of the 1.tlb and 2.tlb files.</li>  Generate the COM Interop assembly by using the Tlbimp.exe tool: C:\>tlbimp 2.tlb </li></ol>

Although 1.tlb is not registered, the command runs without a problem and it does not generate any errors or warning messages.

<div class="references_section">