Hi, I am trying to read the details if an error is written to the windows event log within the application log.
I have a sample script in C# that I am trying to copy over to LabVIEW.
However, I am getting faults at attempting to do this.
I am looking to pull the date and time, event ID, Message, and Source to perform some comparisons on and log this data to a front panel. However, I am falling at the first hurdle.
Has anyone attempting to read from the Windows event log from LabVIEW before?
I've attached an image of the block diagram and also included the VIs - along with the C# code that I am attempting to replicate.
Solved! Go to Solution.
You haven't given a lot of details in terms of what is going on; but a few things stand out to me:
One last thing I forgot to add at the end - make sure you close references (including the event callback refnum) when you are finished.
I have put together a VI to try and recreate what is in the link.
Couple more questions:
The bit where the callback keeps running is this:
You need to create and add a "GC.Collect" node that runs after your references are closed for it to stop by itself.