File operations on a Windows Driver (character device)
Mon May 18 12:34:00 GMT 2015
I'm developing a port of a FreeBSD/Linux application that consists of
two parts: a kernel and a user land part.
The kernel part is build as a WDM driver and is compiled with VS2013
and WDK 8.1: the userspace is going to
be compiled under Cygwin for compatibility with user land programs
already written for other OSs.
My problem is that the user space program invokes Open(), ioctl(),
mmap/munmap(), select() and poll().
I've build a test Win32 app to open with CreateFile the DosDevice with
the "\\\\.\\uniioctl" name and everything goes fine,
but I've tried to do the same thing with Open(...) with a lot of
variants (\\DosDevice\\uniioctl, \dev\uniioctl....) but I'm
unable to open the character device. There is some way to do this?
For the second main problem, I need to do an mmap/munmap; I was
thinking to emulate this mechanism with an IOCTL
in the kernel module but doing so, I wouldn't be able to use the mmap
provided by Cygwin if I've understood how the
things are working; so I'm wondering how to cope with this problem;
there's some way to explicitly tell Cygwin where
to find the memory that needs to be allocated in userspace? How can I
do this in the kernel module?
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin