I am trying to create a COM object library that is language independent. So that other developer can use it in orther developing environment like VB 6.0 or C++, it can be built successfully, however, when I try to add it to VB project, it does not allowed to add. The err msg is "Can't add a reference to the specified file". Can anyone help? Thanks a lot.
The code in VB.net Express like the following:
Imports System.Runtime.InteropServices
Namespace CustomerCare
<Guid("89439AD1-756F-4f9c-BFB4-18166F63251E"), _
InterfaceType(ComInterfaceType.InterfaceIsIUnknown )> _
Public Interface _ProcessOrder
Function ItemOnHold(ByVal productName As String) As Boolean
End Interface
<Microsoft.VisualBasic.ComClass _
(ProcessOrder.ClassId, ProcessOrder.InterfaceId, ProcessOrder.EventsId)> Public Class ProcessOrder
Implements _ProcessOrder
<System.Runtime.InteropServices.DispId(1)> Public Const ClassId As String = "B3B00A18-039A-4cbe-8B4D-40F15E5F0A71"
Public Const InterfaceId As String = "F831AEAB-7EE8-4205-9980-03EC015CBD66"
Public Const EventsId As String = "83FD389B-55E6-4abb-AB8B-EB3434F53365"
Private daysPreserved As Integer
Private prodID As String
Function ItemOnHold(ByVal productName As String) As boolean Implements _ProcessOrder.hasLicense
'detailed implementation here
End Function
'other functions ....
Public Sub New(ByVal daysPresv As Integer)
MyBase.New()
daysPreserved = daysPresv
End Sub
End Class
End Namespace