Results 1 to 2 of 2

Thread: how to call a external dll file to vb

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    1

    how to call a external dll file to vb

    how to call a external dll file to vb

  2. #2
    Frenzied Member Devion's Avatar
    Join Date
    Sep 2000
    Location
    The Netherlands
    Posts
    1,049

    Re: how to call a external dll file to vb

    There are multiple ways to call an external file....

    A List:
    - References : You'll see 'm in the object list and you can see the properties, though this only works for COM+ DLL's (ie. ActiveX DLL's)

    VB Code:
    1. ' Reference it first.
    2.   Dim MyApp as new MyApp.MyClass
    3.   MyApp.ShowHelloWorld

    - CreateObject : Late-binding of DLL's also works only for ActiveX DLL's..
    VB Code:
    1. Dim AnObject as Object
    2.   Set AnObject = LoadObject("MyDLL.MyClass")
    3.   Call AnObject.SayHelloWorld

    And there's the Declare Statements also used for most DLL's.
    VB Code:
    1. Public Declare Function CoCreateInstance Lib "Kernel32" etc. etc.

    Some are easy, some are a pain

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