UtilSharedMemoryReadStringToEnd(MemoryMappedFile, Encoding) Method
Reads from start to end the data 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 ReadStringToEnd(
MemoryMappedFile mmf,
Encoding enc = null
)
Public Shared Function ReadStringToEnd (
mmf As MemoryMappedFile,
Optional enc As Encoding = Nothing
) As String
Dim mmf As MemoryMappedFile
Dim enc As Encoding
Dim returnValue As String
returnValue = UtilSharedMemory.ReadStringToEnd(mmf,
enc)
public:
static String^ ReadStringToEnd(
MemoryMappedFile^ mmf,
Encoding^ enc = nullptr
)
static member ReadStringToEnd :
mmf : MemoryMappedFile *
?enc : Encoding
(* Defaults:
let _enc = defaultArg enc null
*)
-> string
No code example is currently available or this language may not be supported.
- mmf MemoryMappedFile
-
The MemoryMappedFile segment.
- enc Encoding (Optional)
-
The text Encoding.
String
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 = SharedMemoryUtil.ReadStringToEnd(mmf, enc)
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.