X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=1.3 required=5.0 	tests=AWL,BAYES_00,SPF_PASS,URI_BLOGSPOT
X-Spam-Check-By: sourceware.org
From: Barry Kelly <bkelly.ie@gmail.com>
To: cygwin@cygwin.com
Subject: Re: DOS programs under "screen"
Date: Tue, 21 Apr 2009 19:10:54 +0100
Message-ID: <q4uru498ltbhiqfl8vt877lk0va00pk3ih@4ax.com>
References: <C2163734F5AC6346B64F4DD53C7F7A2803155C5A@rxsprimary.accessrxs.com> <okjpu495u4a7ad3cupjt10nd4iv53pt2ni@4ax.com>
In-Reply-To: <okjpu495u4a7ad3cupjt10nd4iv53pt2ni@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Andrew Schulman wrote:

> > In general, non-cygwin programs can't be run reliably inside of an
> > application that uses cygwin PTYs, including xterm, rxvt, and screen.
>=20
> Maybe someone knows a solution to this, but I don't.  Although I maintain=
 screen
> for Cygwin, I know almost nothing of the details of how terminals work.  =
I could
> imagine some kind of a DOS-to-Unix terminal wrapper program, but I've nev=
er seen
> one and have no idea how it would work.

Windows implements console mode as a client-server protocol between the
executable (ntvdm.exe for DOS apps) and winsrv.dll (hosted in
csrss.exe), but the protocol isn't easily hookable. I guess one would
have to hijack the console APIs, perhaps by stepping into the
application using debugging APIs and overwriting the DLL imports, but it
would be pretty painful.

I don't know how DOS programs that use graphics modes (in fullscreen)
are implemented, though these must be rare now given that Vista no
longer has a full-screen mode.

-- Barry

--=20
http://barrkel.blogspot.com/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

