creating COM Class in .net having function with string array as input pramenter
-
I have a COM Class in Vb.Net the code is like this _ Public Class Class1 #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 = "74eb4206-6063-4ea1-b499-bfdd9f49f4bf" Public Const InterfaceId As String = "ff2cdb8a-e1f9-464b-bb6f-ead5812d3630" Public Const EventsId As String = "a8880b84-9a33-41f2-90f6-c6141835ee61" #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 Function MergeFiles(ByVal arrFiles() As String, ByVal strOutputFile As String) As String End Function End Class When imported in VC++ (6.0) we are not able to get the function out. Any suggestions
-
I have a COM Class in Vb.Net the code is like this _ Public Class Class1 #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 = "74eb4206-6063-4ea1-b499-bfdd9f49f4bf" Public Const InterfaceId As String = "ff2cdb8a-e1f9-464b-bb6f-ead5812d3630" Public Const EventsId As String = "a8880b84-9a33-41f2-90f6-c6141835ee61" #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 Function MergeFiles(ByVal arrFiles() As String, ByVal strOutputFile As String) As String End Function End Class When imported in VC++ (6.0) we are not able to get the function out. Any suggestions
Hmmm - you're using VB.NET but still using VC++ 6.0? That makes no sense what so ever...there's so much good support for importing COM objects easily in later versions of VC++...look up #import.... Open the type library for VB.NET DLL in the OLE/COM Object Viewer (open the Type Libraries branch of the tree view and select your project's type library - it'll be named after your project) to see what interfaces and classes the DLL exports. This'll show the DLL is properly registered and also show you what object you have access to.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p CodeProject MVP for 2010 - who'd'a thunk it!