COMM-DRV.Net – Professional Serial Communication .Net Component and Win32 Library For Windows and Windows CE

$499.95

COMM-DRV.Net is a professional serial communication component and library for Windows and Windows CE. It supports the development of serial communication applications for Windows 8.xWindows 7, Windows Vista, Windows XP, Windows 2003, Windows 2000, Windows NT, Windows ME, Windows 98, and Windows 95.

COMM-DRV.Net supports the development of both Microsoft Windows .Net applications as well as native Win32 applications for both Windows and Windows CE / Windows Mobile / PocketPC..

Description

COMM-DRV.Net Professional Serial Communication .Net Component and Win32 Library For Windows and Windows CE

COMM-DRV.Net

COMM-DRV.Net is a professional serial communication component and library for Windows and Windows CE. It supports the development of serial communication applications for Windows 8.xWindows 7, Windows Vista, Windows XP, Windows 2003, Windows 2000, Windows NT, Windows ME, Windows 98, and Windows 95.

COMM-DRV.Net supports the development of both Microsoft Windows .Net applications as well as native Win32 applications for both Windows and Windows CE / Windows Mobile / PocketPC..

COMM-DRV.Net is distributed with complete source code for all DLLs, .Net components, and examples.

WCSC provides free technical support.

Major Features

Major .Net Development Features

  • Supports Windows and Windows CE / Windows Mobile development.
  • Supports C#, Visual Basic .Net.
  • Support ALL .Net languages & tools.
  • State-driven file transfer libraries allow Xmodem, Ymodem, and Zmodem file transfers on multiple ports at the same time
  • Support for ALL Hayes compatible modems (AT command set).
  • Supports ALL single or multiport cards that include Windows drivers.
    Any number of ports may be active at the same time.
  • Built-in hardware and software handshaking for flow control (DTR/DSR, RTS/CTS, XON/XOFF).
  • Adjustable communication buffers of any size.
  • Supports USB to RS232 converters, Ethernet to serial converters, and USB modems with their respective COM drivers.
  • Extensive statistics on every port(bytes lost, sent, received, errors, etc.).
  • Support baud rates in excess of 460K baud, with the ability to use today’s high-powered communications devices.
  • Compatible with the .Net Framework under COMM-DRV/Lib.Net supports Windows Vista, Windows 2003, Windows XP, Windows 2000, Windows NT, Windows 98, & Windows Me.
  • Completely port re-entrant, allowing it to be time-sliced.
  • Full source code

Major Native Win32 Development Features

  • Supports Windows and Windows CE / Windows Mobile development.
  • Support ALL compilers and tools that can call 16 bit or 32 bit DLLs.
  • Support for ALL Hayes compatible modems (AT command set).
  • Supports ALL single or multiport cards that include a Windows driver.
  • Any number of ports may be active at the same time.
  • Built-in hardware and software handshaking for flow control (DTR/DSR, RTS/CTS, XON/XOFF).
  • One API to learn. Same for Windows Vista, Windows 2003, Windows XP, Windows 2000, Windows NT, Windows Me, Windows 98, Window 95.
  • Adjustable communication buffers of any size.
  • Supports USB to RS232 converters and USB modems with their respective COM drivers.
  • Supports Ethernet to RS232 converters with their respective COM drivers.
  • Extensive statistics on every port(bytes lost, sent, received, errors, etc.).
  • Asynchronously call user functions on any serial communication or timed event (receive, transmit, modem, or status change interrupt event, buffer count events, specific character reception, error events, and much more).
  • Nondestructive reading of data (read ahead).
  • Support baud rates in excess of 460K baud, with the ability to use today’s high-powered communications devices.
  • State-driven file transfer libraries allow Xmodem, Ymodem,  Zmodem, & ASCII file transfers on multiple ports at the same time.
  • Completely port re-entrant, allowing it to be time-sliced.
  • Full source code.

Examples

COMM-DRV.Net ships with an ample set of fully functional examples that can be used as base to start your development.

COMM-DRV.Net Example

C# Examples

