Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / March 2005

Tip: Looking for answers? Try searching our database.

ASP and overloaded methods

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Johan Karlsson - 23 Mar 2005 09:02 GMT
Hi!

I'm sure this question have been asked before, but I cannot seem to find it
in here.
I've have a classlibrary written in .net that's exposed to com via interop
(registered in the GAC and so on).

Is there anyway to call overloaded functions from a script environment?

Example:

Public Sub MyFunction( byval subject as string, byval body as string )
Public Sub MyFunction( byref m as message )

Thanks!
/Johan
Mario Kropik - 23 Mar 2005 10:19 GMT
> Is there anyway to call overloaded functions from a script environment?
>
> Example:
>
> Public Sub MyFunction( byval subject as string, byval body as string )
> Public Sub MyFunction( byref m as message )

To have a close look at your COM visible declarations set a reference in
Visual Basic 6 and use object browser. So you can see how your overloaded
function is exposed to COM.

Typically .NET exposes your functions with the appendix _1, _2, _3,... if
you have overloaded functions visible to com. If don't like this behavior
your should consider to declare your overloaded functions as private and
expose a function with optional parameters. This public and COM visible
function can decide - depending on optional parameters recieved - which
overloaded private function to call.

Mario
Johan Karlsson - 23 Mar 2005 11:29 GMT
Thanks for a quick reply!
Keep up the good work!

/Johan

>> Is there anyway to call overloaded functions from a script environment?
>>
[quoted text clipped - 15 lines]
>
> Mario

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.