Hello
I'm trying to use this OLE DLL interface in a C# program:
Here is the C# code
The last line generates an error "No overload for method 'Add' takes '2' arguments"
I've scoured the internet and have tried every filling in the 3rd parameteer with every permutation of System.Reflecti on.Missing.Valu e, [DllImport("")], etc, etc, imaginable.
DataValue does not have a constructor. The only way to instantiate a DataValue is by using DataRecordset.A dd.
Any ideas?
I'm trying to use this OLE DLL interface in a C# program:
Code:
[id(0x60030016), helpstring("Adds a new Data Value to the recordset"), helpcontext(0x00000c1d)]
HRESULT Add(
[in, out] BSTR* Tagname,
[in, out] DATE* TimeStamp,
[in, out, optional, defaultvalue(<unprintable IDispatch*>)] _DataValue** InValue,
[out, retval] _DataValue** );
Code:
iHistorian_SDK.DataRecordset MyRecordsetD;
MyRecordsetD = MyData.NewRecordset();
iHistorian_SDK.DataValue MyValue;
string TestTagD = "TestTag";
DateTime TestDate = DateTime.Parse("6/10/2010 15:30");
MyRecordsetD.Add(ref TestTagD, ref TestDate);
I've scoured the internet and have tried every filling in the 3rd parameteer with every permutation of System.Reflecti on.Missing.Valu e, [DllImport("")], etc, etc, imaginable.
DataValue does not have a constructor. The only way to instantiate a DataValue is by using DataRecordset.A dd.
Any ideas?
Comment