Example #1
0
        /// <summary>
        /// FetchAndDisplayError - Display error in status bar
        /// </summary>
        public void FetchAndDisplayError()
        {
            strBuffer = string.Empty;

            // Is this a RAPI error?
            int err = Rapi.CeRapiGetError();

            if (err != Rapi.S_OK)
            {
                strBuffer = "RAPI Error (0x" + ((int)err).ToString("x") + ")";
            }
            else
            {
                // Check for CE error.
                err = Rapi.CeGetLastError();
                if (err != (int)Rapi.RAPI_ERROR.ERROR_FILE_NOT_FOUND)
                {
                    strBuffer = "CE Error (code = " +
                                err.ToString("x") + ")";
                }
            }
            if (strBuffer != string.Empty)
            {
                itReason = INVOKE_FINDFILES.STATUS_MESSAGE;
                m_ctlInvokeTarget.Invoke(m_deleCallback);
            }

            // Trigger that thread has ended.
            m_thrd = null;
        }