Results 1 to 6 of 6

Thread: Registering a dll within VB code

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2006
    Posts
    58

    Question Registering a dll within VB code

    I've a VB Program. Im using some dll with in my code. But to use this dll i nee d to register it. Can i do this within my VB code itself?. That is i'm trying to register the dll with regsvr32.exe while my project getting loaded. How can i do this?.

    thanks.

  2. #2
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: Registering a dll within VB code

    I think you are asking about executing your app in other machine...If so, you need to create a setup program and deploy you app using that setup. It will install and register all the files required for your app.
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  3. #3
    Member
    Join Date
    Oct 2006
    Location
    Noida,India
    Posts
    49

    Re: Registering a dll within VB code

    Add Ref to TypeLib Info to your vb project and add following lines of code to register
    Dim pTLIAplication As New TLI.TLIApplication
    Dim pTypeLibInfo As TLI.TypeLibInfo
    Set pTypeLibInfo = pTLIAplication.TypeLibInfoFromFile("C:\your Dll Path\a.dll")
    pTypeLibInfo.Register
    Rajneesh

  4. #4
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: Registering a dll within VB code

    the simple method to register a file would be using Shell
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  5. #5
    New Member
    Join Date
    Jan 2007
    Location
    Englishman in Malaysia
    Posts
    2

    Re: Registering a dll within VB code

    To use a dll, register it once with regsrv32.exe. Then in your project, go to Project -> References and either browse for it or select from the list.

    For the benefit of helpful people, when someone writes they have a dll, it means they have a dll not a Typelib. When they talk about loading their project, that in no way refers to another computer. A basic understanding of VB would be useful before answering VB posts.

  6. #6
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: Registering a dll within VB code

    Quote Originally Posted by tduraipkt
    Can i do this within my VB code itself?.
    He wanted to register the dll within HIS VBCODE
    Quote Originally Posted by Doom
    To use a dll, register it once with regsrv32.exe. Then in your project, go to Project -> References and either browse for it or select from the list
    This is not using VBCODE
    Quote Originally Posted by Doom
    A basic understanding of VB would be useful before answering VB posts
    who
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


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