M
madmike
hey,
first thanks for looking. I think this should be easy. I have a com
DLL (in C++) that has this struct:
[export]
struct IdxTimestampedWord {
BSTR word;
__int64 timestamp;
};
and this function:
__interface ISFClass : IUnknown
{
[helpstring("method DoThing")]
HRESULT DoThing( [in, size_is(TranscriptArraySize)] IdxWord
TranscriptWord[], [out,
size_is(TranscriptArraySize)]IdxTimestampedWord AlignedTranscript[]);
};
I added a referance to the DLL in my c# project and I have this
code...
MyNameSpace.IdxTimestampedWord[] obSrc = null;
MyNameSpace.IdxTimestampedWord[] obDst = null;
// fill obSrc
// call the function
MyNameSpace.MyClass myC= new MyNameSpace.MyClass();
myC.doThing(ref obSrc, out obDst)
and I get:
cannot convert from 'ref MyNameSpace.IdxTimestampedWord[]' to 'ref
MyNameSpace.IdxTimestampedWord'
So my question is what to I need to do to send the array I made in C#
to the COM object?
thanks,
mike
first thanks for looking. I think this should be easy. I have a com
DLL (in C++) that has this struct:
[export]
struct IdxTimestampedWord {
BSTR word;
__int64 timestamp;
};
and this function:
__interface ISFClass : IUnknown
{
[helpstring("method DoThing")]
HRESULT DoThing( [in, size_is(TranscriptArraySize)] IdxWord
TranscriptWord[], [out,
size_is(TranscriptArraySize)]IdxTimestampedWord AlignedTranscript[]);
};
I added a referance to the DLL in my c# project and I have this
code...
MyNameSpace.IdxTimestampedWord[] obSrc = null;
MyNameSpace.IdxTimestampedWord[] obDst = null;
// fill obSrc
// call the function
MyNameSpace.MyClass myC= new MyNameSpace.MyClass();
myC.doThing(ref obSrc, out obDst)
and I get:
cannot convert from 'ref MyNameSpace.IdxTimestampedWord[]' to 'ref
MyNameSpace.IdxTimestampedWord'
So my question is what to I need to do to send the array I made in C#
to the COM object?
thanks,
mike