COM method signature:
[id(18), helpstring("method MakeSomeAvg")] HRESULT
MakeSomeAvg(
[in] VARIANT tag,
[in] DATE beginTime,
[in] short numSamples,
[in, optional] BOOL unitUpOnly,
[in, optional] BOOL setNegativeToZero,
[in, optional] VARIANT secondaryTag,
[in, optional] BSTR secondaryType,
[in, optional] BOOL ignorePrefill,
[out, retval] LPVARIANT ppSample);
Would the equivalent C# signature be the following?
using System.Runtime.InteropServices;
C# method signature:
object MakeSomeAvg( object tag,
DateTime beginTime,
short numSamples,
[optionalattribute] BOOL unitUpOnly,
[optionalattribute] BOOL setNegativeToZero,
[optionalattribute] VARIANT secondaryTag,
[optionalattribute] BSTR secondaryType,
[optionalattribute] BOOL ignorePrefill,
);
Is there a way to preserve the old C++ signature and
return HRESULTs and also send back an [out,retval] from C#?
Will [preservesigattribute] help?
Thanks a lot for your help.