PC Review


Reply
Thread Tools Rate Thread

Customise Generated File "Reference.cs"

 
 
=?Utf-8?B?UmlrIEJlYWNyb2Z0?=
Guest
Posts: n/a
 
      21st Mar 2005
We have the following setup. A VB6 application calls a .NET COM component
that acts mainly as a forwarding system calling methods on a web service.

When you open up the VB6 object browser and look at the methods exposed by
the .NET COM Component, you will also see the public methods exposed by the
WebService. I do not want the VB6 application to know about the WebService.

If I were to define the WebService public methods as ComVisible(false), then
they would not be exposed to the .NET COM Component. I can however, add this
attribute to the Web References\Reference.cs file present in the .NET COM
Project.

Is there a way to have the calling of "Update Web Reference" and "Add Web
Reference" to automatically add the ComVisible(false) attribute to each class
in the Reference.cs file generated?
 
Reply With Quote
 
 
 
 
Patrick Steele [MVP]
Guest
Posts: n/a
 
      23rd Mar 2005
In article <90671F32-71A2-49F1-87E4-(E-Mail Removed)>,
(E-Mail Removed) says...
> We have the following setup. A VB6 application calls a .NET COM component
> that acts mainly as a forwarding system calling methods on a web service.
>
> When you open up the VB6 object browser and look at the methods exposed by
> the .NET COM Component, you will also see the public methods exposed by the
> WebService. I do not want the VB6 application to know about the WebService.


Is the webservice itself the .NET COM component? Or do you have a .NET
component that calls a .NET webservice and that .NET component is the
one exposed to COM?

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
 
Reply With Quote
 
=?Utf-8?B?UmlrIEJlYWNyb2Z0?=
Guest
Posts: n/a
 
      23rd Mar 2005
Hi ya,

We have a .NET component that calls a .NET webservice and that .NET
component is the one exposed to COM?


"Patrick Steele [MVP]" wrote:

> In article <90671F32-71A2-49F1-87E4-(E-Mail Removed)>,
> (E-Mail Removed) says...
> > We have the following setup. A VB6 application calls a .NET COM component
> > that acts mainly as a forwarding system calling methods on a web service.
> >
> > When you open up the VB6 object browser and look at the methods exposed by
> > the .NET COM Component, you will also see the public methods exposed by the
> > WebService. I do not want the VB6 application to know about the WebService.

>
> Is the webservice itself the .NET COM component? Or do you have a .NET
> component that calls a .NET webservice and that .NET component is the
> one exposed to COM?
>
> --
> Patrick Steele
> Microsoft .NET MVP
> http://weblogs.asp.net/psteele
>

 
Reply With Quote
 
Patrick Steele [MVP]
Guest
Posts: n/a
 
      24th Mar 2005
In article <AE76DD75-ACF6-42F3-92D2-(E-Mail Removed)>,
(E-Mail Removed) says...
> Hi ya,
>
> We have a .NET component that calls a .NET webservice and that .NET
> component is the one exposed to COM?


You can control what methods get exported to COM through interfaces.
See this article for a detailed explanation of how to get smooth interop
between COM and your .NET objects:

http://www.15seconds.com/issue/040721.htm

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
aspnet pre compilation issue with htm files results in "This is a marker file generated by the precompilation tool, and should not be deleted!" Sanjay Pais Microsoft ASP .NET 1 14th Sep 2009 07:47 AM
"An object reference is required for the non-static field, method, orproperty" compilation error generated from non-static context dejas9000@gmail.com Microsoft C# .NET 7 26th Jan 2008 12:02 PM
File "EA DATA. SF" is being generated when copying to A: Mike Microsoft Windows 2000 File System 2 15th Nov 2006 12:08 AM
Filtering auto-generated code from "Treat Warnings as Errors" and "XML Comments" Skip Sailors Microsoft C# .NET 1 9th Jun 2006 08:26 PM
"Type mismatch could be due to the mixing of a file reference with a project reference " Brian Begy Microsoft Dot NET 0 7th Feb 2006 08:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:09 AM.