This interface is implemented by a pipe port device.
interface IPipePortDevice extends ${IDevice} {
// Properties
readonly ${pipeName}: string;
readonly ${numberOfInstances}: number;
readonly ${outputBufferSize}: number;
readonly ${inputBufferSize}: number;
readonly ${defaultTimeout}: number;
readonly ${securityDescriptor}: string;
// Methods
${configureCreatePipe}(pipeName: string,
numberOfInstances: number,
outputBufferSize: number,
inputBufferSize: number,
defaultTimeout: number): void;
${configureCreatePipe2}(pipeName: string,
securityDescriptor: string,
numberOfInstances: number,
outputBufferSize: number,
inputBufferSize: number,
defaultTimeout: number): void;
${configureConnectPipe}(pipeName: string): void;
}
public interface IPipePortDevice : ${IDevice}
{
// Properties
string ${pipeName} { get; }
uint ${numberOfInstances} { get; }
uint ${outputBufferSize} { get; }
uint ${inputBufferSize} { get; }
uint ${defaultTimeout} { get; }
string ${securityDescriptor} { get; }
// Methods
void ${configureCreatePipe}(string pipeName,
uint numberOfInstances,
uint outputBufferSize,
uint inputBufferSize,
uint defaultTimeout);
void ${configureCreatePipe2}(string pipeName,
string securityDescriptor,
uint numberOfInstances,
uint outputBufferSize,
uint inputBufferSize,
uint defaultTimeout);
void ${configureConnectPipe}(string pipeName);
}
struct IPipePortDevice : IDevice
{
// Properties
_bstr_t ${pipeName}; // get
unsigned ${numberOfInstances}; // get
unsigned ${outputBufferSize}; // get
unsigned ${inputBufferSize}; // get
unsigned ${defaultTimeout}; // get
_bstr_t ${securityDescriptor}; // get
// Methods
HRESULT ${configureCreatePipe}(_bstr_t pipeName,
unsigned numberOfInstances,
unsigned outputBufferSize,
unsigned inputBufferSize,
unsigned defaultTimeout);
HRESULT ${configureCreatePipe2}(_bstr_t pipeName,
_bstr_t securityDescriptor,
unsigned numberOfInstances,
unsigned outputBufferSize,
unsigned inputBufferSize,
unsigned defaultTimeout);
HRESULT ${configureConnectPipe}(_bstr_t pipeName);
};
readonly pipeName: string;
string pipeName { get; }
_bstr_t pipeName; // get
The full name of the pipe this port is associated with. The pipe name returned is of the form \\servername\pipe\pipename
.
readonly numberOfInstances: number;
uint numberOfInstances { get; }
unsigned numberOfInstances; // get
The maximum number of instances that can be created for this pipe. The first instance of the pipe can specify this value; the same number must be specified for other instances of the pipe. Acceptable values are in the range 1 through 255. 255 means “unlimited instances”, in this case the number of pipe instances that can be created is limited only by the availability of system resources.
readonly outputBufferSize: number;
uint outputBufferSize { get; }
unsigned outputBufferSize; // get
The number of bytes to reserve for the output buffer. This value is only a hint.
readonly inputBufferSize: number;
uint inputBufferSize { get; }
unsigned inputBufferSize; // get
The number of bytes to reserve for the input buffer. This value is only a hint.
readonly defaultTimeout: number;
uint defaultTimeout { get; }
unsigned defaultTimeout; // get
The default time-out value, in milliseconds. Each instance of a named pipe must specify the same value. A value of zero will result in a default time-out of 50 milliseconds.
readonly securityDescriptor: string;
string securityDescriptor { get; }
_bstr_t securityDescriptor; // get
Holds the current pipe security descriptor. If empty, default security descriptor grants connection rights to Everyone
.
configureCreatePipe(pipeName: string,
numberOfInstances: number,
outputBufferSize: number,
inputBufferSize: number,
defaultTimeout: number): void;
void configureCreatePipe(string pipeName,
uint numberOfInstances,
uint outputBufferSize,
uint inputBufferSize,
uint defaultTimeout);
HRESULT configureCreatePipe(_bstr_t pipeName,
unsigned numberOfInstances,
unsigned outputBufferSize,
unsigned inputBufferSize,
unsigned defaultTimeout);
pipeName
\\.\pipe\pipename
where pipename
is a unique pipe name (possibly with path).numberOfInstances
outputBufferSize
inputBufferSize
defaultTimeout
Configures the port to automatically created a given named pipe whenever it is opened by an application. If an error occurs during creation of the pipe, this error is propagated back to the opener of the virtual serial port.
configureCreatePipe2(pipeName: string,
securityDescriptor: string,
numberOfInstances: number,
outputBufferSize: number,
inputBufferSize: number,
defaultTimeout: number): void;
void configureCreatePipe2(string pipeName,
string securityDescriptor,
uint numberOfInstances,
uint outputBufferSize,
uint inputBufferSize,
uint defaultTimeout);
HRESULT configureCreatePipe2(_bstr_t pipeName,
_bstr_t securityDescriptor,
unsigned numberOfInstances,
unsigned outputBufferSize,
unsigned inputBufferSize,
unsigned defaultTimeout);
pipeName
\\.\pipe\pipename
where pipename
is a unique pipe name (possibly with path).securityDescriptor
GENERIC_READ
, GENERIC_WRITE
and SYNCHRONIZE
standard rights to groups or users. If empty string is specified, by default, pipe access is granted to the Everyone
group.numberOfInstances
outputBufferSize
inputBufferSize
defaultTimeout
Configures the port to automatically created a given named pipe whenever it is opened by an application. If an error occurs during creation of the pipe, this error is propagated back to the opener of the virtual serial port.
configureConnectPipe(pipeName: string): void;
void configureConnectPipe(string pipeName);
HRESULT configureConnectPipe(_bstr_t pipeName);
pipeName
\\servername\pipe\pipename
, where servername
is pipe's server name, DNS name, IP address or any other supported locator and pipename
is a unique pipe name (possibly with a path).Configures the port to automatically connect to a given pipe whenever it is opened by an application. If an error occurs during connection to the pipe, this error is propagated back to the opener of the virtual serial port.