http://bugs.winehq.org/show_bug.cgi?id=17195
--- Comment #3 from Luke Kenneth Casson Leighton lkcl@lkcl.net 2009-01-31 05:19:15 --- Created an attachment (id=19121) --> (http://bugs.winehq.org/attachment.cgi?id=19121) start of test app for messagemode
ok, you start this with: ./msrpcd.exe or if you want a single run: ./msrpcd.exe -p pipename
and then, client-side: ./msrpc.exe -p pipename -t testname
where the two tests so far are test1 and send2recv2
test1 is the simple send 1 recv 1 send 1 recv 1
send2recv2 as its name suggests sends 2 messages and then waits to receive 2.
but, due to the bug in messagemode, it only receives one, of total size of the glomming of both messages.
debug output. exit code is 1 on failure.
msrpcd.exe will run continuously, default pipe name "test", if you get bored of re-running it all the time.
internally, msrpcd.exe will create a new process, and back-to-back proxy the data between the "front" msrpcd.exe and the "child" msrpcd.exe over a unique pipe named after the thread-id.
i didn't cut this code out because i thought it would be useful, later.
it's not particularly well-written - there are better ways (such as use of DupHandle and other stuff) but hey, it was my first experiment with NamedPipes and i'm proud of it :)