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: File operations on a Windows Driver (character device)

On May 18 17:33, Alessio Faina wrote:
> Ok thanks, I've been able to find the character device under
> "/proc/sys/DosDevices/Global/deviceName"; now I'm stuck with the mmap
> implementation; when I do mmap in the userland program it returns me
> errno 19 (#define ENODEV      19  /* No such device */) obviously because
> I haven't set anything in the kernel module; there's a way to make visible a
> portion of memory to be used by the mmap in the kernel? The memory is Non Paged
> and allocated with a ExAllocatePoolWithTag in 'win terms'.

The problem is that the /proc/sys interface is only implemented for
very basic operations.  There's no ioctl and mmap implemented for
arbitrary devices in Cygwin.

To get your device working, you have to either implement support for it
in Cygwin, or you have to use native W32 or NT calls to access your

Alternatively: Since you can open the device, read/write should be
possible.  If you implement all interaction with your device (send
comands, request map address, etc) in the driver as specially crafted
read/write calls, you should be able to communicate with it from Cygwin
applications without having to implement a Cygwin file handler.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpbAaeHKn7R7.pgp
Description: PGP signature

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