Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > IDL > Default paramet...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 196 of 223
Post > Topic >>

Default parameters in COM

by abedford <abedford@[EMAIL PROTECTED] > Aug 6, 2007 at 11:08 AM

Hi,

I would like to add a default parameter to a COM function. I defined
it in the IDL file like this:
HRESULT GetName( [in]          BSTR              id1
                              , [in]          BSTR              id2
                              , [in,
defaultvalue("False")]              BOOL
disableSignin
                           , [out, retval] BSTR** pName );

But when I try to implement this function in COM, I can't set the
default value because it is not the last parameter... and I have to
keep the return value as the last parameter (to stop from breaking
client's codes etc.).

Am I wrong in thinking it should be possible to set a default
parameter in a COM function? How do you get around having the return
value at the end of the list of parameters or is it only possible on a
void function?

Thanks.
 




 1 Posts in Topic:
Default parameters in COM
abedford <abedford@[EM  2007-08-06 11:08:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 5 13:57:55 CDT 2008.