(I've changed if from launching "test.exe" to launching "cmd /c dir").
If I run this I get:
Exception thrown at 0x49409D2A in ConsoleApplication3.exe: 0xC0000008: An invalid handle was specified.
Running in the debugger, it is in the destructor of the async_pipe object, in "win_iocp_handle_service::close_for_destruction".
I've tried various of the examples with varying degrees of success. But any time I seem to use an async_pipe, I seem to get an "invalid handle" exception when it is calling CloseHandle on the completion port handle.