Hi,
we made an AIR app that visualizes velocity and position of some high speed 
motors by using ANE written in C. 
There are PLC and manufacturer provided dll libs involved, but the general 
principle is that there's a C++ code that creates a monitoring thread when ANE 
calls its run(params) function.
We poll data from AIR in 20ms intervals and it works pretty nice.
When AIR app closes, it calls ANE function that tells C++ class to clean up 
memory and close monitoring thread. 
I wasn't involved in writing C++ code and can't tell give you a code snippet 
for running monitoring thread but I hope this description helped you a bit.
Cheers,

Tomislav


tomislav @ iPhone


On 11. 2. 2012., at 14:11, James Ong <yanlile...@gmail.com> wrote:

> Hi,
> 
> I'm have been experimenting on Native Extension by invoke some C function
> from AIR application, example "Hello World return from C" was output
> on the application.
> 
> In other way, have anyone tried this experiment:
> AIR <- Native Extension <- C
> 
> An example, the function in C will detect when a musician depress a MIDI
> keyboard, in turn, will capture the key and invoke Native Extension so
> it will output to the application. As it will be difficult to use MIDI code
> for a start, shall anyone know how to create a "windows process" when an AIR
> app is launch and will monitoring any response from a computer keyboard (In
> this example, we will not using AS3 to capture the keyboard events)?
> 
> Thanks.

Reply via email to