The following example is a complete C# application that opens a port, set baud rates etc, dials a phone number, download a file, hangup the phone/modem, and close the port. We did not put any error checks in the example in order to focus on the application itself.
using System; using WCSC.Commdrv; class CdrvLibNetExample {[STAThread] static void Main(string[] args) { CdrvLibNet Port = new CdrvLibNet(); Port.OpenComPortDialog(1024,1024)Port.ModemDial(CdrvLibNet.ModemDialMode.Tone,”+1(281)360-3187″) Port.ReceiveFiles(CdrvLibNet.FileXferProt.Zmodem,”c:\\tmp\\*.*”,true);Port.ModemHangup(); Port.CloseComPort(); }}
The following example simply outputs a string.
using System; using WCSC.Commdrv; class CdrvLibNetExample {[STAThread] static void Main(string[] args) { CdrvLibNet Port = new CdrvLibNet(); Port.OpenComPortDialog(1024,1024);Port.PutString(“Hello World”); Port.CloseComPort(); }}

 

VB.Net Examples

The following example is a complete Visual Basic application that opens a port, set baud rates etc, dials a phone number, uploads a file, hangup the phone/modem, and close the port. We did not put any error checks in the example in order to focus on the application itself.
Imports WCSC.Commdrv Module Module1 Sub Main() Dim Port As CdrvLibNet = New CdrvLibNet Port.OpenComPortDialog(1024, 1024) Port.ModemDial(CdrvLibNet.ModemDialMode.Tone, “281-360-3231”) Port.ReceiveFiles(CdrvLibNet.FileXferProt.Zmodem, “*.*”, True) Port.ModemHangup() Port.CloseComPort() End Sub End Module
The following example simply outputs a string.
Imports WCSC.Commdrv
Module Module1
Sub Main()
Dim Port As CdrvLibNet = New CdrvLibNet
Port.OpenComPortDialog(1024, 1024)
Port.PutString(“This is a test”)
Port.CloseComPort()
End Sub
End Module

 

C/C++ Examples

The following example is a complete C/C++ application that opens a port, set baud rates etc, dials a phone number, uploads a file, hangup the phone/modem, and close the port. We did not put any error checks in the example in order to focus on the application itself.
PortHandle=OpenComPort(1,2048,2048);
SetPortCharacteristics(PortHandle,BAUD9600,PAR_NONE,LENGTH_8,STOPBIT_1,PROT_RTSRTS);
Dial(PortHandle,1,”2913603187″);
ModemConnect(PortHandle);
cdrvxfer_files(PortHandle,0,6,”*.*”,NULL);
ModemHangup(PortHandle);
CloseComPort(PortHandle);
The following example simply outputs a string.
PortHandle=OpenComPort(1,2048,2048);
SetPortCharacteristics(PortHandle,BAUD9600,PAR_NONE,LENGTH_8,STOPBIT_1,PROT_RTSRTS);
PutString(PortHandle,”Output String”);
CloseComPort(PortHandle);

 

Visual Basic Examples

The following example is a complete Visual Basic application that opens a port, set baud rates etc, dials a phone number, uploads a file, hangup the phone/modem, and close the port. We did not put any error checks in the example in order to focus on the application itself.
PortHandle=OpenComPort(1,2048,2048)
Stat=SetPortCharacteristics(PortHandle,BAUD9600,PAR_NONE,LENGTH_8,STOPBIT_1,PROT_RTSRTS)
Stat=Dial(PortHandle,1,”2913603187″)
Stat=ModemConnect(PortHandle)
Stat=cdrvxfer_files(PortHandle,0,6,”*.*”,0)
Stat=ModemHangup(PortHandle)
Stat=CloseComPort(PortHandle)
The following example simply outputs a string.
PortHandle=OpenComPort(1,2048,2048)
Stat=SetPortCharacteristics(PortHandle,BAUD9600,PAR_NONE,LENGTH_8,STOPBIT_1,PROT_RTSRTS)
Stat=PutString(PortHandle,”Output String”)
Stat=CloseComPort(PortHandle)

<<back

.Net Methods(Partial List)

File Transfer Methods

  • ClearFileSpec() Clears list of files for file transfer set with SetFilesSpec().
  • FileXfer() State driven file transfer method.
  • ReceiveFiles() Receive files with Zmodem, Xmodem, or Ymodem protocol.
  • SendFiles() Send files with Zmodem, Xmodem, or Ymodem protocol.
  • SetFileSpec() Sets list of files to transferred.

