user196614
user196614

Reputation: 243

Unable to out/retval parameter in COM interface method in VC++ 2008

I want to create a simple COM component in VC++ 2008. I have created ATL Project with all default options. I have added Simple ATL object (interface IDemo). Now I want to add a methos inside IDemo. But the "Add Method Wizard" does not allow me to add out/retval type of parameters to the method. I can add in type of parameters.

Is it possible to add out/retval type of parameters? If yes then How can I do it?

Thanks

Upvotes: 2

Views: 1032

Answers (1)

user196614
user196614

Reputation: 243

If you select any parameter of type pointer then only it enables the out and retval checkboxes. For non pointer type parameters it doesn't enable the out and retval checkboxes.

E.g. if you select CHAR as the parameter type then the out and retval checkboxes are not enabled where as if you select CHAR * as the parameter type then the out and retval checkboxes are enabled.

Upvotes: 3

Related Questions