QueTwo's Blog

thouoghts on telecommunications, programming, education and technology

Creating a Windows AIR Native Extension with Eclipse – Part 4

In this final of my 4-part video series, I show you how to import and use the ANE that we created in the last three videos.  We will be using Adobe Flash Builder 4.6 to import the ANE, and we will build a very quick sample application that will use the getTestString and getHelloWorld functions that we wrote in our native DLL written in C.

If you want a copy of all the final projects, you can download them here.  The ZIP file includes the CDT project, the compiled DLL, the ActionScript project, the compiled ANE and the project created in this fourth video.  Enjoy!

Advertisement

11 Responses to Creating a Windows AIR Native Extension with Eclipse – Part 4

  1. James December 11, 2011 at 2:25 am

    Finally, thank for the detailed tutorials!

    There are quite a lot of steps to build a simple DLL, I would expected Adobe to make ANE more simple.

  2. Pingback: Cool Stuff with the Flash Platform – 12/16/2011 | Android Developers

  3. Stuart January 5, 2012 at 11:30 pm

    Great stuff – thank you Nick. Your style of teaching is refreshing!

  4. Francois Cournoyer January 10, 2012 at 4:34 pm

    I must have missed a step, but how did you make it so you could call your DLL functions from withing Flash Builder 4.6.0 without getting the “The extension context does not have a method with the name xxx”?

  5. akartmannkapit January 18, 2012 at 9:21 am

    Thanks a lot for sharing.
    I’ve been able to debug the extension doing this :
    - package the ane using the debug dll.
    - create a c/c++ attach to application debug configuration. Use the dll project, and point to adl.exe you’re using to debug the AIR application (should be C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0\bin\adl.exe).
    - First launch the air application in debug.
    - Then debug the “c/++ attach to application” configuration. It should show you a process list with one adl.exe.
    - Adl.exe will be suspended. Click on the process in debug view and choose resume.
    - Now you can add breakpoint in your c/c++ code.
    Hope this helps.

  6. Fernanda January 25, 2012 at 12:42 pm

    Thanks for the tutorial. But how do I create an ane using more than one dll? How do I do if the dlls are communication and depends on the other?

    • quetwo January 25, 2012 at 9:20 pm

      You don’t really do anything special. Only one DLL can be your entry point, but if it depends on other libraries, then that is fine. Package both DLLs into the ANE into the META-INF\ANE\Windows-x86\ directory.

      The Arduino ANE I created includes two DLLS (the main dll, and pthreads).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.