Input/Output Methods

  • GetByte() Reads a byte from the serial communication port.
  • GetPacket() Reads a packet from the serial communication port.
  • GetString() Reads a string from the serial communication port.
  • PutByte() Writes a byte to the serial communication port.
  • PutPacket() Writes a packet to the serial communication port.
  • PutString() Writes a string to the serial communication port.
  • WaitForData() Outputs a string and waits for a particular string or strings.
  • WaitForDataClearStrings() Clears list of tokens/strings to search for in serial data stream.
  • WaitForDataPeek() Non-destructive WaitForData().
  • WaitForDataSetString() Sets list of tokens/strings to search for in serial stream.

Miscellaneous Methods

  • Abort() This method forces any method that is currently active to abort.
  • ClearAbort() This method clears the abort state that was set with the Abort() method.
  • Crc16() This method returns the 16 bit CRC of the passed packet.
  • Crc32() This method returns the 32 bit CRC of the passed packet.
  • Delay() This method delays for the specified number of milliseconds.
  • GetContext() This method retrieves a 32 bit value that was set with the SetContext() method.
  • SetContext() This method saves a 32 bit value that can be retrieved with the GetContext() method.
  • SetSpecialBehavior() This method is used to change certain behaviors of COMM-DRV/Lib.Net.

Modem Methods

  • ModemCommandState() This method puts the modem in the command state.
  • ModemConnect() This method is generally made after a call to ModemDial() if programmer is initiating a session.
  • ModemDial() This method dials the specified telephone number.
  • ModemForceAnswer() This method forces the modem to answer the phone.
  • ModemGetCarrierSpeed() This method returns the carrier speed at which the modem last connected(baud rate between the two modems over the telephone line).
  • ModemConnectSpeed() This method returns the connect speed at which the modem last connected(baud rate between the computer and the modem).
  • ModemGetSRegister() This method returns the S register requested from the modem on the opened port.
  • ModemGetString() This method retrieves the current string setting for the requested modem string.
  • ModemGetValue() This method retrieves the current setting for the requested modem value.
  • ModemHangup() This method forces the modem to hangup.
  • ModemInit() This method initializes the modem.
  • ModemModifyString() This method sets the current string setting for the requested modem string.
  • ModemModifyValue() This method set the current setting for the requested modem value.
  • ModemOffHook() This method takes the phone off hook.
  • ModemOnline() This method takes the phone off hook.
  • ModemSendCommand() This method sends a command to the modem.
  • ModemSetAnswerMode() This method Puts the modem in auto answer mode.
  • ModemSetSRegister() This method sets the S register requested for the modem on the opened port.
  • ModemSpeaker() This method turns the modem speaker on or off.
  • ModemVolume() This method ets the modem’s speaker volume.
  • ModemWaitForConnect() This method waits for a call and connects.
  • ModemWaitForRing() This method waits for the modems “RING” string.

Port Control Methods

  • CloseComPort() This method closes a COM port that was opened with OpenComPort().
  • DtrOff() This method turns the DTR signal off.
  • DtrOn() This method turns the DTR signal on.
  • FlushReceiveBuffer() This method purges the communication receive buffer.
  • FlushTransmitbuffer() This method purges the communication transmit buffer.
  • GetTimeout() This method retrieves the current value of the timeout on the port in milliseconds.
  • OpenComPort() This method opens the serial port.
  • OpenComPortDialog() This method displays a dialog box for user to make port selection and line characteristics.
  • RtsOff() This method turns the RTS signal off.
  • RtsOn() This method turns the RTS signal on.
  • SetBaud() This method sets the baud rate.
  • SetPortCharacteristics() This method sets baud rate, parity, character length, stopbits, and flow control of the port previously opened with OpenComPort().
  • SetTimeout() This method sets the timeout on the port in milliseconds.

