UnauthorizedAccessException on MemoryMappedFile in C# 4

后端 未结 4 1894
醉梦人生
醉梦人生 2021-01-11 12:20

I wanted to play around with using a MemoryMappedFile to access an existing binary file. If this even at all possible or am I a crazy person?

The idea would be to ma

4条回答
  •  时光取名叫无心
    2021-01-11 12:45

    It is difficult to say what might be going wrong. Since there is no documentation on the MSDN website yet, your best bet is to install FILEMON from SysInternals, and see why that is happening.

    Alternately, you can attach a native debugger (like WinDBG) to the process, and put a breakpoint on MapViewOfFile and other overloads. And then see why that call is failing.

提交回复
热议问题