There are numerous examples of SendMessage useage, and this is my version of communication between 2 programs. The basics came from "www.TheScarms.com", and were adapted to provide a way to issue instructions from one program to another, and pass the results back. The use of a data structure
provides the ability to identify different types of messages. In this example, I have used the type identifier to distinguish between integer, long, and string variables, but it could be used to identify anything.
J.A. Coutts
Code:
Private Type COPYDATASTRUCT
dwData As Long ' Use this to identify your message
cbData As Long ' Number of bytes to be transferred
lpData As Long ' Address of data
End Type
J.A. Coutts