Applies To: |
|
Summary: |
MsgOpen() returns a handle even though the
message session is not online.
For example, if a client is started and no server is running, trying CiCode function MsgOpen("alarm", 0, 0) will return a handle even if the client is not attached to any alarm server. Using that message handle in other message functions may result in unexpected behavior. |
Solution: |
A new CiCode Function - INT MsgState(INT
hMsg) has been added.
Users should call MsgState(hMsg) with the message session handle returned from MsgOpen(Name, Mode, Fn) to verify the status of that message session. If the status of the message session is online, the message session handle is truly valid and the callback function - "Fn" (the third argument in MsgOpen) is set effectively. Example code on how to use this MsgState().
CIT has confirmed this to be a problem in Citect for Windows versions up to 5.40 Service Pack B. This problem has been fixed in version 5.41. |
Keywords: |
Related Links
Attachments