Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Register and unregister type libraries

Total Hit ( 3591)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


All COM-oriented VB developers know how to register and unregister an ActiveX DLL, using the REGSVR32 utility. However, there is no such an utility to register and unregister a type library.

You can quickly build your own TLB Registration utility with a handful of statements, thanks to the undocumented TLBINF32.DLL library that is silently installed with Visual Basic 5 and 6. Just add a reference to the "TypeLib Information" library in the References dialog, and then invoke one of these two functions:

Click here to copy the following block
' Register a type library

Sub RegisterTypeLib(ByVal TypeLibFile As String)
  Dim TLI As New TLIApplication
  ' raises an error if unable to register
  ' (e.g. file not found or not a TLB)
  TLI.TypeLibInfoFromFile(TypeLibFile).Register
End Sub

' Unregister a type library

Sub UnregisterTypeLib(ByVal TypeLibFile As String)
  Dim TLI As New TLIApplication
  ' raises an error if unable to unregister
  TLI.TypeLibInfoFromFile(TypeLibFile).UnRegister
End Sub


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.