Port Information Methods

  • BytesInReceiveBuffer() This method returns the number of bytes in the receive buffer.
  • BytesInTransmitBuffer() This method returns the number of bytes in the transmit buffer.
  • IsAllDataOut() This method returns true if all data is out of the transmit buffer and UART.
  • IsBreak() This method returns true if the UART received a break.
  • IsCarrierDetect() This method returns true if carrier is detected.
  • IsCts() This method returns true if clear to send signal (CTS) is on.
  • IsDsr() This method returns true if data set ready signal (DSR) is on.
  • IsFramingError() This method returns true if a framing error occurred since the last call.
  • IsInputOverrun() This method returns true if an input communication buffer overrun occurred since the last call.
  • IsOverrun() This method returns true if a UART buffer error occurred since the last call.
  • IsParityError() This method returns true if a parity error occurred since the last call.
  • IsReceiveBufferEmpty() This method returns true if the receive buffer is empty.
  • IsRing() This method returns true if a ring was detected since the last call.
  • IsTransmitBufferEmpty() This method returns true if the transmit buffer is empty.
  • SizeOfReceivebuffer()  This method returns the size of the receive buffer.
  • SizeOfTransmitBuffer() This method returns the size of the transmit buffer.
  • SpaceInReceiveBuffer() This method returns the space in the receive buffer.
  • SpaceInTransmitBuffer() This method returns the space in the transmit buffer.

Native Win32 API(Partial List)

High Level Functions

  • BytesInReceiveBuffer() Returns the number of bytes in the receive buffer.
  • BytesInTransmitBuffer() Returns the number of bytes in the transmit buffer.
  • CdrvAbort Forces function awaiting data or holding to immediately timeout.
  • CdrvCheckTime() Determine if time expired form a previous call to CdrvSetTime().
  • CdrvClearAbort() Returns COMM-DRV/Lib to non-abort state.
  • CdrvCrc16() Returns the 16bit CRC of a packet.
  • CdrvCrc32() Returns the 32bit CRC of a packet.
  • CdrvDelay() Delay specified time.
  • CdrvGetContext() Set a context value.
  • CdrvGetPcb() Returns a pointer to the port’s PCB.
  • CdrvIntToBaudIndex() Converts baud rate integer to a baud index.
  • CdrvSetContext() Sets a context value.
  • CdrvSetTime() Sets a timer to a specified delay. Expiration is tested by CdrvCheckTime().
  • CdrvSetTimeoutFunction() Sets the address of a function that gets called when Delay() or CdrvCheckTime() is called.
  • CdrvSetTimerResolution() Sets the timer resolution used by CdrvSetTime() and Delay().
  • CloseComPort() Close the communication port.
  • DtrOff() Turns DTR off.
  • DtrOn() Turns DTR on.
  • FlushReceiveBuffer() Discards the contents of the receive buffer.
  • FlushTransmitBuffer() Discards the contents of the transmit buffer.
  • GetByte() Gets a byte from the receive buffer.
  • GetPaceTime() Get the current inter-character pace time.
  • GetPacket() Gets a packet from receive buffer.
  • GetString() Gets a carriage return, line feed, or null terminated string from receive buffer.
  • GetTimeout() Get the current timeout value.
  • InitializePort() Initializes the serial port(Allocate buffers, cardtype, etc.).
  • IsBreak() Returns true if a break signal was detected.
  • IsCarrierDetect() Returns true if carrier detected.
  • IsCts() Returns true if CTS signal high.
  • IsDsr() Returns true if DSR signal high.
  • IsFramingError() Returns true if a framing error occurred.
  • IsInputOverrun() Returns true if the COMM-DRV receive buffer was overrun.
  • IsOverrunError() Returns true if the UART receive register was overrun.
  • IsParityError() Returns true if a parity error occurred.
  • IsPortAvailable() Determine if a particular port is in use.
  • IsReceiveBufferEmpty() Returns true if receive buffer is empty.
  • IsRing() Returns true if ring detected.
  • IsTransmitBufferEmpty() Returns true if transmit buffer is empty.
  • OpenComPort() Open standard COM ports under Windows. Physical port information etc. are not required.
  • PeekChar() Returns the next character from receive buffer non-destructively.
  • PutByte() Queues a byte for transmission.
  • PutPacket() Queues a packet for transmission.
  • PutString() Outputs a null terminated string.
  • ReceiveBufferSize() Returns the receive buffer size.
  • RtsOff() Turns RTS off.
  • RtsOn() Turns RTS on.
  • SendBreak() Sends a break signal.
  • SetBaud() Sets new baud rate.
  • SetCallbackFunction() Easy to use method that effects a callback to have a user’s standard C function when the specified event occurs.
  • SetCallbackFunctionWinAPI() Easy to use method that effects a callback to have a user’s standard C function when the specified event occurs using the __stdcall convention.
  • SetCustomBaud() Maps a custom baud rate to one of the standard COMM-DRV baud constants.
  • SetFlowControlCharacters() Sets characters used for flow control.
  • SetFlowControlThreshold() Sets high and low receive buffer thresholds.
  • SetPaceTime() Sets the current inter-character pace time.
  • SetPortCharacteristics() Set line control parameters(baudrate, length, parity,etc.).
  • SetTimeout() Sets the current transmit/receive timeouts.
  • SpaceInReceiveBuffer() Returns space unused in receive buffer.
  • SpaceInTransmitBuffer() Returns space unused in transmit buffer.
  • TransmitBufferSize() Returns transmit buffer size.
  • UnInitializePort() Undo the effects of InitializePort() (unhook vectors. release memory, etc.).
  • WaitFor() Outputs a string and waits for a matching response.
  • WaitForData()
  • WaitForDataPeek()
  • WaitForDataClearString()
  • WaitForDataSetString()
  • WaitForPeek() Non-destructive WaitFor().
  • WaitForPeekTable() Outputs a string and non-destructively waits for a matching response to a table of strings.
  • WaitForTable() Destructive WaitForPeekTable().

