简体   繁体   中英

Reading a File While Being Written to by Another Program(Windows)

So basically, I'm trying to read a log file from a game while that game is running in order to have my program react to it in dynamic ways. I know it's possible , as other programs such as Notepad(++) are able to do it. However, after searching for an answer, most of what I can come up with is only Linux related.

I have no idea as to how to go about this, help in doing so with either C++ or C# would be great. Even though I would prefer native C++ over C#.

“原生”winapi解决方案是CreateFile ,特别是其dwShareMode参数。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM