BOLTStack.Win32.PostThreadMessage C# (CSharp) Method

PostThreadMessage() private method

private PostThreadMessage ( uint id, uint msg, UIntPtr wparam, IntPtr lparam ) : bool
id uint
msg uint
wparam System.UIntPtr
lparam System.IntPtr
return bool
        public static extern bool PostThreadMessage(uint id, uint msg, UIntPtr wparam, IntPtr lparam);

Usage Example

Example #1
0
        private void InvokeInternal(Action action)
        {
            Monitor.Enter(this);
            try
            {
                if (_invokeActions == null)
                {
                    _invokeActions = new Queue <System.Action>();
                }
            }
            finally
            {
                Monitor.Exit(this);
            }

            Monitor.Enter(_invokeActions);
            try
            {
                if (_invokeActionMessage == 0)
                {
                    _invokeActionMessage = Win32.RegisterWindowMessage(XLBOLT_INVOKE_ACTION);
                }
                _invokeActions.Enqueue(action);
            }
            finally
            {
                Monitor.Exit(_invokeActions);
            }

            if (IsMessageLoopBegin)
            {
                Win32.PostThreadMessage(_threadID, _invokeActionMessage, UIntPtr.Zero, IntPtr.Zero);
            }
        }