X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-3.5 required=5.0	tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL
X-Spam-Check-By: sourceware.org
Message-ID: <50BD0280.4070707@kouptsov.com>
Date: Mon, 03 Dec 2012 14:50:24 -0500
From: Konstantin Kouptsov <konstantin@kouptsov.com>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: isatty gives wrong result via ssh
References: <50B385F9.80103@kouptsov.com> <20121126160446.GB3800@calimero.vinschen.de> <50B79229.9020304@kouptsov.com> <20121203084357.GC2556@calimero.vinschen.de>
In-Reply-To: <20121203084357.GC2556@calimero.vinschen.de>
Content-Type: text/plain; charset=windows-1251
Content-Transfer-Encoding: 7bit
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


>> A followup question. My Windows application works with the Windows
>> Console API, and uses functions such as GetConsoleMode/SetConsoleMode,
>> GetConsoleScreenBufferInfo, SetConsoleCursorPosition,
>> ScrollConsoleScreenBuffer etc. When I connect via ssh from Linux to
>> the Windows box running Cygwin sshd, and then laungh this application,
>> none of these apparently work. Same if I connect from one
>> Windows/Cygwin box to another Windows/Cygwin box and run it.
> 
> As I wrote before, your pseudo tty is a pipe, not a console.  One of the
> unfortunate issues in Windows is the fact that consoles are not kernel
> objects, and that they use their own set of functions, rather than
> allowing to control them via escape sequences.  Since your process is
> not connected to a console, the console functions have no effect.
> 
>> Presumably, here, I should be using a Unix-like console control
>> interface, and link against ncurses port, provided with Cygwin.
> 
> You can't link Cygwin libs against native Windows applications.
> They require the Cygwin DLL to run.


Is there a way to compile a dynamic library from within Cygwin (using gcc etc.), which itself would use the Cygwin DLL, ncurses port ans whatever else it needs, but which would have an interface so that a native Windows app would be able to load it?

I assume it would require Cygwin and its libraries installed to be usable - that's ok.


(I am looking for ways to control Cygwin terminal from a native Windows app., but trying to avoid being a http://cygwin.com/acronyms/#3PP)

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

