Site hosted by Build your free website today!
  Home page  

DataSend Interprocess Communication control for Visual Basic

An ActiveX component for exchanging data between applications, with a protocol to replace Dynamic Data Exchange

Benefits | Download and Installation | Order On-line | More details

Why you should use DataSend

  • Designed for Visual Basic, it send Variants of any type from one application to another
  • Arrays of Variants of mixed types including nested arrays can be sent, allowing UDTs to be transmitted (Click for details)
  • There is no size limit on the data
  • You can exchange data with 32-bit and 16-bit applications which are not using DataSend (Click for details)
  • DataSend transactions can replace DDE (Dynamic Data Exchange) in many situations, using a server/client protocol which works in a similar way (Click for details)
  • DataSend has none of the problems associated with DDE (Click for details)
  • It is easy to evaluate, because DataSend is fully functional in a Visual Basic development environment without a design time licence. The licence is needed to compile a working executable program.
  • The comprehensive Help file included in the installation is fully context sensitive
  • DataSend is fast - it uses the WM_COPYDATA message

Benefits | Download and Installation | Order On-line | More details |

DataSend download and installation

Software Click on the file name to download File File size Kb
DataSend Interprocess Communication for Visual Basic 353

The DataSend ZIP file contains Setup.exe and ReadMe.txt. Setup installs the control in the system directory and the help file in the windows\Help directory. The test applications are installed in the folder of your choice. An uninstall icon is placed in the program group, the Control Panel Add/Remove programs applet can also be used to uninstall DataSend.

Benefits | Download and Installation | Order On-line | More details |

Sending User Defined Types

DataSend allows you to send User Defind Types by packing them into a Variant or an array of Variants. If the User Defined Type contains no arrays or variable length strings, it can all be placed in a single Byte Array. If the UDT contains variable length strings or arrays the actual data is held elsewhere in memory, the UDT contains only pointers. It is necessary to send these items in separate Variants. The whole structure can be sent as an array of Variants, one for the UDT itself and one for each variable length string and array. For example:

Dim ToSend(1 To 3) As Variant

ToSend(1) = MemoryToByteArray(VarPtr(TheUDT), Len(TheUDT))
ToSend(2) = TheUDT.TheVariableString
ToSend(3) = TheUDT.TheArrayOfAnyType
ErrorCode = DataSend.Send( ReceiverHandle, Tag, ToSend )

To send an array of UDTs, make a further Variant array of the Variant arrays just described. There are Visual Basic samples like this included in the download.

Exchanging data with applications not using DataSend

The SendPlainData method sends the data portion only of a Variant. It is seen as a block of memory by a program not using DataSend, with the standard WM_COPYDATA conventions.

The The ReceivePlainData event captures such blocks of data to a Byte Array. The data may in addition be copied to a different type of Variant with the GetDataAs method, and to any memory location with ByteArrayToMemory. You can also send plain data to a DataSend control. The ReceivePlainData event is raised whether the data comes from a DataSend control or not.

The SendPlainData method is also used to send a Unicode string. To send an ASCII string of null terminated 8-bit characters the SendCstring method is provided.

The DataSend Dynamic Data Exchange like protocol

DDE is a server/client protocol. The server sends data only in response to a request from the client. DataSend transactions can replace DDE in many situations, affording its functionality without any of the problems. A DataSend control can act as both client and server, each instance of the control has all the methods and events.

In DDE, data is identified by an Item name, which is a case insensitive character string of up to 255 characters, and its Clipboard format. DataSend has the same Item name specification. Although there is no direct equivalent of the Clipboard format, it is not necessary because you can use a different name for each format.

DataSend has transactions equivalent to DDE Requests, Advise loops (hot links) for getting data and updates, and Sending data to the server with Execute and Poke transactions.

Dynamic Data Exchange problems avoided by DataSend

  • Making a DDE connection can be slow
    When initiating a link, DDE broadcasts WM_DDE_INITIATE to all top level windows. All the windows must process this message, until one responds positively. DataSend goes straight to the required window, located with the FindWindow API call, which is implemented within the Windows operating system.
  • Trying to establish a DDE connection may cause a program to hang
    DDE calls SendMessage without a timeout. If a top level window is not processing its message queue, any program trying to establish a DDE link may hang. DataSend uses SendMessageTimeout in communications. The sending program does not stop if the receiving window fails to respond.
  • DDE connects to a random instance of an application
    If more than one application is offering a DDE Service/Topic pair, it is a matter of chance which one a client will connect to. DataSend does not allow such ambiguity. You cannot assign a window caption if a control with that caption exists already.
  • The DDEML callback routine fails if called recursively
    What this means in practice is that you cannot start DDE transactions within the callback routine, or Event routine in a DDE control such as DDClient from RHA (Minisystems) Ltd. In particular, it is not possible during the callback to notify DDE clients of data received from a DDE server. DataSend has no such limitation. You can send data from a DataSend control back to itself, and send data during an Event routine.
  • An application can have only one instance of a DDEML based control
    The DDEML callback routine must be at a unique address for each instance, because it has no parameter to indicate which instance of a control is intended. Because all instances of a control share common code, there can be only one instance per application. The DataSend callback routine is a window procedure which has a window handle parameter. This allows the control to select the correct instance. You can have as many DataSend controls in an application as you wish.
  • DatsSend avoids the overhead of the DDEML library
    DataSend is as fast as raw DDE, about twice as fast as transactions using DDEML, broadly similar to out-of-process COM calls.

Benefits | Download and Installation | Order On-line | More details |

Back to the RHA (Minisystems) Ltd home page

Freeware, shareware, DDE components and tools, launch and setup menus