Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

Problem with Air Native Extension - my dll file is successful built but ane file can not load...

Explorer ,
Oct 15, 2015 Oct 15, 2015

Hello liable Cowboys, PS: Why i am mad because it doesn't work for me! Stop forcing my development. I am mad now. I have tried sometimes time. It doesn't work. I am using Windows 10 Pro x64, Visual C++ 2010 Express Code: dllmain.cpp ( only EasyNativeExtensions ) #include "FlashRuntimeExtensions.h" #include #include extern "C" { FREObject isSupported(FREContext ctx, void* funcData, uint32_t argc, FREObject argv[]) { FREObject result; uint32_t isSupportedSwitch = 1; FRENewObjectFromBool(isSupportedSwitch, &result); return result; } FREObject getString(FREContext ctx, void* funcData, uint32_t argc, FREObject argv[]) { FREObject result; const char *testString = "Hello World from C++!"; FRENewObjectFromUTF8(strlen(testString)+1, (const uint8_t *) testString, &result); return result; } void contextInitializer( void * extData, const uint8_t * ctxType, FREContext   ctx, uint32_t * numFunctionsToSet, const FRENamedFunction ** functionsToSet ) { // Create mapping between function names and pointers in an array of FRENamedFunction. // These are the functions that you will call from ActionScript - // effectively the interface of your native library. // Each member of the array contains the following information: // { function name as it will be called from ActionScript, //  any data that should be passed to the function, //  a pointer to the implementation of the function in the native library } static FRENamedFunction extensionFunctions[] = { {(const uint8_t*) "as_isSupported",        NULL, &isSupported}, {(const uint8_t*) "as_getString",        NULL, &getString} }; // Tell AIR how many functions there are in the array: *numFunctionsToSet = sizeof( extensionFunctions ) / sizeof( FRENamedFunction ); // Set the output parameter to point to the array we filled in: *functionsToSet = extensionFunctions; } void contextFinalizer(FREContext ctx) { return; } __declspec(dllexport) void MyExtensionInitializer(void** extData, FREContextInitializer* ctxInitializer, FREContextFinalizer* ctxFinalizer) { *ctxInitializer = &contextInitializer; // The name of function that will intialize the extension context *ctxFinalizer = &contextFinalizer; // The name of function that will finalize the extension context } __declspec(dllexport) void MyExtensionFinalizer(void* extData) { return; } } I create swc file package { import flash.events.EventDispatcher; import flash.events.IEventDispatcher; import flash.external.ExtensionContext; public class MyExtension extends EventDispatcher { private var _ctx :ExtensionContext = null; public function MyExtension(target:IEventDispatcher=null) { super(target); _ctx = ExtensionContext.createExtensionContext("MyExtension", null); } public function isSupported():Boolean { return _ctx.call("as_isSupported"); } public function getString():String { return _ctx.call("as_getString") as String; } public function dispose():void { _ctx.dispose(); } } } And XML:     MyExtension     1                                         MyExtension.dll                MyExtensionInitializer MyExtensionFinalizer                        ANd adt command: PAth to\adt.bat -package -target ane MyExtension.ane extdesc.xml -swc MyExtension.swc -platform Windows-x86 -C . library.swf MyExtension.dll And i add ane file to my project And i try it but doesn't work why???

Than it gives error message: TypeError: Error #1009: Cannot access a property or method of a null object reference. at StopLiar/onCreatingComplete() at StopLiar/___StopLiar_WindowedApplication1_creationComplete() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[/Users/erik/Documents/ApacheFlex/git/flex-sdk4.14.1/frameworks/projects/framework/src/mx/core/UIComponent.as:13688] at mx.core::UIComponent/set initialized()[/Users/erik/Documents/ApacheFlex/git/flex-sdk4.14.1/frameworks/projects/framework/src/mx/core/UIComponent.as:1839] at mx.managers::LayoutManager/doPhasedInstantiation()[/Users/erik/Documents/ApacheFlex/git/flex-sdk4.14.1/frameworks/projects/framework/src/mx/managers/LayoutManager.as:850] at mx.managers::LayoutManager/doPhasedInstantiationCallback()[/Users/erik/Documents/ApacheFlex/git/flex-sdk4.14.1/frameworks/projects/framework/src/mx/managers/LayoutManager.as:1188] Why why why ???????????????????????????????? I have checked ane file my ane file is here library.swf and Meta-MF and more more all here. Why does it not work? Stop lie or force my development! because i have tried same code formation like numFunction or static externedfunction or method accessFunctions not work Or Visual Studio 2010 doesn't compatibile to Windows 10. But I have tested Visual C++ 2010 Express under Windows 10 Pro x64 Working fine! 100 % How do i fix it? Please tell me! Thanks i am sorry for argue to you because i know same cowboys lie more than German I know that. 😛

TOPICS
Development
829
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Oct 15, 2015 Oct 15, 2015

could you please format your post? It is hard to read & understand

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 17, 2015 Oct 17, 2015
LATEST

Sorry my dear - my problem with Air Native Extension. I can not understand because i have searched Google like Visual Express C++ 2010 under Windows 10 Pro x64. I am trying to create dll and i have created project as swc and i unpack library.swf from swc file and adt -package ..... myextension.dll than it was created own ane and it is completed. And i tested Project with ane file and i have edited "supportProfile as externedDesktop" i run air app with ane than it throws always error message like "unknown method or proprety" Why does it happen with Air Native Extension" I have made sure extension.xml with initalizer and finalizer all correct.. Why does it not work? I am trying to 3.1 namespace for ane = No working... latest version of namespace = no working. Why does it happen? I really miss my development since August 2015 with ane and tested Air App and it works fine. Possible 19 version has bug? Can you try it If i create unknown initalizer and unknown finalizer than it doesn't recognize to Air apps. I can not understand that. Please check correct Adobe Air SDK latest version doesn't get critical issues. Thanks! Since 1 1/2 months i am getting angry to Adobe System why does it happen with Air Native Extension? I thought ANE doesn't work under Windows 10 x64 That is why i am sorry for i am confused for that.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines