I try to make an UNIX application to work in windows somehow so that I could
make some functionality related testing in windows. Application uses POSIX
message queues i.e. including <mqueue.h> and using calls like mq_open,
mq_send, mq_receive and so on. Is there any Win32 equivalent to the POSIX
message queue available? I could live with some simple solution which do not
force me to change the code so much.
Thanks for your time.
Using native Win32 the usual way is to create a one-way message-oriented
named pipe (CreateNamedPipe() function with options PIPE_ACCESS_INBOUND,
PIPE_TYPE_MESSAGE and PIPE_READMODE_MESSAGE). I have used this method to
port some Unix code myself. It is also possible to assign security ACLs
to allow specific users and groups to send messages through the pipe.
If you want to minimize the need of changing your code you can use a
Posix->Win32 run-time API conversion layer, like Cygwin, but of course
this is not a good solution if you want the best performance possible on
the Win32 platform. There are Posix-compatible compilers available on
Cygwin. http://www.cygwin.org
--
Olof Lagerkvist
ICQ: 724451
Web page: http://here.is/olof