Exporting a method that takes optional arguments 
Author Message
 Exporting a method that takes optional arguments

Please redirect me if this is not the correct group for this question.

I am using ATL to create a COM object.  I have exported my interface and a
couple of methods.

However, one of the methods that I want to export wants to take optional
arguments.

In C++, I can create default values for a function by specifying "=NULL" in
the function definition.

How do you do this with ATL?

I thought about just creating the method, and then hacking the IDL file -
but I'm sure there must be a better way.

Jon



Tue, 01 May 2001 03:00:00 GMT  
 Exporting a method that takes optional arguments


Quote:
>Please redirect me if this is not the correct group for this question.

Close, but not quite.  This is the STL group (Standard Template
Library), you want the ATL group, just down the hall at
microsoft.public.vc.activextemplatelib, though they're moving in a
week or two.  

Quote:
>I am using ATL to create a COM object.  I have exported my interface and a
>couple of methods.

>However, one of the methods that I want to export wants to take optional
>arguments.

As long as you're here, use [defaultvalue()] and/or [optional] in the
tag for the argument in the idl.

Followups set to microsoft.public.vc.activextemplatelib

--
 David Foster            |  "But I've been to the pointless forest,  

 finger for PGP key      |              -- Oblio, The Point



Wed, 02 May 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. optional arguments in ActiveX methods

2. Optional argument in function call

3. C# equivalent of optional arguments ?

4. ?Can an argument be optional?

5. getopt & optional command-line arguments

6. Optional argument parameters in a c# function

7. getopt and optional arguments

8. ought I cast optional arguments to printf?

9. Optional Default argument

10. Optional arguments in ado

11. optional arguments in ActiveX control

12. How to deal with only one optional argument?

 

 
Powered by phpBB® Forum Software