开发者

Is there a way for Flex to access C++ functions from a DLL?

I have an Adobe Flex application that needs to call C++ functions from a dll .

Since F开发者_StackOverflow中文版lex apps execute within the browser, is there any way to do this ?


Due to security issue, flash browser applications cannot call any client's desktop applications. But it becomes real if you're using AIR application. Are you?


Did you already take a look at Alchemy?
http://labs.adobe.com/technologies/alchemy/

It will allow you to compile C or C++ code to an .swc that you can use in Flex

Keep in mind though that it has some limitations.
As the docmentation states:

Alchemy is primarily intended to be used with C/C++ libraries that have few OS dependencies. The generated content is within the security constraints of the AVM2, and cannot bypass Flash Player security protections.

Though I'm not sure, I believe that it cannot handle (some) dlls either.

I know this is not a solid answer to your question but it could get you thinking in the right direction.

Cheers


We went with Firebreath

We created browser plugins with our existing C++ code, using Firebreath and it works great. Firebreath creates both ActiveX and NPAPI plugins in a single .dll.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