internal virtual MsmqQueueHandle OpenQueue()
        {
            MsmqQueueHandle handle;
            int             error = UnsafeNativeMethods.MQOpenQueue(this.formatName, this.accessMode, this.shareMode, out handle);

            if (error != 0)
            {
                Utility.CloseInvalidOutSafeHandle(handle);
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new MsmqException(System.ServiceModel.SR.GetString("MsmqOpenError", new object[] { MsmqError.GetErrorString(error) }), error));
            }
            MsmqDiagnostics.QueueOpened(this.formatName);
            return(handle);
        }