return static_cast<int_type>(read_len);
}
- bool is_open()
+ bool is_open() const
{
return (_source != ::boost::winapi::INVALID_HANDLE_VALUE_) ||
(_sink != ::boost::winapi::INVALID_HANDLE_VALUE_);
static constexpr int FILE_FLAG_OVERLAPPED_ = 0x40000000; //temporary
//static constexpr int FILE_ATTRIBUTE_NORMAL_ = 0x00000080; //temporary
+#if BOOST_NO_ANSI_APIS
+ std::wstring name_ = boost::process::detail::convert(name);
+#else
+ auto &name_ = name;
+#endif
::boost::winapi::HANDLE_ source = ::boost::winapi::create_named_pipe(
- name.c_str(),
+ name_.c_str(),
::boost::winapi::PIPE_ACCESS_INBOUND_
| FILE_FLAG_OVERLAPPED_, //write flag
- 0, 1, 8192, 8192, 0, nullptr);
+ 0, ::boost::winapi::PIPE_UNLIMITED_INSTANCES_, 8192, 8192, 0, nullptr);
if (source == boost::winapi::INVALID_HANDLE_VALUE_)
::boost::process::detail::throw_last_error("create_named_pipe() failed");