This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Accessing Windows devices


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@cygwin.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]