AnsweredAssumed Answered

Writing a wrapper for a COM object in C

Question asked by slowslc on Oct 16, 2006
Latest reply on Oct 16, 2006 by odanzy
Hi

I am writing a wrapper for a COM in C# but I keep getting this error. I am new to this. So bear with me

I am using the "AgilentIOtilsLib" - a sample code is below in C#. The error is triggered in the constructor

This is OK

namespace AgilentComWrapper
{
    public class IOManager : IDisposable
    {

        AgilentIOUtilsLib.AgtIOManager comIOManager = null;

        //Constructor

        public IOManager()
        {
            comIOManager = new AgilentIOUtilsLib.AgtIOManager();
        }

This is NOT OK

    public class IOServer : IDisposable
    {

        AgilentIOUtilsLib.AgtIOServer comIOServer = null;

        // Constructor

        public IOServer()
        {
            comIOServer = new AgilentIOUtilsLib.AgtIOServer();
        }


I get a bunch of those error messages

BufferSize = '((AgilentIOUtilsLib.AgtIOServerClass)(comIOServer)).BufferSize' threw an exception of type 'System.NotImplementedException'


ComponentDescription = '((AgilentIOUtilsLib.AgtIOServerClass)(comIOServer)).ComponentDescription' threw an exception of type 'System.NotImplementedException'

etc

Those are part of the IIO inheritance classes.

Thanks

david  

Outcomes