Results 1 to 4 of 4

Thread: How can I write a dll library ?

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    2

    Question

    How can I write a dll library ? I did this:

    1. I have created a new project and choosen ActiveX DLL.

    2. In Declaration section I wrote :

    Public Sub Hello()

    End Sub

    3. Then I compiled this project.

    4. Opend a new normal project, created a new module and wrote in it this:

    Public Declare Sub Hello Lib "Project1.dll" ()

    then in Sub Form_Load I wrote: Call Hello.

    And I got this error : "Can't find dll entry in project1.dll".

    What's wrong ?




  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    You can't create Standard dlls in VB, you can only create ActiveX dlls.

    the easiest way is to set the Instancing property of your Class Module File to 6 - Global multiuse, then compile it, when you want to use the functions in a different project hit references in the project menu and select the dll from there, you can then use the functions without declaring them.

    The other way to use ActiveX dlls is to use them in an Object orientated way (which I highly recomend) check Here for some tutorials

  3. #3
    Guest
    If you want to create Standard DLL's, use Visual C++ instead.

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    There was a piece of software a while back which created real DLLs from VB code...can't remember what it is, though. I'll check.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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