COM in VB.NET 
Author Message
 COM in VB.NET

Hey guys,

I'm currently trying to use the Windows Messenger API to create an Add-In
that grabs XML formatted headlines(like Slashdot's), but I'm having some
trouble....here's my source:

<ComClass(Slasher.ClassId, Slasher.InterfaceId, Slasher.EventsId)> _
Public Class Slasher
Public Const ClassId As String = "FA317F7B-DACE-4E28-9EC0-7D4277359C35"
Public Const InterfaceId As String = "73106E79-4679-4859-80FC-467EB3C1D9A5"
Public Const EventsId As String = "FC728CD7-BA02-4A7F-A64A-43EA396C5DEB"
Public Sub New()
MyBase.New()
End Sub
Public Interface IMessengerAddIn
Function IMessengerAddIn_GetFeature(ByVal bstrFeatureGuid As String) As
Object
Function IMessengerAddIn_OnShutdown()
Function IMessengerAddIn_OnSignin(ByVal bstrPassportCountry As String, ByVal
lcidPassport As Long, ByVal lcidMessenger As Long, ByVal pService As
MessengerAPI.IMessengerService, ByVal puid As String)
Function IMessengerAddIn_OnSignout(ByVal pService As
MessengerAPI.IMessengerService)
End Interface
Public Interface IMessengerHeadlines
Function IMessengerHeadlines_GetNextContent() As String
End Interface
End Class

My problem is that when I try to use the COM component made by this source,
I get the following error in VB.NET:
"Converting the type to a .NET assembly failed.  Type library Slasher was
exported from a CLR assembly and cannot be re-imported as a CLR assembly."
What am I doing wrong?  Or am I doing this entirely wrong?  This is my first
time using VB....

Thanks in advance,
Michael Herring



Mon, 25 Oct 2004 10:36:35 GMT  
 COM in VB.NET
Michael,

You might want to repost your question to
microsoft.public.dotnet.framework.interop, which is a more appropriate
group for .NET interop questions.

Quote:
>My problem is that when I try to use the COM component made by this source,
>I get the following error in VB.NET:
>"Converting the type to a .NET assembly failed.  Type library Slasher was
>exported from a CLR assembly and cannot be re-imported as a CLR assembly."
>What am I doing wrong?  Or am I doing this entirely wrong?  This is my first
>time using VB....

If you want to use it from VB.NET, you should reference the assembly,
not use it through COM interop.

Mattias

===
Mattias Sj?gren (VB MVP)

http://www.msjogren.net/dotnet/



Sun, 24 Oct 2004 15:34:26 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. how to program with com+ and vb.net???

2. ATL COM and VB.NET

3. COM and VB.net

4. The com in vb.net

5. Calling COM EXE from VB.NET Service leaves COM EXE in Memory

6. Severe VB.NET COM/.NET Interop Limitation

7. Automation error referencing .net dll from com (com interop)

8. news:3qgju8$j7m@ixnews3.ix.netcom.com

9. Office COM Add-In and VB.NET

10. COM (Visio) events in VB.NET

11. VB.NET Media Player COM strange problem

12. VB.NET Media Player COM strange problem

 

 
Powered by phpBB® Forum Software