Example #1
0
        ///////////////////////////////////////////////////////////////////////////////////////////////

        private static ReturnCode WaitForSingleHandle(
            WaitHandle waitHandle,
            int milliseconds,
            bool userInterface,
            ref uint returnValue
            )
        {
            ReturnCode code;
            Result     error = null;

            code = WaitForSingleHandle(
                waitHandle, milliseconds, userInterface, ref returnValue, ref error);

            if (code != ReturnCode.Ok)
            {
                DebugOps.Complain(code, error);
            }

            if (traceWait)
            {
                TraceOps.DebugTrace(String.Format(
                                        "WaitForSingleHandle: exited, waitHandle = {0}, " +
                                        "milliseconds = {1}, userInterface = {2}, " +
                                        "returnValue = {3}, code = {4}, error = {5}",
                                        FormatOps.DisplayWaitHandle(waitHandle), milliseconds,
                                        userInterface, returnValue, code, FormatOps.WrapOrNull(
                                            true, true, error)), typeof(WindowOps).Name,
                                    TracePriority.NativeDebug);
            }

            return(code);
        }