Thanks Luis.
Can I just add an ATL object to my arx project for this to work or do I need to set up a new project for a COM interface complete with idl file?
Here is what I do, just in case...
For that, I never have been able to use the arx wizard, I use VS -> Add Class -> ATL Simple object -> fill the form with the class name -> under support select ISupportErrorInfo
Then, also the arx wizard (for me) does not work to add any new method, so I simple go to the idl file an under the IDispatch I place my method calls - manually (as I do also for my function calls too - the ones on my previous sample):
[id(1), helpstring("method GbPolySS")]
HRESULT GbPolySS([in] VARIANT ids, [in] BSTR LayerName, [in] BSTR LayerNameOut, [in] double dtol, [in] short poltip, [in] double areamin, [in] short inpol, [in] short outpol, [in] short dirpolhor, [out] VARIANT *objids);
[id(2), helpstring("method GbPolyPT")]
HRESULT GbPolyPT([in] VARIANT pt, [in] BSTR LayerName, [in] double dtol, [in] short poltip, [in] double areamin, [in] short dirpolhor, [out] LONG *objid);
I think that's it, (from memory)....