NI TestStand

Showing results for 
Search instead for 
Did you mean: 

PostUIMessageEx from C#

Go to solution


I've managed to send my message by PostUIMessageEx from TS sequence and handle it in my OI. 

Is it way to send same PostUIMessageEx message from C# dll?

I'm trying to do following but not succseeded 


public void UDPConnect (SequenceContext seqContext, out bool result, out String reportText, out bool errorOccurred, out int errorCode, out String errorMsg)

       PropertyObject propertyObject = seqContext.AsPropertyObject();

       Thread.PostUIMessageEx(NationalInstruments.TestStand.Interop.API.UIMessageCodes.UIMsg_UserMessageBase + 3, 0.0, "Hello", propertyObject.GetValInterface("Locals.Thread", 0), true);




Please find attachment.

Thanks a lot

0 Kudos
Message 1 of 2
Accepted by airspan

Where is "Thread" coming from? You need to get it from the sequence context. Thread is an object you need to make the call on.


Hope this helps,


0 Kudos
Message 2 of 2