Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何为 ReadFile 和 WriteFile 操作设置超时,
使用进程间管道时?
您必须通过指定来使用函数的异步版本FILE_FLAG_OVERLAPPED。
FILE_FLAG_OVERLAPPED
达到超时时,您可以CancelIO使用文件句柄进行调用。
CancelIO