PostThreadMessage() private méthode

private PostThreadMessage ( uint id, uint msg, UIntPtr wparam, IntPtr lparam ) : bool
id uint
msg uint
wparam System.UIntPtr
lparam System.IntPtr
Résultat bool
Exemple #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);
            }
        }