Overloading Methods exposed through an Interface 
Author Message
 Overloading Methods exposed through an Interface

Hi Everybody,

I came across a particular situation. Any suggestions leading to possible
solutions would be highly welcome. The sitiation is as follows:

I need to expose a method thruogh a COM Interface, which needs to be
overloaded. e.g. getLists(),
getLists(ListID),getLists(FolderID),getLists(ListID,FolderID).

Is there any way we have solve this.

Thanks in advance.

Thanks.
Regards,

Soumitra Banerjee.



Mon, 05 Apr 2004 08:45:43 GMT  
 Overloading Methods exposed through an Interface
COM does not support overloaded methods.  You could define your getLists
method to take optional variants (but then you would need to be able to
distinguish between listid/folderid based on its type).  Or you could create
separate methods (i.e., getFolderLists, getListLists, getListFolderLists).
If you have common list interface, each method could return an object
implementing that interface.

-------------------------------------------------
Automate your software builds with Visual Build
http://www.kinook.com


Quote:
> Hi Everybody,

> I came across a particular situation. Any suggestions leading to possible
> solutions would be highly welcome. The sitiation is as follows:

> I need to expose a method thruogh a COM Interface, which needs to be
> overloaded. e.g. getLists(),
> getLists(ListID),getLists(FolderID),getLists(ListID,FolderID).

> Is there any way we have solve this.

> Thanks in advance.

> Thanks.
> Regards,

> Soumitra Banerjee.



Mon, 05 Apr 2004 21:31:29 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Howto Expose a normal C++ class with methods via an Interface Class in ATL COM

2. How to provide overloaded methods in ATL interface?

3. interface inheritance and exposing same interface

4. WMI Instrumented object methods not exposed

5. calling an interface method from another method in the same class

6. Exposing Individual Methods (Take 2)

7. Exposing individual methods

8. exposing activex control methods and properties?

9. Need to use MSWords exposed methods..

10. ATL/ActiveX, Exposing methods

11. View Method Exposed for Automation

12. simple ole.com sample requested / no methods exposed

 

 
Powered by phpBB® Forum Software