CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2000
    Posts
    5

    Registering a TypeLib

    I would like to know how i can register an .TLB file without using the setup
    wizard.
    I want to distribute my appl. quickly. For the .OCX files i use REGOCX32.EXE
    and for the .DLL files i use REGSVR32.EXE, but what do i use for the .TLB files?

    Rich Smit


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Registering a TypeLib

    you can use a function in the setupkit.dll
    Public Declare Function RegisterTLB Lib "vb6stkit.dll" (ByVal lpTLBName As String) As Integer



  3. #3
    Join Date
    Apr 2000
    Posts
    5

    Re: Registering a TypeLib

    That means i have to write my own setup program with code?
    But is there no option so i can do it from the command line with
    a little tool like regocx32.exe etc. used in a batch file.?

    Rich


  4. #4
    Join Date
    May 1999
    Posts
    3,332

    Re: Registering a TypeLib

    try this:
    rundll32.exe vb6stkit.dll,RegisterTLB yourTypeLibpathGoesHere

    You should be able to call this from a BAT file.


  5. #5
    Join Date
    Apr 2000
    Location
    Houston, TX, USA
    Posts
    199

    Re: Registering a TypeLib

    There is also an exe similar to regsvr32 called regtlb. This is designed to register tlb's.

    Tim Cartwright 'Will write code for food.
    Information Systems
    Splitrock Services Inc.
    Tim C.
    //Will write code for food

  6. #6
    Join Date
    Nov 2001
    Posts
    92

    Re: How to register typelibrary file?

    Hi,

    I had a similar problem when I tried to install vb application on windows 2000 server. while installing the message box "not able to register msado20.tlb" is popped up. Later, when I try to register this from the command line using regtlb it failed. Finally when I searched for regtlb*.* in that computer, it couldnt find that file.
    So I guess this toolkit didnt come along with windows 2000 server. I didnt have this problem while installing on win2000 m/c.
    How do I solve this problem?

    Thanks,
    Ram

  7. #7
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477
    This is a ADO specific error. Actually, that is a known bug from Micro$oft. More info can be found here. The bottom line is that win2k comes with a higher version of ADO. Because of this higher version already installed, the registration of the 2.0 version fails.

    You should not include ADO in a PDW setup file. You can always install MDAC if you need ADO.
    Tom Cannaerts
    email: cakkie@cakkie.be.remove.this.bit
    www.tom.be (dutch site)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured