Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

How Can I Guarantee Unique UIMessage Codes?

Primary Software: TestStand
Primary Software Version: 4.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
My TestStand system is being developed by several different engineers and needs to implement multiple UIMessages.  Is there a way to ensure that the UIMessage codes being used will be unique?

Solution:
Consider using the RegisterUIMessage method of the TestStand  Engine class as opposed to the traditional PostUIMessageEx method.  This method takes as a parameter a string representing the name of the UIMessage to be registered.

If this message has already been registered, the method returns the UIMessage code that has already been associated with said message.  If this message has not yet been registered, the method will return a UIMessage code unique to the newly registered UIMessage.

If there are no more message codes available for registration, the method returns -1.



Related Links:
TestStand 4.0 Help - RegisterUIMessage Method

Attachments:





Report Date: 03/19/2008
Last Updated: 03/19/2008
Document ID: 4JIEO26X

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit