UtilSharedMemoryReadString(String, Int64, Int64, Encoding) Method
Reads a byte sequence from a start position to an end position of an existing MemoryMappedFile,
decodes the byte data using the specified Encoding and returns the corresponding string.
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 string ReadString(
string name,
long starIndex,
long endIndex,
Encoding enc = null
)
Public Shared Function ReadString (
name As String,
starIndex As Long,
endIndex As Long,
Optional enc As Encoding = Nothing
) As String
Dim name As String
Dim starIndex As Long
Dim endIndex As Long
Dim enc As Encoding
Dim returnValue As String
returnValue = UtilSharedMemory.ReadString(name,
starIndex, endIndex, enc)
public:
static String^ ReadString(
String^ name,
long long starIndex,
long long endIndex,
Encoding^ enc = nullptr
)
static member ReadString :
name : string *
starIndex : int64 *
endIndex : int64 *
?enc : Encoding
(* Defaults:
let _enc = defaultArg enc null
*)
-> string
No code example is currently available or this language may not be supported.
- name String
-
The name of 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.
- enc Encoding (Optional)
-
The text Encoding.
String
The decoded string.
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 = SharedMemoryUtil.ReadString("My MemoryMappedFile Name", startIndex:=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.