UtilSharedMemoryReadToEnd(MemoryMappedFile) Method
Reads from start to end the data of an existing MemoryMappedFile.
Note that the returned bytes could contain null bytes at the end
due to the automatic size rounding of a multiple of 4096 bytes (4 KB).
Namespace: DevCase.Core.Diagnostics.ProcessesAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static byte[] ReadToEnd(
MemoryMappedFile mmf
)
Public Shared Function ReadToEnd (
mmf As MemoryMappedFile
) As Byte()
Dim mmf As MemoryMappedFile
Dim returnValue As Byte()
returnValue = UtilSharedMemory.ReadToEnd(mmf)
public:
static array<unsigned char>^ ReadToEnd(
MemoryMappedFile^ mmf
)
static member ReadToEnd :
mmf : MemoryMappedFile -> byte[]
No code example is currently available or this language may not be supported.
- mmf MemoryMappedFile
-
The MemoryMappedFile segment.
Byte
The byte-data.
This is a code example.
No code example is currently available or this language may not be supported.
Dim enc As Encoding = Encoding.Default
Dim str As String = "Hello World!"
Dim result As String
Using mmf As MemoryMappedFile = SharedMemoryUtil.Create("My MemoryMappedFile Name", capacity:=4096)
SharedMemoryUtil.Write(mmf, enc.GetBytes(str))
result = enc.GetString(SharedMemoryUtil.ReadToEnd(mmf)).TrimEnd(ControlChars.NullChar)
End Using
MessageBox.Show(result)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.