This is the mail archive of the
mailing list for the Cygwin project.
Re: File operations on a Windows Driver (character device)
- From: "Larry Hall (Cygwin)" <reply-to-list-only-lh at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 18 May 2015 10:47:58 -0400
- Subject: Re: File operations on a Windows Driver (character device)
- Authentication-results: sourceware.org; auth=none
- References: <CACs=mWDRGh9KZBT45=8yy4J6h62v0RNYxczV91qRhhb8LcfY4Q at mail dot gmail dot com>
- Reply-to: cygwin at cygwin dot com
On 05/18/2015 05:42 AM, Alessio Faina wrote:
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?
Sorry I can't help with allot of specifics on your questions but I can
say that when using Cygwin, you are best off if you stick to POSIX syntax
and semantics and don't mix in Windows code and Windowisms. That includes
path separators (i.e. use '/', not '\'). See this page in the User's Guide
for information on how Cygwin handles device emulation too:
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple