UtilSharedMemoryRead(String, Int64, Int64) Method
Reads a byte sequence from a start position to an end position 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[] Read(
string name,
long starIndex,
long endIndex
)
Public Shared Function Read (
name As String,
starIndex As Long,
endIndex As Long
) As Byte()
Dim name As String
Dim starIndex As Long
Dim endIndex As Long
Dim returnValue As Byte()
returnValue = UtilSharedMemory.Read(name, starIndex,
endIndex)
public:
static array<unsigned char>^ Read(
String^ name,
long long starIndex,
long long endIndex
)
static member Read :
name : string *
starIndex : int64 *
endIndex : int64 -> byte[]
No code example is currently available or this language may not be supported.
- name String
-
The name o the MemoryMappedFile segment.
- starIndex Int64
-
The start position to start reading from the MemoryMappedFile segment.
- endIndex Int64
-
The end position to stop reading from the MemoryMappedFile segment.
Byte
The byte sequence.
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("My MemoryMappedFile Name", enc.GetBytes(str))
result = enc.GetString(SharedMemoryUtil.Read("My MemoryMappedFile Name", starIndex:=0, endIndex:=5))
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.