COM method signature:
[id(18), helpstring("met hod MakeSomeAvg")] HRESULT
MakeSomeAvg(
[in] VARIANT tag,
[in] DATE beginTime,
[in] short numSamples,
[in, optional] BOOL unitUpOnly,
[in, optional] BOOL setNegativeToZe ro,
[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,
[optionalattribu te] BOOL unitUpOnly,
[optionalattribu te] BOOL setNegativeToZe ro,
[optionalattribu te] VARIANT secondaryTag,
[optionalattribu te] BSTR secondaryType,
[optionalattribu te] 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 [preservesigattr ibute] help?
Thanks a lot for your help.