Modem Functions

  • Dial() Dials using the modem with the Hayes command set.
  • ModemAnswerMode() Puts modem in answer mode.
  • ModemAttention() Puts modem in command state.
  • ModemConnect() Returns true if modem connection attained.
  • ModemGetCarrierSpeed() Returns carrier speed.
  • ModemGetConnectSpeed() Returns connect speed.
  • ModemHangup() Hangup modem connection.
  • ModemInit() Set modem initialization string.
  • ModemModifyString() Modify modem string.
  • ModemWaitforConnect() Effects a modem connection that is abortable.

File Transfer Functions

  • cdrvxfer_files() Transmit or receive file(s) with specified protocol to completion.
  • cdrvxfer_getfiles() Receive file(s) with specified protocol. Must be called several times till transfer complete.
  • cdrvxfer_sendfiles() Transmit file(s) with specified protocol. Must be called several times till transfer complete.
  • cdrvxfer_sfiles() Transmit or receive file(s) with specified protocol to completion(additional features).
  • CdrvXferClearFileSpec() Clears list of file specs created by CdrvXferSetFileSpec().
  • CdrvXferSetFileSpec() Creates a list of filepaths/filespecs for file transfer routines.
  • FileTransferDialog() Enables an automatic dialog to be displayed on some of the file transfer functions.
  • SetXferParameters() Set file transfer parameters.
  • TransferFiles() Transfer files.
  • XferFiles() Iterative simplified transfer function.

GUI Functions

  • CdrvLInitDialog() Displays dialog box for port characteristics input.
  • CdrvLInitDialog2() Displays extended dialog box for port characteristics input.

 

Low Level Functions

  • ser_rs232_block() Set timeouts on character reception & transmission.
  • ser_rs232_cleanup() Uninstalls a port.
  • ser_rs232_del_t_event() Deletes a timed event.
  • ser_rs232_dtr_off() Turns the DTR signal off.
  • ser_rs232_dtr_on() Turns the DTR signal on.
  • ser_rs232_flush() Selectively fushes input and output buffers.
  • ser_rs232_get_sdata() Gets pointer to COMM-DRV system data area.
  • ser_rs232_getbyte() Reads a byte from input buffer.
  • ser_rs232_getpacket() Reads a packet from input buffer.
  • ser_rs232_getport() Gets port information.
  • ser_rs232_getstatus() Gets port modem and line status.
  • ser_rs232_maxport() Returns the highest addressable port number.
  • ser_rs232_misc_func() COMM-DRV multiplex function. Used to setup user callback functions, initialize certain variables, etc.
  • ser_rs232_putbyte() Queues a byte for transmission.
  • ser_rs232_putpacket() Queues a packet for transmission.
  • ser_rs232_putregister() Writes to specified 8250 type register.
  • ser_rs232_rts_off() Turns RTS off.
  • ser_rs232_rts_on() Turns RTS on.
  • ser_rs232_set_intfunc() Setup user interrupt functions(user callback).
  • ser_rs232_setbauddiv() Sets baudrate divisor for 8250 style UARTs.
  • ser_rs232_setup() Installs or modify a serial port.
  • ser_rs232_viewpacket() Non-destructively reads a packet from input buffer.