CX25 ActiveX control in .Net windows service

0

I have a CX25 coin dispenser ActiveX provided with test application from client (developed by unknow technology) and need to drive coin dispenser through .Net technology using Win service or API. Successfuly added the COM reference and included the namespace and created the object( See below code reference).

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CX25Lib;


namespace CX25HIDUSB
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                var cx25 = new CX25();
                Console.WriteLine(cx25.AmountDispensed);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }


        }
    }
}

While accessing "cx25.AmountDispensed" OR any other properties ,got error like "Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))"

Please it kills my time and looking for real help OR suggestion to handle it in different way here.

c#
asked on Stack Overflow Jan 26, 2021 by user1528660

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0