Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ruby DL Setup to send and receive windows messages?

Thread Tools

Ruby DL Setup to send and receive windows messages?
Posts: n/a
I am trying to send and receive messages between a ruby program and
another program. The end goal is to be able to send a message to the
other program to request data and the other program returns a message
saying where the data file is using Atom tables. Could anyone point me
in the right direction? I have been trying to use ruby dl but I never
seem to set it up right with anyting more complicated than the sleep
function. I always get this error "unexpected type 'W'" or one
similar to it. Here is what I have been trying so far with no luck.

require 'dl/import'
require 'dl/struct'
require 'dl/types'

module Win32
extend DL::Importable
dlload 'user32.dll'

typealias "WPARAM", "UINT"
typealias "LPARAM", "UINT"

POINT = struct [
"ULONG x",

MSG = struct [
"HWND hwnd",
"UINT message",
"WPARAM wParam",
"LPARAM lParam",
"DWORD time",
"POINT pt"

typealias "LPMSG","MSG*"

line = gets

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Live Mail: Send/Receive? Artreid Computer Support 2 04-21-2010 06:31 PM
Re: Can we send and receive data to and from Port Using Python ? Steve Holden Python 0 04-11-2008 12:52 PM
Send and receive information between Excel/VBA and C C Programming 9 12-26-2007 07:49 PM
Help needed to send and receive mails through Perl in Windows Perl Misc 1 06-27-2007 03:32 PM
Ruby DL Setup to send and receive windows messages? Ruby 1 05-03-2005 12:22 AM