Platforms to show: All Mac Windows Linux Cross-Platform

Back to WindowsPipeMBS class.

WindowsPipeMBS.Close

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 19.5 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Closes the pipe.

Called by destructor automatically.

WindowsPipeMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 19.5 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The constructor.

WindowsPipeMBS.CreatePipe(Name as string, MessageMode as Boolean = false, BufferSize as Integer = &h100000, AllowAllUsers as Boolean = false) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 19.5 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Creates a named pipe.

Buffersize defines the size for input/output buffers.
Returns true on success or false on failure.
Lasterror is set.

Normally the pipe allows only same user.
But if AllowAllUsers is true, you can talk to other users or from service to user.

If name does not start with \ then we prefix it with "\\.\Pipe\".

Some examples using this method:

WindowsPipeMBS.OpenPipe(Name as string) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 19.5 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Opens an existing named pipe from client side.

Returns true on success or false on failure.
Lasterror is set.

If name does not start with \ then we prefix it with "\\.\Pipe\".

Some examples using this method:

WindowsPipeMBS.Peek(ByteCount as Integer) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 19.5 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Reads data without removing it from the buffer.

Reads up to the given number of bytes.
BytesRead property is set and data is returned.
LastError property is set.

WindowsPipeMBS.PeekAll as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 19.5 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Reads all data without removing it from the buffer.

Reads whole message or in byte mode
BytesRead property is set and data is returned.
LastError property is set.

WindowsPipeMBS.Read(ByteCount as Integer) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 19.5 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Reads data.

Reads up to the given number of bytes.
BytesRead property is set and data is returned.
LastError property is set.

WindowsPipeMBS.ReadAll as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 19.5 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Reads all data.
Example
dim Pipe as WindowsPipeMBS // your pipe

Dim r As String = pipe.ReadAll
Dim d As String = DefineEncoding(r, Encodings.UTF8)

List.AddRow d

Reads whole message or in byte mode what is available.
BytesRead property is set and data is returned.
LastError property is set.

WindowsPipeMBS.Write(data as MemoryBlock)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 19.5 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Writes data.

Lasterror is set.
BytesWritten is set to number of bytes sent.

See also:

WindowsPipeMBS.Write(data as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Windows MBS Win Plugin 19.5 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Writes data.
Example
dim Pipe as WindowsPipeMBS // your pipe

Dim d As String = ConvertEncoding(MessageField.Text, encodings.UTF8)
If d.Len > 0 Then
pipe.Write d
MessageField.Text = ""
End If

Lasterror is set.
BytesWritten is set to number of bytes sent.

See also:

The items on this page are in the following plugins: MBS Win Plugin.


The biggest plugin in space...