/// <summary> /// retrieve a message from an event /// </summary> /// <param name="Event">Reference to Event</param> /// <returns>The message for an event</returns> public string EventText(ref USrvEvent Event) { StringBuilder message = new StringBuilder(MsgTextLen); Srv_EventText(ref Event, message, MsgTextLen); return(message.ToString()); }
/// <summary> /// Extracts an event (if available) from the Events queue. /// </summary> /// <param name="Event">Reference of User event</param> /// <returns>0: No errors. Otherwise see errorcodes</returns> public bool PickEvent(ref USrvEvent Event) { Int32 evtReady = new Int32(); if (Srv_PickEvent(server, ref Event, ref evtReady) == 0) { return(evtReady != 0); } else { return(false); } }
private static extern int Srv_EventText(ref USrvEvent Event, StringBuilder evtMsg, int textSize);
private static extern int Srv_PickEvent(IntPtr server, ref USrvEvent Event, ref Int32 evtReady);
public string EventText(ref USrvEvent Event) { StringBuilder Message = new StringBuilder(MsgTextLen); Srv_EventText(ref Event, Message, MsgTextLen); return Message.ToString(); }
protected static extern int Srv_EventText(ref USrvEvent Event, StringBuilder EvtMsg, int TextSize);
public bool PickEvent(ref USrvEvent Event) { Int32 EvtReady = new Int32(); if (Srv_PickEvent(Server, ref Event, ref EvtReady) == 0) return EvtReady != 0; else return false; }
protected static extern int Srv_PickEvent(IntPtr Server, ref USrvEvent Event, ref Int32 EvtReady);