From: Michael Kelly Date: 2001-12-31T03:00:29+09:00 Subject: [ruby-talk:29734] Re: Communicating with C/C++ program On 30 Dec 2001 06:39:57 -0800, hubert@cs.nyu.edu (Hubert Hung-Hsien Chang) wrote: >What if I want not only to issue a command from C and ask Ruby to do something >but also getting the result from Ruby? Is socket the only way to do it? That depends if you want the mechanism to be portable or platform specific. In Linux I guess you could use message queues, pipes or shared memory. In Win32 the easiest would be Memory Mapped Files. I know WIN32OLE makes it pretty easy to use Automation Servers and writing a COM IDispatch interface to Win32 Memory Mapped Files wouldn't be difficult (of course if there's a Win32 API library then you could skip the COM part and just make the API calls for the file mapping etc..) Mike -- "I don't want to belong to any club that would have me as a member." -- Groucho Marx