IGLib
1.5
The IGLib base library EXTENDED - with other lilbraries and applications.
|
The class exposes kernel32.dll methods for named pipes communication. More...
Public Member Functions | |
static uint | GetLastError () |
Retrieves the calling thread's last-error code value. More... | |
static IntPtr | CreateNamedPipe (String lpName, PipeOpenMode dwOpenMode, PipeMode dwPipeMode, uint nMaxInstances, uint nOutBufferSize, uint nInBufferSize, uint nDefaultTimeOut, IntPtr pipeSecurityAttributes) |
Creates an instance of a named pipe and returns a handle for subsequent pipe operations. More... | |
static bool | ConnectNamedPipe (IntPtr hHandle, IntPtr lpOverlapped) |
Enables a named pipe server process to wait for a client process to connect to an instance of a named pipe. More... | |
static bool | WaitNamedPipe (String name, int timeout) |
Waits until either a time-out interval elapses or an instance of the specified named pipe is available for connection. More... | |
static bool | SetNamedPipeHandleState (IntPtr hHandle, ref PipeMode lpMode, IntPtr lpMaxCollectionCount, IntPtr lpCollectDataTimeout) |
Sets the read mode and the blocking mode of the specified named pipe. More... | |
static IntPtr | CreateFile (String lpFileName, FileDesiredAccess dwDesiredAccess, FileShareMode dwShareMode, IntPtr fileSecurityAttributes, FileCreationDisposition dwCreationDisposition, uint dwFlagsAndAttributes, uint hTemplateFile) |
Creates or opens a file, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, or named pipe. More... | |
static bool | ReadFile (IntPtr hHandle, byte[] lpBuffer, uint nNumberOfBytesToRead, out uint lpNumberOfBytesRead, IntPtr lpOverlapped) |
Reads data from a file, starting at the position indicated by the file pointer. More... | |
static bool | WriteFile (IntPtr hHandle, byte[] lpBuffer, uint nNumberOfBytesToWrite, out uint lpNumberOfBytesWritten, IntPtr lpOverlapped) |
Writes data to a file at the position specified by the file pointer. More... | |
static bool | CloseHandle (IntPtr hHandle) |
Closes an open object handle. More... | |
static bool | FlushFileBuffers (IntPtr hHandle) |
Flushes the buffers of the specified file and causes all buffered data to be written to the file. More... | |
static bool | DisconnectNamedPipe (IntPtr hHandle) |
Disconnects the server end of a named pipe instance from a client process. More... | |
static uint | GetLastError () |
Retrieves the calling thread's last-error code value. More... | |
static IntPtr | CreateNamedPipe (String lpName, PipeOpenMode dwOpenMode, PipeMode dwPipeMode, uint nMaxInstances, uint nOutBufferSize, uint nInBufferSize, uint nDefaultTimeOut, IntPtr pipeSecurityAttributes) |
Creates an instance of a named pipe and returns a handle for subsequent pipe operations. More... | |
static bool | ConnectNamedPipe (IntPtr hHandle, IntPtr lpOverlapped) |
Enables a named pipe server process to wait for a client process to connect to an instance of a named pipe. More... | |
static bool | WaitNamedPipe (String name, int timeout) |
Waits until either a time-out interval elapses or an instance of the specified named pipe is available for connection. More... | |
static bool | SetNamedPipeHandleState (IntPtr hHandle, ref PipeMode lpMode, IntPtr lpMaxCollectionCount, IntPtr lpCollectDataTimeout) |
Sets the read mode and the blocking mode of the specified named pipe. More... | |
static IntPtr | CreateFile (String lpFileName, FileDesiredAccess dwDesiredAccess, FileShareMode dwShareMode, IntPtr fileSecurityAttributes, FileCreationDisposition dwCreationDisposition, uint dwFlagsAndAttributes, uint hTemplateFile) |
Creates or opens a file, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, or named pipe. More... | |
static bool | ReadFile (IntPtr hHandle, byte[] lpBuffer, uint nNumberOfBytesToRead, out uint lpNumberOfBytesRead, IntPtr lpOverlapped) |
Reads data from a file, starting at the position indicated by the file pointer. More... | |
static bool | WriteFile (IntPtr hHandle, byte[] lpBuffer, uint nNumberOfBytesToWrite, out uint lpNumberOfBytesWritten, IntPtr lpOverlapped) |
Writes data to a file at the position specified by the file pointer. More... | |
static bool | CloseHandle (IntPtr hHandle) |
Closes an open object handle. More... | |
static bool | FlushFileBuffers (IntPtr hHandle) |
Flushes the buffers of the specified file and causes all buffered data to be written to the file. More... | |
static bool | DisconnectNamedPipe (IntPtr hHandle) |
Disconnects the server end of a named pipe instance from a client process. More... | |
static uint | GetLastError () |
Retrieves the calling thread's last-error code value. More... | |
static IntPtr | CreateNamedPipe (String lpName, PipeOpenMode dwOpenMode, PipeMode dwPipeMode, uint nMaxInstances, uint nOutBufferSize, uint nInBufferSize, uint nDefaultTimeOut, IntPtr pipeSecurityAttributes) |
Creates an instance of a named pipe and returns a handle for subsequent pipe operations. More... | |
static bool | ConnectNamedPipe (IntPtr hHandle, IntPtr lpOverlapped) |
Enables a named pipe server process to wait for a client process to connect to an instance of a named pipe. More... | |
static bool | WaitNamedPipe (String name, int timeout) |
Waits until either a time-out interval elapses or an instance of the specified named pipe is available for connection. More... | |
static bool | SetNamedPipeHandleState (IntPtr hHandle, ref PipeMode lpMode, IntPtr lpMaxCollectionCount, IntPtr lpCollectDataTimeout) |
Sets the read mode and the blocking mode of the specified named pipe. More... | |
static IntPtr | CreateFile (String lpFileName, FileDesiredAccess dwDesiredAccess, FileShareMode dwShareMode, IntPtr fileSecurityAttributes, FileCreationDisposition dwCreationDisposition, uint dwFlagsAndAttributes, uint hTemplateFile) |
Creates or opens a file, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, or named pipe. More... | |
static bool | ReadFile (IntPtr hHandle, byte[] lpBuffer, uint nNumberOfBytesToRead, out uint lpNumberOfBytesRead, IntPtr lpOverlapped) |
Reads data from a file, starting at the position indicated by the file pointer. More... | |
static bool | WriteFile (IntPtr hHandle, byte[] lpBuffer, uint nNumberOfBytesToWrite, out uint lpNumberOfBytesWritten, IntPtr lpOverlapped) |
Writes data to a file at the position specified by the file pointer. More... | |
static bool | CloseHandle (IntPtr hHandle) |
Closes an open object handle. More... | |
static bool | FlushFileBuffers (IntPtr hHandle) |
Flushes the buffers of the specified file and causes all buffered data to be written to the file. More... | |
static bool | DisconnectNamedPipe (IntPtr hHandle) |
Disconnects the server end of a named pipe instance from a client process. More... | |
static uint | GetLastError () |
Retrieves the calling thread's last-error code value. More... | |
static IntPtr | CreateNamedPipe (String lpName, PipeOpenMode dwOpenMode, PipeMode dwPipeMode, uint nMaxInstances, uint nOutBufferSize, uint nInBufferSize, uint nDefaultTimeOut, IntPtr pipeSecurityAttributes) |
Creates an instance of a named pipe and returns a handle for subsequent pipe operations. More... | |
static bool | ConnectNamedPipe (IntPtr hHandle, IntPtr lpOverlapped) |
Enables a named pipe server process to wait for a client process to connect to an instance of a named pipe. More... | |
static bool | WaitNamedPipe (String name, int timeout) |
Waits until either a time-out interval elapses or an instance of the specified named pipe is available for connection. More... | |
static bool | SetNamedPipeHandleState (IntPtr hHandle, ref PipeMode lpMode, IntPtr lpMaxCollectionCount, IntPtr lpCollectDataTimeout) |
Sets the read mode and the blocking mode of the specified named pipe. More... | |
static IntPtr | CreateFile (String lpFileName, FileDesiredAccess dwDesiredAccess, FileShareMode dwShareMode, IntPtr fileSecurityAttributes, FileCreationDisposition dwCreationDisposition, uint dwFlagsAndAttributes, uint hTemplateFile) |
Creates or opens a file, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, or named pipe. More... | |
static bool | ReadFile (IntPtr hHandle, byte[] lpBuffer, uint nNumberOfBytesToRead, out uint lpNumberOfBytesRead, IntPtr lpOverlapped) |
Reads data from a file, starting at the position indicated by the file pointer. More... | |
static bool | WriteFile (IntPtr hHandle, byte[] lpBuffer, uint nNumberOfBytesToWrite, out uint lpNumberOfBytesWritten, IntPtr lpOverlapped) |
Writes data to a file at the position specified by the file pointer. More... | |
static bool | CloseHandle (IntPtr hHandle) |
Closes an open object handle. More... | |
static bool | FlushFileBuffers (IntPtr hHandle) |
Flushes the buffers of the specified file and causes all buffered data to be written to the file. More... | |
static bool | DisconnectNamedPipe (IntPtr hHandle) |
Disconnects the server end of a named pipe instance from a client process. More... | |
static uint | GetLastError () |
Retrieves the calling thread's last-error code value. More... | |
static IntPtr | CreateNamedPipe (String lpName, PipeOpenMode dwOpenMode, PipeMode dwPipeMode, uint nMaxInstances, uint nOutBufferSize, uint nInBufferSize, uint nDefaultTimeOut, IntPtr pipeSecurityAttributes) |
Creates an instance of a named pipe and returns a handle for subsequent pipe operations. More... | |
static bool | ConnectNamedPipe (IntPtr hHandle, IntPtr lpOverlapped) |
Enables a named pipe server process to wait for a client process to connect to an instance of a named pipe. More... | |
static bool | WaitNamedPipe (String name, int timeout) |
Waits until either a time-out interval elapses or an instance of the specified named pipe is available for connection. More... | |
static bool | SetNamedPipeHandleState (IntPtr hHandle, ref PipeMode lpMode, IntPtr lpMaxCollectionCount, IntPtr lpCollectDataTimeout) |
Sets the read mode and the blocking mode of the specified named pipe. More... | |
static IntPtr | CreateFile (String lpFileName, FileDesiredAccess dwDesiredAccess, FileShareMode dwShareMode, IntPtr fileSecurityAttributes, FileCreationDisposition dwCreationDisposition, uint dwFlagsAndAttributes, uint hTemplateFile) |
Creates or opens a file, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, or named pipe. More... | |
static bool | ReadFile (IntPtr hHandle, byte[] lpBuffer, uint nNumberOfBytesToRead, out uint lpNumberOfBytesRead, IntPtr lpOverlapped) |
Reads data from a file, starting at the position indicated by the file pointer. More... | |
static bool | WriteFile (IntPtr hHandle, byte[] lpBuffer, uint nNumberOfBytesToWrite, out uint lpNumberOfBytesWritten, IntPtr lpOverlapped) |
Writes data to a file at the position specified by the file pointer. More... | |
static bool | CloseHandle (IntPtr hHandle) |
Closes an open object handle. More... | |
static bool | FlushFileBuffers (IntPtr hHandle) |
Flushes the buffers of the specified file and causes all buffered data to be written to the file. More... | |
static bool | DisconnectNamedPipe (IntPtr hHandle) |
Disconnects the server end of a named pipe instance from a client process. More... | |
Public Attributes | |
const uint | PIPE_UNLIMITED_INSTANCES = 255 |
Unlimited server pipe instances. More... | |
const ulong | ERROR_SUCCESS = 0 |
The operation completed successfully. More... | |
const ulong | ERROR_CANNOT_CONNECT_TO_PIPE = 2 |
The system cannot find the file specified. More... | |
const ulong | ERROR_PIPE_BUSY = 231 |
All pipe instances are busy. More... | |
const ulong | ERROR_NO_DATA = 232 |
The pipe is being closed. More... | |
const ulong | ERROR_PIPE_NOT_CONNECTED = 233 |
No process is on the other end of the pipe. More... | |
const ulong | ERROR_MORE_DATA = 234 |
More data is available. More... | |
const ulong | ERROR_PIPE_CONNECTED = 535 |
There is a process on other end of the pipe. More... | |
const ulong | ERROR_PIPE_LISTENING = 536 |
Waiting for a process to open the other end of the pipe. More... | |
const uint | NMPWAIT_WAIT_FOREVER = 0xffffffff |
Waits indefinitely when connecting to a pipe. More... | |
const uint | NMPWAIT_NOWAIT = 0x00000001 |
Does not wait for the named pipe. More... | |
const uint | NMPWAIT_USE_DEFAULT_WAIT = 0x00000000 |
Uses the default time-out specified in a call to the CreateNamedPipe method. More... | |
const int | INVALID_HANDLE_VALUE = -1 |
Invalid operating system handle. More... | |
The class exposes kernel32.dll methods for named pipes communication.
static uint PipeNative.GetLastError | ( | ) |
Retrieves the calling thread's last-error code value.
Referenced by Program.answerSNMP(), Program.listenToSNMP(), Program.PInvokeNativePipeClient(), and Program.PInvokeNativePipeServer().
static IntPtr PipeNative.CreateNamedPipe | ( | String | lpName, |
PipeOpenMode | dwOpenMode, | ||
PipeMode | dwPipeMode, | ||
uint | nMaxInstances, | ||
uint | nOutBufferSize, | ||
uint | nInBufferSize, | ||
uint | nDefaultTimeOut, | ||
IntPtr | pipeSecurityAttributes | ||
) |
Creates an instance of a named pipe and returns a handle for subsequent pipe operations.
lpName | Pipe name |
dwOpenMode | Pipe open mode |
dwPipeMode | Pipe-specific modes |
nMaxInstances | Maximum number of instances |
nOutBufferSize | Output buffer size |
nInBufferSize | Input buffer size |
nDefaultTimeOut | Time-out interval |
pipeSecurityAttributes | Security attributes |
Referenced by Program.answerSNMP(), Program.listenToSNMP(), and Program.PInvokeNativePipeServer().
static bool PipeNative.ConnectNamedPipe | ( | IntPtr | hHandle, |
IntPtr | lpOverlapped | ||
) |
Enables a named pipe server process to wait for a client process to connect to an instance of a named pipe.
hHandle | Handle to the server end of a named pipe instance. |
lpOverlapped | Pointer to an Overlapped object. |
Referenced by Program.answerSNMP(), Program.listenToSNMP(), and Program.PInvokeNativePipeServer().
static bool PipeNative.WaitNamedPipe | ( | String | name, |
int | timeout | ||
) |
Waits until either a time-out interval elapses or an instance of the specified named pipe is available for connection.
name | Pointer to a null-terminated string that specifies the name of the named pipe. |
timeout | Number of milliseconds that the function will wait for an instance of the named pipe to be available. |
Referenced by Program.PInvokeNativePipeClient().
static bool PipeNative.SetNamedPipeHandleState | ( | IntPtr | hHandle, |
ref PipeMode | lpMode, | ||
IntPtr | lpMaxCollectionCount, | ||
IntPtr | lpCollectDataTimeout | ||
) |
Sets the read mode and the blocking mode of the specified named pipe.
If the specified handle is to the client end of a named pipe and if the named pipe server process is on a remote computer, the function can also be used to control local buffering.
hHandle | Handle to the named pipe instance. |
lpMode | Pointer to a variable that supplies the new mode. |
lpMaxCollectionCount | Pointer to a variable that specifies the maximum number of bytes collected on the client computer before transmission to the server. |
lpCollectDataTimeout | Pointer to a variable that specifies the maximum time, in milliseconds, that can pass before a remote named pipe transfers information over the network. |
Referenced by Program.PInvokeNativePipeClient().
static IntPtr PipeNative.CreateFile | ( | String | lpFileName, |
FileDesiredAccess | dwDesiredAccess, | ||
FileShareMode | dwShareMode, | ||
IntPtr | fileSecurityAttributes, | ||
FileCreationDisposition | dwCreationDisposition, | ||
uint | dwFlagsAndAttributes, | ||
uint | hTemplateFile | ||
) |
Creates or opens a file, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, or named pipe.
lpFileName | File name. |
dwDesiredAccess | Access to the object (reading, writing, or both). |
dwShareMode | Sharing mode of the object (reading, writing, both, or neither). |
fileSecurityAttributes | Pointer to a SecurityAttributes object that determines whether the returned handle can be inherited by child processes. |
dwCreationDisposition | Action to take on files that exist, and which action to take when files do not exist |
dwFlagsAndAttributes | File attributes and flags. |
hTemplateFile | Handle to a template file. |
Referenced by Program.PInvokeNativePipeClient().
static bool PipeNative.ReadFile | ( | IntPtr | hHandle, |
byte[] | lpBuffer, | ||
uint | nNumberOfBytesToRead, | ||
out uint | lpNumberOfBytesRead, | ||
IntPtr | lpOverlapped | ||
) |
Reads data from a file, starting at the position indicated by the file pointer.
hHandle | Handle to the file to be read. |
lpBuffer | Pointer to the buffer that receives the data read from the file. |
nNumberOfBytesToRead | Number of bytes to be read from the file. |
lpNumberOfBytesRead | Pointer to the variable that receives the number of bytes read. |
lpOverlapped | Pointer to an Overlapped object. |
Referenced by Program.answerSNMP(), Program.listenToSNMP(), Program.PInvokeNativePipeClient(), and Program.PInvokeNativePipeServer().
static bool PipeNative.WriteFile | ( | IntPtr | hHandle, |
byte[] | lpBuffer, | ||
uint | nNumberOfBytesToWrite, | ||
out uint | lpNumberOfBytesWritten, | ||
IntPtr | lpOverlapped | ||
) |
Writes data to a file at the position specified by the file pointer.
hHandle | Handle to the file. |
lpBuffer | Pointer to the buffer containing the data to be written to the file. |
nNumberOfBytesToWrite | Number of bytes to be write to the file. |
lpNumberOfBytesWritten | Pointer to the variable that receives the number of bytes written. |
lpOverlapped | Pointer to an Overlapped object. |
Referenced by Program.answerSNMP(), Program.PInvokeNativePipeClient(), and Program.PInvokeNativePipeServer().
static bool PipeNative.CloseHandle | ( | IntPtr | hHandle | ) |
Closes an open object handle.
hHandle | Handle to an open object. |
Referenced by Program.answerSNMP(), Program.listenToSNMP(), Program.PInvokeNativePipeClient(), and Program.PInvokeNativePipeServer().
static bool PipeNative.FlushFileBuffers | ( | IntPtr | hHandle | ) |
Flushes the buffers of the specified file and causes all buffered data to be written to the file.
hHandle | Handle to an open file. |
Referenced by Program.answerSNMP(), Program.listenToSNMP(), and Program.PInvokeNativePipeServer().
static bool PipeNative.DisconnectNamedPipe | ( | IntPtr | hHandle | ) |
Disconnects the server end of a named pipe instance from a client process.
hHandle | Handle to an instance of a named pipe. |
Referenced by Program.answerSNMP(), Program.listenToSNMP(), and Program.PInvokeNativePipeServer().
static uint PipeNative.GetLastError | ( | ) |
Retrieves the calling thread's last-error code value.
static IntPtr PipeNative.CreateNamedPipe | ( | String | lpName, |
PipeOpenMode | dwOpenMode, | ||
PipeMode | dwPipeMode, | ||
uint | nMaxInstances, | ||
uint | nOutBufferSize, | ||
uint | nInBufferSize, | ||
uint | nDefaultTimeOut, | ||
IntPtr | pipeSecurityAttributes | ||
) |
Creates an instance of a named pipe and returns a handle for subsequent pipe operations.
lpName | Pipe name |
dwOpenMode | Pipe open mode |
dwPipeMode | Pipe-specific modes |
nMaxInstances | Maximum number of instances |
nOutBufferSize | Output buffer size |
nInBufferSize | Input buffer size |
nDefaultTimeOut | Time-out interval |
pipeSecurityAttributes | Security attributes |
static bool PipeNative.ConnectNamedPipe | ( | IntPtr | hHandle, |
IntPtr | lpOverlapped | ||
) |
Enables a named pipe server process to wait for a client process to connect to an instance of a named pipe.
hHandle | Handle to the server end of a named pipe instance. |
lpOverlapped | Pointer to an Overlapped object. |
static bool PipeNative.WaitNamedPipe | ( | String | name, |
int | timeout | ||
) |
Waits until either a time-out interval elapses or an instance of the specified named pipe is available for connection.
name | Pointer to a null-terminated string that specifies the name of the named pipe. |
timeout | Number of milliseconds that the function willwait for an instance of the named pipe to be available. |
static bool PipeNative.SetNamedPipeHandleState | ( | IntPtr | hHandle, |
ref PipeMode | lpMode, | ||
IntPtr | lpMaxCollectionCount, | ||
IntPtr | lpCollectDataTimeout | ||
) |
Sets the read mode and the blocking mode of the specified named pipe.
If the specified handle is to the client end of a named pipe and if the named pipe server process is on a remote computer, the function can also be used to control local buffering.
hHandle | Handle to the named pipe instance. |
lpMode | Pointer to a variable that supplies the new mode. |
lpMaxCollectionCount | Pointer to a variable that specifies the maximum number of bytes collected on the client computer before transmission to the server. |
lpCollectDataTimeout | Pointer to a variable that specifies the maximum time, in milliseconds, that can pass before a remote named pipe transfers information over the network. |
static IntPtr PipeNative.CreateFile | ( | String | lpFileName, |
FileDesiredAccess | dwDesiredAccess, | ||
FileShareMode | dwShareMode, | ||
IntPtr | fileSecurityAttributes, | ||
FileCreationDisposition | dwCreationDisposition, | ||
uint | dwFlagsAndAttributes, | ||
uint | hTemplateFile | ||
) |
Creates or opens a file, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, or named pipe.
lpFileName | File name. |
dwDesiredAccess | Access to the object (reading, writing, or both). |
dwShareMode | Sharing mode of the object (reading, writing, both, or neither). |
fileSecurityAttributes | Pointer to a SecurityAttributes object that determines whether the returned handle can be inherited by child processes. |
dwCreationDisposition | Action to take on files that exist, and which action to take when files do not exist |
dwFlagsAndAttributes | File attributes and flags. |
hTemplateFile | Handle to a template file. |
static bool PipeNative.ReadFile | ( | IntPtr | hHandle, |
byte[] | lpBuffer, | ||
uint | nNumberOfBytesToRead, | ||
out uint | lpNumberOfBytesRead, | ||
IntPtr | lpOverlapped | ||
) |
Reads data from a file, starting at the position indicated by the file pointer.
hHandle | Handle to the file to be read. |
lpBuffer | Pointer to the buffer that receives the data read from the file. |
nNumberOfBytesToRead | Number of bytes to be read from the file. |
lpNumberOfBytesRead | Pointer to the variable that receives the number of bytes read. |
lpOverlapped | Pointer to an Overlapped object. |
static bool PipeNative.WriteFile | ( | IntPtr | hHandle, |
byte[] | lpBuffer, | ||
uint | nNumberOfBytesToWrite, | ||
out uint | lpNumberOfBytesWritten, | ||
IntPtr | lpOverlapped | ||
) |
Writes data to a file at the position specified by the file pointer.
hHandle | Handle to the file. |
lpBuffer | Pointer to the buffer containing the data to be written to the file. |
nNumberOfBytesToWrite | Number of bytes to be write to the file. |
lpNumberOfBytesWritten | Pointer to the variable that receives the number of bytes written. |
lpOverlapped | Pointer to an Overlapped object. |
static bool PipeNative.CloseHandle | ( | IntPtr | hHandle | ) |
Closes an open object handle.
hHandle | Handle to an open object. |
static bool PipeNative.FlushFileBuffers | ( | IntPtr | hHandle | ) |
Flushes the buffers of the specified file and causes all buffered data to be written to the file.
hHandle | Handle to an open file. |
static bool PipeNative.DisconnectNamedPipe | ( | IntPtr | hHandle | ) |
Disconnects the server end of a named pipe instance from a client process.
hHandle | Handle to an instance of a named pipe. |
static uint PipeNative.GetLastError | ( | ) |
Retrieves the calling thread's last-error code value.
static IntPtr PipeNative.CreateNamedPipe | ( | String | lpName, |
PipeOpenMode | dwOpenMode, | ||
PipeMode | dwPipeMode, | ||
uint | nMaxInstances, | ||
uint | nOutBufferSize, | ||
uint | nInBufferSize, | ||
uint | nDefaultTimeOut, | ||
IntPtr | pipeSecurityAttributes | ||
) |
Creates an instance of a named pipe and returns a handle for subsequent pipe operations.
lpName | Pipe name |
dwOpenMode | Pipe open mode |
dwPipeMode | Pipe-specific modes |
nMaxInstances | Maximum number of instances |
nOutBufferSize | Output buffer size |
nInBufferSize | Input buffer size |
nDefaultTimeOut | Time-out interval |
pipeSecurityAttributes | Security attributes |
static bool PipeNative.ConnectNamedPipe | ( | IntPtr | hHandle, |
IntPtr | lpOverlapped | ||
) |
Enables a named pipe server process to wait for a client process to connect to an instance of a named pipe.
hHandle | Handle to the server end of a named pipe instance. |
lpOverlapped | Pointer to an Overlapped object. |
static bool PipeNative.WaitNamedPipe | ( | String | name, |
int | timeout | ||
) |
Waits until either a time-out interval elapses or an instance of the specified named pipe is available for connection.
name | Pointer to a null-terminated string that specifies the name of the named pipe. |
timeout | Number of milliseconds that the function will wait for an instance of the named pipe to be available. |
static bool PipeNative.SetNamedPipeHandleState | ( | IntPtr | hHandle, |
ref PipeMode | lpMode, | ||
IntPtr | lpMaxCollectionCount, | ||
IntPtr | lpCollectDataTimeout | ||
) |
Sets the read mode and the blocking mode of the specified named pipe.
If the specified handle is to the client end of a named pipe and if the named pipe server process is on a remote computer, the function can also be used to control local buffering.
hHandle | Handle to the named pipe instance. |
lpMode | Pointer to a variable that supplies the new mode. |
lpMaxCollectionCount | Pointer to a variable that specifies the maximum number of bytes collected on the client computer before transmission to the server. |
lpCollectDataTimeout | Pointer to a variable that specifies the maximum time, in milliseconds, that can pass before a remote named pipe transfers information over the network. |
static IntPtr PipeNative.CreateFile | ( | String | lpFileName, |
FileDesiredAccess | dwDesiredAccess, | ||
FileShareMode | dwShareMode, | ||
IntPtr | fileSecurityAttributes, | ||
FileCreationDisposition | dwCreationDisposition, | ||
uint | dwFlagsAndAttributes, | ||
uint | hTemplateFile | ||
) |
Creates or opens a file, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, or named pipe.
lpFileName | File name. |
dwDesiredAccess | Access to the object (reading, writing, or both). |
dwShareMode | Sharing mode of the object (reading, writing, both, or neither). |
fileSecurityAttributes | Pointer to a SecurityAttributes object that determines whether the returned handle can be inherited by child processes. |
dwCreationDisposition | Action to take on files that exist, and which action to take when files do not exist |
dwFlagsAndAttributes | File attributes and flags. |
hTemplateFile | Handle to a template file. |
static bool PipeNative.ReadFile | ( | IntPtr | hHandle, |
byte[] | lpBuffer, | ||
uint | nNumberOfBytesToRead, | ||
out uint | lpNumberOfBytesRead, | ||
IntPtr | lpOverlapped | ||
) |
Reads data from a file, starting at the position indicated by the file pointer.
hHandle | Handle to the file to be read. |
lpBuffer | Pointer to the buffer that receives the data read from the file. |
nNumberOfBytesToRead | Number of bytes to be read from the file. |
lpNumberOfBytesRead | Pointer to the variable that receives the number of bytes read. |
lpOverlapped | Pointer to an Overlapped object. |
static bool PipeNative.WriteFile | ( | IntPtr | hHandle, |
byte[] | lpBuffer, | ||
uint | nNumberOfBytesToWrite, | ||
out uint | lpNumberOfBytesWritten, | ||
IntPtr | lpOverlapped | ||
) |
Writes data to a file at the position specified by the file pointer.
hHandle | Handle to the file. |
lpBuffer | Pointer to the buffer containing the data to be written to the file. |
nNumberOfBytesToWrite | Number of bytes to be write to the file. |
lpNumberOfBytesWritten | Pointer to the variable that receives the number of bytes written. |
lpOverlapped | Pointer to an Overlapped object. |
static bool PipeNative.CloseHandle | ( | IntPtr | hHandle | ) |
Closes an open object handle.
hHandle | Handle to an open object. |
static bool PipeNative.FlushFileBuffers | ( | IntPtr | hHandle | ) |
Flushes the buffers of the specified file and causes all buffered data to be written to the file.
hHandle | Handle to an open file. |
static bool PipeNative.DisconnectNamedPipe | ( | IntPtr | hHandle | ) |
Disconnects the server end of a named pipe instance from a client process.
hHandle | Handle to an instance of a named pipe. |
static uint PipeNative.GetLastError | ( | ) |
Retrieves the calling thread's last-error code value.
static IntPtr PipeNative.CreateNamedPipe | ( | String | lpName, |
PipeOpenMode | dwOpenMode, | ||
PipeMode | dwPipeMode, | ||
uint | nMaxInstances, | ||
uint | nOutBufferSize, | ||
uint | nInBufferSize, | ||
uint | nDefaultTimeOut, | ||
IntPtr | pipeSecurityAttributes | ||
) |
Creates an instance of a named pipe and returns a handle for subsequent pipe operations.
lpName | Pipe name |
dwOpenMode | Pipe open mode |
dwPipeMode | Pipe-specific modes |
nMaxInstances | Maximum number of instances |
nOutBufferSize | Output buffer size |
nInBufferSize | Input buffer size |
nDefaultTimeOut | Time-out interval |
pipeSecurityAttributes | Security attributes |
static bool PipeNative.ConnectNamedPipe | ( | IntPtr | hHandle, |
IntPtr | lpOverlapped | ||
) |
Enables a named pipe server process to wait for a client process to connect to an instance of a named pipe.
hHandle | Handle to the server end of a named pipe instance. |
lpOverlapped | Pointer to an Overlapped object. |
static bool PipeNative.WaitNamedPipe | ( | String | name, |
int | timeout | ||
) |
Waits until either a time-out interval elapses or an instance of the specified named pipe is available for connection.
name | Pointer to a null-terminated string that specifies the name of the named pipe. |
timeout | Number of milliseconds that the function willwait for an instance of the named pipe to be available. |
static bool PipeNative.SetNamedPipeHandleState | ( | IntPtr | hHandle, |
ref PipeMode | lpMode, | ||
IntPtr | lpMaxCollectionCount, | ||
IntPtr | lpCollectDataTimeout | ||
) |
Sets the read mode and the blocking mode of the specified named pipe.
If the specified handle is to the client end of a named pipe and if the named pipe server process is on a remote computer, the function can also be used to control local buffering.
hHandle | Handle to the named pipe instance. |
lpMode | Pointer to a variable that supplies the new mode. |
lpMaxCollectionCount | Pointer to a variable that specifies the maximum number of bytes collected on the client computer before transmission to the server. |
lpCollectDataTimeout | Pointer to a variable that specifies the maximum time, in milliseconds, that can pass before a remote named pipe transfers information over the network. |
static IntPtr PipeNative.CreateFile | ( | String | lpFileName, |
FileDesiredAccess | dwDesiredAccess, | ||
FileShareMode | dwShareMode, | ||
IntPtr | fileSecurityAttributes, | ||
FileCreationDisposition | dwCreationDisposition, | ||
uint | dwFlagsAndAttributes, | ||
uint | hTemplateFile | ||
) |
Creates or opens a file, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, or named pipe.
lpFileName | File name. |
dwDesiredAccess | Access to the object (reading, writing, or both). |
dwShareMode | Sharing mode of the object (reading, writing, both, or neither). |
fileSecurityAttributes | Pointer to a SecurityAttributes object that determines whether the returned handle can be inherited by child processes. |
dwCreationDisposition | Action to take on files that exist, and which action to take when files do not exist |
dwFlagsAndAttributes | File attributes and flags. |
hTemplateFile | Handle to a template file. |
static bool PipeNative.ReadFile | ( | IntPtr | hHandle, |
byte[] | lpBuffer, | ||
uint | nNumberOfBytesToRead, | ||
out uint | lpNumberOfBytesRead, | ||
IntPtr | lpOverlapped | ||
) |
Reads data from a file, starting at the position indicated by the file pointer.
hHandle | Handle to the file to be read. |
lpBuffer | Pointer to the buffer that receives the data read from the file. |
nNumberOfBytesToRead | Number of bytes to be read from the file. |
lpNumberOfBytesRead | Pointer to the variable that receives the number of bytes read. |
lpOverlapped | Pointer to an Overlapped object. |
static bool PipeNative.WriteFile | ( | IntPtr | hHandle, |
byte[] | lpBuffer, | ||
uint | nNumberOfBytesToWrite, | ||
out uint | lpNumberOfBytesWritten, | ||
IntPtr | lpOverlapped | ||
) |
Writes data to a file at the position specified by the file pointer.
hHandle | Handle to the file. |
lpBuffer | Pointer to the buffer containing the data to be written to the file. |
nNumberOfBytesToWrite | Number of bytes to be write to the file. |
lpNumberOfBytesWritten | Pointer to the variable that receives the number of bytes written. |
lpOverlapped | Pointer to an Overlapped object. |
static bool PipeNative.CloseHandle | ( | IntPtr | hHandle | ) |
Closes an open object handle.
hHandle | Handle to an open object. |
static bool PipeNative.FlushFileBuffers | ( | IntPtr | hHandle | ) |
Flushes the buffers of the specified file and causes all buffered data to be written to the file.
hHandle | Handle to an open file. |
static bool PipeNative.DisconnectNamedPipe | ( | IntPtr | hHandle | ) |
Disconnects the server end of a named pipe instance from a client process.
hHandle | Handle to an instance of a named pipe. |
static uint PipeNative.GetLastError | ( | ) |
Retrieves the calling thread's last-error code value.
static IntPtr PipeNative.CreateNamedPipe | ( | String | lpName, |
PipeOpenMode | dwOpenMode, | ||
PipeMode | dwPipeMode, | ||
uint | nMaxInstances, | ||
uint | nOutBufferSize, | ||
uint | nInBufferSize, | ||
uint | nDefaultTimeOut, | ||
IntPtr | pipeSecurityAttributes | ||
) |
Creates an instance of a named pipe and returns a handle for subsequent pipe operations.
lpName | Pipe name |
dwOpenMode | Pipe open mode |
dwPipeMode | Pipe-specific modes |
nMaxInstances | Maximum number of instances |
nOutBufferSize | Output buffer size |
nInBufferSize | Input buffer size |
nDefaultTimeOut | Time-out interval |
pipeSecurityAttributes | Security attributes |
static bool PipeNative.ConnectNamedPipe | ( | IntPtr | hHandle, |
IntPtr | lpOverlapped | ||
) |
Enables a named pipe server process to wait for a client process to connect to an instance of a named pipe.
hHandle | Handle to the server end of a named pipe instance. |
lpOverlapped | Pointer to an Overlapped object. |
static bool PipeNative.WaitNamedPipe | ( | String | name, |
int | timeout | ||
) |
Waits until either a time-out interval elapses or an instance of the specified named pipe is available for connection.
name | Pointer to a null-terminated string that specifies the name of the named pipe. |
timeout | Number of milliseconds that the function will wait for an instance of the named pipe to be available. |
static bool PipeNative.SetNamedPipeHandleState | ( | IntPtr | hHandle, |
ref PipeMode | lpMode, | ||
IntPtr | lpMaxCollectionCount, | ||
IntPtr | lpCollectDataTimeout | ||
) |
Sets the read mode and the blocking mode of the specified named pipe.
If the specified handle is to the client end of a named pipe and if the named pipe server process is on a remote computer, the function can also be used to control local buffering.
hHandle | Handle to the named pipe instance. |
lpMode | Pointer to a variable that supplies the new mode. |
lpMaxCollectionCount | Pointer to a variable that specifies the maximum number of bytes collected on the client computer before transmission to the server. |
lpCollectDataTimeout | Pointer to a variable that specifies the maximum time, in milliseconds, that can pass before a remote named pipe transfers information over the network. |
static IntPtr PipeNative.CreateFile | ( | String | lpFileName, |
FileDesiredAccess | dwDesiredAccess, | ||
FileShareMode | dwShareMode, | ||
IntPtr | fileSecurityAttributes, | ||
FileCreationDisposition | dwCreationDisposition, | ||
uint | dwFlagsAndAttributes, | ||
uint | hTemplateFile | ||
) |
Creates or opens a file, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, or named pipe.
lpFileName | File name. |
dwDesiredAccess | Access to the object (reading, writing, or both). |
dwShareMode | Sharing mode of the object (reading, writing, both, or neither). |
fileSecurityAttributes | Pointer to a SecurityAttributes object that determines whether the returned handle can be inherited by child processes. |
dwCreationDisposition | Action to take on files that exist, and which action to take when files do not exist |
dwFlagsAndAttributes | File attributes and flags. |
hTemplateFile | Handle to a template file. |
static bool PipeNative.ReadFile | ( | IntPtr | hHandle, |
byte[] | lpBuffer, | ||
uint | nNumberOfBytesToRead, | ||
out uint | lpNumberOfBytesRead, | ||
IntPtr | lpOverlapped | ||
) |
Reads data from a file, starting at the position indicated by the file pointer.
hHandle | Handle to the file to be read. |
lpBuffer | Pointer to the buffer that receives the data read from the file. |
nNumberOfBytesToRead | Number of bytes to be read from the file. |
lpNumberOfBytesRead | Pointer to the variable that receives the number of bytes read. |
lpOverlapped | Pointer to an Overlapped object. |
static bool PipeNative.WriteFile | ( | IntPtr | hHandle, |
byte[] | lpBuffer, | ||
uint | nNumberOfBytesToWrite, | ||
out uint | lpNumberOfBytesWritten, | ||
IntPtr | lpOverlapped | ||
) |
Writes data to a file at the position specified by the file pointer.
hHandle | Handle to the file. |
lpBuffer | Pointer to the buffer containing the data to be written to the file. |
nNumberOfBytesToWrite | Number of bytes to be write to the file. |
lpNumberOfBytesWritten | Pointer to the variable that receives the number of bytes written. |
lpOverlapped | Pointer to an Overlapped object. |
static bool PipeNative.CloseHandle | ( | IntPtr | hHandle | ) |
Closes an open object handle.
hHandle | Handle to an open object. |
static bool PipeNative.FlushFileBuffers | ( | IntPtr | hHandle | ) |
Flushes the buffers of the specified file and causes all buffered data to be written to the file.
hHandle | Handle to an open file. |
static bool PipeNative.DisconnectNamedPipe | ( | IntPtr | hHandle | ) |
Disconnects the server end of a named pipe instance from a client process.
hHandle | Handle to an instance of a named pipe. |
const uint PipeNative.PIPE_UNLIMITED_INSTANCES = 255 |
Unlimited server pipe instances.
Referenced by Program.answerSNMP(), Program.listenToSNMP(), and Program.PInvokeNativePipeServer().
const ulong PipeNative.ERROR_SUCCESS = 0 |
The operation completed successfully.
const ulong PipeNative.ERROR_CANNOT_CONNECT_TO_PIPE = 2 |
The system cannot find the file specified.
const ulong PipeNative.ERROR_PIPE_BUSY = 231 |
All pipe instances are busy.
Referenced by Program.PInvokeNativePipeClient().
const ulong PipeNative.ERROR_NO_DATA = 232 |
The pipe is being closed.
const ulong PipeNative.ERROR_PIPE_NOT_CONNECTED = 233 |
No process is on the other end of the pipe.
const ulong PipeNative.ERROR_MORE_DATA = 234 |
More data is available.
Referenced by Program.PInvokeNativePipeClient().
const ulong PipeNative.ERROR_PIPE_CONNECTED = 535 |
There is a process on other end of the pipe.
Referenced by Program.answerSNMP(), Program.listenToSNMP(), and Program.PInvokeNativePipeServer().
const ulong PipeNative.ERROR_PIPE_LISTENING = 536 |
Waiting for a process to open the other end of the pipe.
const uint PipeNative.NMPWAIT_WAIT_FOREVER = 0xffffffff |
Waits indefinitely when connecting to a pipe.
const uint PipeNative.NMPWAIT_NOWAIT = 0x00000001 |
Does not wait for the named pipe.
const uint PipeNative.NMPWAIT_USE_DEFAULT_WAIT = 0x00000000 |
Uses the default time-out specified in a call to the CreateNamedPipe method.
Referenced by Program.answerSNMP(), Program.listenToSNMP(), and Program.PInvokeNativePipeServer().
const int PipeNative.INVALID_HANDLE_VALUE = -1 |
Invalid operating system handle.
Referenced by Program.answerSNMP(), Program.listenToSNMP(), Program.PInvokeNativePipeClient(), and Program.PInvokeNativePipeServer().