Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 9th, 2003, 03:08 AM
Registered User
 
Join Date: Oct 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default COM+ and .NET

Hi!

I have created a COM+ component with C# and .NET.

When I try to use my COM+ component in Visual Basic the method / function is not visible. How about that?

The code for my method looks like this

[ComVisible(true)]
public long TestMethod(){
long myLong = 123;

return myLong;
}

 
Old October 9th, 2003, 07:13 AM
Authorized User
 
Join Date: Aug 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Did you define an interface for your component? Normally, you should have an interface which exposes the accessible methods from your component class; this class must derive from the interface.

Hope this helps.

Pieter

 
Old October 9th, 2003, 07:28 AM
Registered User
 
Join Date: Oct 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No Interface implemented. I will take a look at it and try.

Thank you.

 
Old October 10th, 2003, 01:42 AM
Registered User
 
Join Date: Oct 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Interface created and implemented and I also learned that all classes should have their own GUID but still no change.

I can access my methods but they refuse to exist in the Object Browser for example. The component works just fine but it is strange that the interface shows the methods but not the class itself.

Strange...






Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I run VB .net 2005 with DOT NET 2003 APPLICATI kadesskade BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 2 August 8th, 2006 05:14 AM
Database diagram in .net using asp.net,c#.net scotttiger ADO.NET 2 February 16th, 2005 01:35 AM
Beginning ASP.Net Databases Using VB.Net ISBN 6195 tlamazares SQL Server ASP 1 December 15th, 2003 01:28 PM
CR.net With ASP.net using C#.net Nilesh Leuva Crystal Reports 1 September 11th, 2003 12:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.