Results 1 to 2 of 2

Thread: Implements

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2002


    Greetings !
    I have been playing around today with the Implements Keyword (i never used it before, seen it around in soem code, and told myself "let's try it !").
    So, i did 2 projects, the first is an activeX DLL, it is called prjDLL, and has one class "clsBP" (BluePrint). This class has one sub :
    Public Sub Sth(Byval Bla as String)
    End Sub
    I compiled it into prjdll.Dll

    Then i made a new project, a standard EXE, i made refference to the newly compiled DLL, i add a class, call it clsTest.
    clsTest contains the following :
    Implements prjDLL.clsPB
    Then i program the clsPB_Sth sub to show the variable passed in Bla in a message box, in the form of the standard EXE, i write :
    dim Obj As prjDLL.clsBP
    Set Obj = New clsTest
    Obj.Sth "grrr"
    When i run the code, "grrr" pops up in a messagebox, not really shocking thing ...

    I compile the standard EXE, and i run it. it Works

    Now, the freaking stuff starts here ...
    When i delete prjDll.dll, and all the related files, the compiled standard EXE (test.exe) still works !!!

    Am i missing sth or does VB simply put the interface info of prjDll.clsTest into the compiled EXE ?

    If i want to publish an application like this, and prjDLL only contains the interface, should i include it in the EXE ?

    Can any errors come up from not includng such a DLL ?

    Thanks in advance.

  2. #2
    Join Date
    Oct 2002
    British Columbia
    When you compile an ActiveX DLL it gets "registered". Deleting the DLL does not delete the registry entries.

    When you run the EXE, the registry is checked to see which DLL is required. I think the registry contains "interface" information as well. Since your code never actually calls the DLL, no error is produced.

    Obviously, if you were to install the EXE on another computer which does not contain the DLL registry settings an error will occur.

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