delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/07/04/03:58:23

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Mon, 4 Jul 2005 09:58:14 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Accessing Windows devices
Message-ID: <20050704075814.GS21074@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <42F12280 DOT 5060504 AT herbertland DOT com>
Mime-Version: 1.0
In-Reply-To: <42F12280.5060504@herbertland.com>
User-Agent: Mutt/1.4.2i

On Aug  3 13:01, Tom Herbert wrote:
> Hello,
> I am creating my own Windows device driver and would like to be able to 
> access it through applications in Cygwin (normal device operations-- 
> open, close, read, write, ioctl).  I understand that there is support 
> for a number of POSIX devices (described in user's guide), but haven't 
> found a way to access other native Windows devices. Is there any way to 
> accomplish this in Cygwin?

There's no direct support in Cygwin to access Windows devices.  All device
access is going the official way through the Win32/NT layer.  If your
application calls open(), Cygwin actually calls CreateFile or NTCreateFile.

If you can live with Cygwin handling the device like a file, then you
can try to give the device a DOS name using DefineDosDevice and access
it using the \\.\devicename syntax.  Maybe that's all.  If not, you'll
have to actually add code to Cygwin which implements accessing your
device.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019