Quote:
The problem is, the app is loading the dll by finding it on disk, rather than looking in the registry to find it, so the plugin has to be built as the dll for the main app to load it. This means that it can't be running in vb since it must be compiled and on disk.
So why don't you add an extra line of code which says "if this program is being run from VB, just load the DLL without searching for it"
VB Code:
'...
If RunningInVB Then
'use "createobject" to load the DLL
Else
'search for the dll as you do already
End If
'...
Function RunningInVB() As Boolean
'Returns whether we are running in vb(true), or compiled (false)
Static counter As Variant
If IsEmpty(counter) Then
counter = 1
Debug.Assert RunningInVB() Or True
counter = counter - 1
ElseIf counter = 1 Then
counter = 0
End If
RunningInVB = counter
End Function