A
AussieRules
Hi,
I have been trying to build a DLL in vb2008, that can be called from a VB6
application.. So far I have got the DLL to be registered on the VB6 machine
ok, but it can't see any of my interfaces/functions.
So I figure my class is configured ok, but the functions are not.. (I have
the COMM Class and COM Visible set to true for the properties of the class).
I also have under the project/properties.compile option of Register for COM
interop set as well...
Can anybody give me a tip on what is wrong with this code..
Thanks...
<ComClass(TestClass.ClassId, TestClass.InterfaceId, TestClass.EventsId)> _
Public Class TestClass
#Region "COM GUIDs"
' These GUIDs provide the COM identity for this class
' and its COM interfaces. If you change them, existing
' clients will no longer be able to access the class.
Public Const ClassId As String = "d41b9efd-ce16-48df-bab4-16352d47b669"
Public Const InterfaceId As String =
"bd2b42e6-4e8b-4195-82e6-c3dd7c6b4bbb"
Public Const EventsId As String = "1f0dbdf5-5509-4e4f-aaf6-631572881186"
#End Region
' A creatable COM class must have a Public Sub New()
' with no parameters, otherwise, the class will not be
' registered in the COM registry and cannot be created
' via CreateObject.
Public Sub New()
MyBase.New()
End Sub
Public Shared Function GetValue(ByVal intShelfID As Integer) As Integer
GetValue= 99
Return GetValue
End Function
Public Shared Function ValueID()
Return 1
End Function
End Class
I have been trying to build a DLL in vb2008, that can be called from a VB6
application.. So far I have got the DLL to be registered on the VB6 machine
ok, but it can't see any of my interfaces/functions.
So I figure my class is configured ok, but the functions are not.. (I have
the COMM Class and COM Visible set to true for the properties of the class).
I also have under the project/properties.compile option of Register for COM
interop set as well...
Can anybody give me a tip on what is wrong with this code..
Thanks...
<ComClass(TestClass.ClassId, TestClass.InterfaceId, TestClass.EventsId)> _
Public Class TestClass
#Region "COM GUIDs"
' These GUIDs provide the COM identity for this class
' and its COM interfaces. If you change them, existing
' clients will no longer be able to access the class.
Public Const ClassId As String = "d41b9efd-ce16-48df-bab4-16352d47b669"
Public Const InterfaceId As String =
"bd2b42e6-4e8b-4195-82e6-c3dd7c6b4bbb"
Public Const EventsId As String = "1f0dbdf5-5509-4e4f-aaf6-631572881186"
#End Region
' A creatable COM class must have a Public Sub New()
' with no parameters, otherwise, the class will not be
' registered in the COM registry and cannot be created
' via CreateObject.
Public Sub New()
MyBase.New()
End Sub
Public Shared Function GetValue(ByVal intShelfID As Integer) As Integer
GetValue= 99
Return GetValue
End Function
Public Shared Function ValueID()
Return 1
End Function
End Class