Results 1 to 10 of 10

Thread: Use DLL in VB programs

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    Posts
    130
    Goodday everybody...

    I would like to know how do i use DLL developed in VC++ in VB programs? What are the procedure i need to do to link it to my VB programs and how do i actually use the functions available in the DLL on my VB programs?

    Your help will be most appreciated...

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    Hi,

    It all depends on what sort of dll you created in VC++.

    If it is a standard dll, then you access the functions like you do with the win32 API, by declare statements.

    If you built an ActiveX dll, then you add a reference to the dll in your project and use it like any other object in VB
    Iain, thats with an i by the way!

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    Posts
    130
    thanks for replying Iain17...

    i think the DLL that i create is Win32 API because when i was choosing to creat a project in VC++, i chose Win32 Dynamic-Link Library.

    "By declare statement"? i don't really understand. i'm quite fresh in these things. so if you don't mind giving a sample or two, i'll be glad...

    thanks...

  4. #4
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    Take a look on this Thread

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    Posts
    130
    what about ActiveX DLL?
    how do i bulid an ActiveX DLL in VC++?
    what i know is that u can build a Library-Type DLL...

  6. #6
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    Serhiy, To build the ActiveX DLL with VC++, you can use the ATL COM AppWizard that come together with VC++.

    Try to play around with it.

    Cheers!

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    Posts
    130
    Chris...

    is there any example program or source code that i can referred to?

  8. #8
    Guest

    Lightbulb Adding DLL

    You might need to register your DLL to use it in VB.
    From the DOS prompt run:-
    c:\windows\system\regsvr32.exe mydllfile.dll
    Then look on the References list in VB and it should be there with an empty checkbox next to it.
    Hope that's helped some.

  9. #9
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    Is there any way I can load Win32 Dll's and Activex Dll at run time?

  10. #10
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    I think you need to reference it during desing time and not run time.

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