|
-
Variable uses an Automation type not supported in Visual Basic
I receive this error when I compile an activeX dll.
The dll compiled before without any problem. Of course I modified the DLL.
I added the following.
A BAS module modPropPath)
--------------------------
Option Explicit
Public Function CreatePropertyPath1(ByVal nPropertyID As Integer, ByVal objNext
As clsTBXPropPath) As clsTBXPropPath
Dim objResult As clsTBXPropPath
Set objResult = New clsTBXPropPath
With objResult
.PropertyID = nPropertyID
Set .NextList = objNext
End With
Set CreatePropertyPath1 = objResult
End Function
Public Sub DebugPrintPropPath(ByVal objPath As clsTBXPropPath)
If objPath Is Nothing Then
Debug.Print "Nothing"
Else
Debug.Print objPath.PropertyID; ", ";
DebugPrintPropPath objPath.NextList
End If
End Sub
a Class module (clsTBXPropPath) PublicNotCreatable:
---------------------------------------------------
Private mProperty As Integer
Private mNext As clsTBXPropPath
' propertyPaths are useful for focusing errors on properties
' they just store a linked list of integers
Public Property Let PropertyID(ByVal nID As Integer)
mProperty = nID
End Property
Public Property Get PropertyID() As Integer
PropertyID = mProperty
End Property
Public Property Get NextList() As clsTBXPropPath
Set NextList = mNext
End Property
Public Property Set NextList(ByVal objNext As clsTBXPropPath)
Set mNext = objNext
End Property
Private Sub Class_Initialize()
mProperty = -1
Set mNext = Nothing
End Sub
Private Sub Class_Terminate()
Set mNext = Nothing
End Sub
And, finally, a Global MultiUse Class :
---------------------------------------
Option Explicit
Public Function CreatePropertyPath1(ByVal nPropertyID As Integer, ByVal objNext
As clsTBXPropPath) As clsTBXPropPath
Set CreatePropertyPath1 = modPropPath.CreatePropertyPath1(nPropertyID,
objNext)
End Function
Public Sub DebugPrintPropPath(ByVal objPath As clsTBXPropPath)
modPropPath.DebugPrintPropPath objPath
End Sub
Of course, I use the class further in my other classes. I added it as a
property to an existing classes (get/set).
I use the module/GMU trick (same names, GMU routes to module) all the time
to circumvent the notorious GMU bug which makes it unsuable (as a GMU) inside
the defining DLL. That worked all the time, so I don't think this is the
problem.
I use VB6 service pack6 and the DLL uses only the 3 default VB libraries
in its references). The DLL has no binary compatibility. Please help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks