Search Tools Links Login

Inter-Process Communications


Visual Basic 6, or VB Classic

OK, we've all been in the situation where you want a multi tread application but since VB is single threaded it is difficult to do, so you create a second vb app and line the two together using winsock .... this is slow and you my be woring in a machine that does not have IP installed .... what choices do you have ..... well you can use pipes, winsock as i've already mentioned and you can also use Read/WriteProcess memory, these are time consuming and difficult to understand and write ..... but hey, what about SendMessage.... yep that good old API call. it allows you to send a data structure to an other process ..... which is fast and the message will always get there .... this code gives you a quick example of how to do this..... hope you fins this code useful ....
You may find that quitting the Client Application after you have sent the message wil cause your VB IDE to crash with a Memory exception .... if you click the control box on this form it might not crash the IDE ... this does not happen as an EXE

Original Author: Roger D Taylor

Inputs

You just need to enter your own text into the string variable that will be sent to the other process.

Assumptions

Assumes you are comfortable with the API (CopyMemory, SendMessage, FindWindow)

Returns

Sends a COPYDATASTRUCT to the target process

Side Effects

You may find that quitting the Client Application after you have sent the message wil cause your VB IDE to crash with a Memory exception .... if you click the control box on this form it might not crash the IDE ... this does not happen as an EXE

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 89 times

Categories

Visual Basic 6

Attachments

CODE_UPLOAD67486132000.zip
Posted: 9/3/2020 3:45:00 PM
Size: 4,792 bytes


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.