Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6736943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:11:23+00:00 2026-05-26T11:11:23+00:00

I am developing an AIR application. This application needs some hardware accesses that are

  • 0

I am developing an AIR application. This application needs some hardware accesses that are not possible with AIR. I decided to use the NativeApplication class in AIR, which launches a C# executable. The AIR application and the “native” application then communicate with the standard output and standard input streams.

A bit like that:

private var np:NativeProcess = new NativeProcess();
private var npi:NativeProcessStartupInfo = new NativeProcessStartupInfo();
private var args:Vector.<String> = new Vector.<String>();

private function creationCompleteHandler(event:FlexEvent):void {
   args.push("myCommand");
   args.push("myParameter");
   npi.arguments = args;
   npi.executable = File.applicationDirectory.resolvePath("MyNativeExe.exe");
   np.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onData);
   np.start(npi);
}

private function onData(e:ProgressEvent):void {
   while(np.standardOutput.bytesAvailable != 0) {
     trace(String.fromCharCode(np.standardOutput.readByte()));
   }
}

I put MyNativeExe.exe file in the application directory, set the “extendedDesktop” value in the *-app.xml supportedProfiles, and it works fine.

Now, I would like to create a kind of AS3 SWC library that embeds MyNativeExe.exe and which provide an AS3 class to manage the interaction with MyNativeExe.exe. Therefore I could easily reuse this work in other AIR projects by simply addind the SWC file as a library. I may have to manually add the “extendedDesktop” value to the new AIR projects, but it is not a problem.

And I am stuck. I can embed an EXE file in a SWC file, by manually selecting the resources to embed with Flash Builder but…

  • it will not be automatically embeded in the final SWF file as only the needed parts of the SWC file are merged with the SWF
  • even if it is (enforcing the merge with an [Embed] tag, …), how can I access and execute the embedded EXE file? NativeProcessInfo.executable needs a File object, and not a byte stream.

The only idea I have would be to embed the EXE file with [Embed], load it as a byte array, create a new file with the byte array as data, and then execute the file. I don’t know if it works, but I do not like the idea, as it implies having the EXE kind of duplicated.

Does someone have an idea?

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:11:23+00:00Added an answer on May 26, 2026 at 11:11 am

    You should look into the Air Native Extensions. Simply put, one of the a new features in Air 3.0 was the ability to compile and link to custom language extensions directly from air. I haven’t found an example of using C# directly, but there is a link on that page to doing with managed C++.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing some sort of air mouse application for iPhone platform. This applications connects
I'm developing a Adobe Air application that should make use of a SWF file
I'm developing a Adobe AIR application using Flash Builder 4. This app needs to
When developing a desktop application in .NET, is it possible to not require the
Developing a web application that I've registered with Twitter. In this app, I might
im developing an application on windows using flash, compiling in AIR 2.0. This compiler
I'm developing an Adobe Air application for Android using ActionScript 3.0 (I'm not using
I'm developing an application in AIR via Flex, but I'm not seeing where I'm
I'm developing an application with Adobe Flex and AIR, and I've been banging my
I spent hundreds of ours developing an Adobe AIR Application with Flex 4.0 and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.