public void ovrMessage_Init(MESSAGE id, ovrMQWait wait) { // this byref? this.Id = id; this.Wait = wait; //memset( message->Parms, 0, sizeof( message->Parms ) ); this.Parms = new ovrMessageParms[MAX_MESSAGES]; // calloc // http://stackoverflow.com/questions/1622196/malloc-zeroing-out-memory }
// VrCubeWorld.MESSAGE.MESSAGE_ON_RESUME public void ovrMessageQueue_PostMessageThenWait(MESSAGE id) { var message = default(VrCubeWorld.ovrMessage); message.ovrMessage_Init(id, VrCubeWorld.ovrMQWait.MQ_WAIT_PROCESSED); this.ovrMessageQueue_PostMessage(ref message); // Task.Wait() }
/// <summary> /// Monitor for DAT.NULL / MSG.* stuff... /// </summary> /// <param name="a_intptrHwnd">Window handle that we're monitoring</param> /// <param name="a_iMsg">A message</param> /// <param name="a_intptrWparam">a parameter for the message</param> /// <param name="a_intptrLparam">another parameter for the message</param> /// <returns></returns> public bool PreFilterMessage ( IntPtr a_intptrHwnd, int a_iMsg, IntPtr a_intptrWparam, IntPtr a_intptrLparam ) { STS sts; MESSAGE msg; // This is only in effect after MSG.ENABLEDS*... if (m_state < STATE.S5) { return (false); } // Convert the data... msg = new MESSAGE(); msg.hwnd = a_intptrHwnd; msg.message = (uint)a_iMsg; msg.wParam = a_intptrWparam; msg.lParam = a_intptrLparam; // Allocate memory that we can give to the driver... if (m_tweventPreFilterMessage.pEvent == IntPtr.Zero) { m_tweventPreFilterMessage.pEvent = Marshal.AllocHGlobal(Marshal.SizeOf(msg)); } Marshal.StructureToPtr(msg, m_tweventPreFilterMessage.pEvent, true); // See if the driver wants the event... m_tweventPreFilterMessage.TWMessage = 0; sts = DatEvent(DG.CONTROL, MSG.PROCESSEVENT, ref m_tweventPreFilterMessage); if ((sts != STS.DSEVENT) && (sts != STS.NOTDSEVENT)) { return (false); } // Handle messages... ProcessEvent((MSG)m_tweventPreFilterMessage.TWMessage); // All done, tell the app we consumed the event if we // got back a status telling us that... return (sts == STS.DSEVENT); }
public void UpdateMessage(MESSAGE message) { _ctx.MESSAGEs.Update(message); _ctx.SaveChanges(); }
public void AddMessage(MESSAGE message) { _ctx.MESSAGEs.Add(message); _ctx.SaveChanges(); }
//Response //RecID - 1 public void initialiseClient(MESSAGE msg, Client client) { client.Alias = msg.strParam1; client.IP = msg.strParam2; }
public async Task TestDecryptWorks() { var decryptedMessage = await Signus.DecryptAsync(wallet, pool, _myDid, _trusteeDid, _encryptedMessage, _nonce); Assert.IsTrue(MESSAGE.SequenceEqual(decryptedMessage)); }