Genicam connection monitoring in vb.net

Using the example from;
https://help.commonvisionblox.com/NextGen/14.0/md_theory_of_operation_hardware__gen_i_cam__c_v_b__user_guide.html#gcug_chmtopic59
It was a breeze to implement the connection monitoring for c#, but working on a vb.net project I run into a snag.

it seems that this part of the example is where the online code convertors don’t understand whats happening anymore;

disconnectedEvent = DeviceDisconnectedEvent;
I’m guessing it’s some syntactical fluff at fault, but I don’t exactly know what goes wrong, which frustrates my attempts at googling for a solution. Any ideas?

edit;
using the c style API of course, that’s usefull info to include :slight_smile:

You need the AddressOf keyword:

VB.NET delegates

You don’t need AddHandler as this is only a delegate and not an event.

1 Like

Thanks, that did the trick!