Win32 API Callbacks

O

Oky --

I want to write a Windows network audio program in pure Ruby. However,
this requires me to call an API function called waveInOpen which takes a
callback function as one of its arguments.

The callback function looks like this:

void CALLBACK waveInProc(
HWAVEIN hwi,
UINT uMsg,
DWORD dwInstance,
DWORD dwParam1,
DWORD dwParam2
);

Is it possible to achieve this in Ruby or do I have to write a wrapper
DLL?


Thanks in advance
 
L

Logan Capaldo

I want to write a Windows network audio program in pure Ruby. However,
this requires me to call an API function called waveInOpen which
takes a
callback function as one of its arguments.

The callback function looks like this:

void CALLBACK waveInProc(
HWAVEIN hwi,
UINT uMsg,
DWORD dwInstance,
DWORD dwParam1,
DWORD dwParam2
);

Is it possible to achieve this in Ruby or do I have to write a wrapper
DLL?


Thanks in advance
You might be able to get away with using RubyInline to create the
callback. Still a little bit of C, but it'll be right there with the
rest of your code.
 
N

nobu

Hi,

At Sun, 30 Jul 2006 22:09:24 +0900,
Oky -- wrote in [ruby-talk:204999]:
I want to write a Windows network audio program in pure Ruby. However,
this requires me to call an API function called waveInOpen which takes a
callback function as one of its arguments.

DL might help you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top