safearray in COM

HI All,
I have a method in my COM API with a parameter SAFEARRAY.

So in my idl

mymethod(SAFEARRAY(VARIANT)* mysafearray)

in the .h file

mymethod(SAFEARRAY** mysafearray).

This work fine. But now i am using an attributed ATL project which does not use the idl to declare the method instead in the .h file itself.
In that case my declaration of the method with
Safearray(VARIANT)* mysafearray
does not compile.

I get c2143 syntax error:missing',' before'*'
error 3763 safearray retval and out can only appear on a data-pointer type.

Any help anyone? i tried using safearray** in the declaration and anything and everything and nothing seems to compile my code.
[766 byte] By [tarunk] at [2007-11-20 11:45:55]
# 1 Re: safearray in COM
Could it help you:
http://groups.google.com/group/microsoft.public.vc.atl/browse_frm/thread/50da04af951d3e66/e1d897b16ddfe631?lnk=st&q=safearray+retval+and+out+can+only+appear+on+a+data-pointer+type#e1d897b16ddfe631
VictorN at 2007-11-10 22:22:33 >
# 2 Re: safearray in COM
thank you so much, it worked great.. I have been searching all the internet/MS for some clue from morning and you put me in the right direction.
thanks.
tarunk at 2007-11-10 22:23:39 >