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.
我需要调用 Windows 库中的一个函数,该函数将CreateFile创建的文件的句柄作为参数。在我的应用程序中,我对库在此文件上生成的输出不感兴趣。有没有办法让我在 *nix 操作系统中为 /dev/null 之类的空文件创建句柄?
您正在寻找内置"NUL"文件。
"NUL"