How to use SafeBuffer in C #

What is a simple example of using SafebUffer? That is, how do I create and initialize it? The MSDN documentation is not displayed to show this.

+5
source share
1 answer

You cannot, this is an abstract class. The only visible concrete implementation is SafeMemoryMappedViewHandle, a helper class for classes in the System.IO.MemoryMappedFiles namespace. It has an unavailable constructor, since it can only be correctly initialized with plumbing, which makes memory-mapped files work.

- IntPtr, , . API Windows, MapViewOfFile GlobalAllocPtr. , SafeBuffer, , , AcquirePointer. . ?

+6

All Articles