I took a snippet of your code from the website and put it into a simple 'hello world' app to test it out. This is a console application with a .NET core 3.1 target using Visual Studio 2019. I am using QuickOPC 5.59.0-rev13. The full code is at the bottom of the post.
When I run the application I get this:
*** Failure: The requested OPC Alarms&Events technology 'Com' is not supported. Check the scheme "opcda" in server URL string "opcda:Matrikon.OPC.Simulation.1".
Note that I am trying to connect for A&E information, but it is appending "opcda:" to the beginning of the connection string that it returns. I get the same error when I use the OPCLabs event server.
using System;
using System.Diagnostics;
using System.Threading;
using OpcLabs.EasyOpc;
using OpcLabs.EasyOpc.AlarmsAndEvents;
using OpcLabs.EasyOpc.AlarmsAndEvents.OperationModel;
using OpcLabs.EasyOpc.DataAccess;
using OpcLabs.EasyOpc.OperationModel;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Main1();
}
public static void Main1()
{
using (var client = new EasyAEClient())
{
var eventHandler = new EasyAENotificationEventHandler(client_Notification);
client.Notification += eventHandler;
//int handle = client.SubscribeEvents("", "OPCLabs.KitEventServer.2", 1000);
int handle = client.SubscribeEvents("", "Matrikon.OPC.Simulation.1", 1000);
Console.WriteLine("Processing event notifications for 1 minute...");
Thread.Sleep(60 * 1000);
client.UnsubscribeEvents(handle);
}
}
// Notification event handler
static void client_Notification(object sender, EasyAENotificationEventArgs e)
{
if (!e.Succeeded)
{
Console.WriteLine("*** Failure: {0}", e.ErrorMessageBrief);
return;
}
if (e.EventData != null)
Console.WriteLine(e.EventData.Message);
}
}
}