I am going to post some details in "part2" about how it is done next week.
But to satisfy some curiosity I am using an old win trick called dll
forwarding. When the air runtime starts it loads my dll, I do forward the
calls it makes...but at the same time start a local connection system (on a
separate thread). When the air app is finally started (in the sense that the
creationComplete event is executed) my LC listener is ready and will
dispatch specially crafted AMF messages sent through LC from the air app.
The air app just simply checks if it can connect to the designated local
connection and if succeeds then it knows that it has native access (access
to the provided underlying native API more exactly) through LC calls.
What dispatching AMF messages means here: I just send RemotingMessage
objects with a "source" identifying some COM objects. For example the
apSystem.dll is a COM library, but object instantiation is done without
going through the registry (we do not want com registration requirements).
The rest is a very simplified IDispatch handling stuff as that is the
closest to reflection in the native world.
At this time I am not sure where this is heading to.
.Net support is very unlikely in this manner (it depends actually on how
well behave .NET components exposed through interop)
(Don't forget our fluorinefx "air edition" :) )
And the source code is not available. I do release only .NET source code ;)
The AS code is pretty simple and it does not use any external library (short
version):
emitter = new LocalConnection();
listener = new LocalConnection();
listener.connect("apHandler");
var rm:RemotingMessage = new RemotingMessage();
rm.source = "clsid:26338E77-36A6-46FF-91CA-79E91079A81C:apSystem";
rm.operation = "Execute";
rm.body = ["open", "some file", "...parameters if any..."];
emitter.send("apTarget", "apHandle", rm);
Zoli
________________________________
From:
fluorine-bounces@...
[mailto:
fluorine-bounces@...] On Behalf Of Support
Sent: Friday, April 18, 2008 1:12 PM
To:
fluorine@...
Subject: [Fluorine] Blog and AIR Pollution
Just wanted to announce my little AIR pollution here:
http://blog.fluorinefx.com/ (windows only, not tested on all versions)
Give it a try
Zoli
_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com