Couldnt run my app on ARM Environment(WinRT tablet)


  • Hi All,

    I have created a basic windows store app which will print some string. I have used below approach to create my app

    Windows store app(UI C#) <=> Windows RunTime Component(c++) <=>windows store app dll(c++).

    and Below is the sample code:

    1) Windows store app dll(c++).

    EXTERN_C __declspec (dllexport)  void GetString1(char *OutBuff)
      memcpy (OutBuff, "Welcome", sizeof ("Welcome"));


    2)Windows RunTime Component

    typedef void (*FunPtr)(char* buf);

    Platform::String^ GetInputFromDLL()


    Platform::String^ out1;

    FunPtr funptr1 = NULL;

    HMODULE hmod=LoadPackagedLibrary("temp.dll");

    funptr1 = (funptr)GetProcAddress(hmod,"GetString1");

    char * val = (char*)malloc(100); 

    funptr1 (val);


    //Piece of code for convert char* to Platform String^.

    Out1 = Conversion(val);  //User defined function

    return out1;


    3)Windows store app(UI)

    Button event()



    /*print it to Text box*/


    This piece of code is executed properly at x86 Environment in Desktop and got the output. But same package is not gets executed at ARM environment in WinRT Tablet, and It gets terminated as soon as Button click event invokes. 

    Note: This issue was seen only passing Char*/Int* not for int/Char.

    Please help me, why My app is not executing in ARM platform.

    Thanks and Regards,


    Friday, July 12, 2013 11:37 AM

All replies

  • My suggestion would be to not use low-level memory allocation routines like malloc and memcpy, and don't pass around pointers to primitive data types. Instead of char* use the Platform::String^


    Friday, July 12, 2013 2:43 PM
  • Do you have validated your app as Windows Store Apps through App Certification Kit ??

    If your app pass the certification, then you need to build different package for ARM(Windows RT) by selecting target platform ARM.

    Friday, July 12, 2013 3:27 PM
  • Hi jim,

    If you see my snippets, I am already using Platform::String^ in windows Runtime Component, and I dont think i can use Platform::String^ in DLL. And Please let me know why i should not use Low level memory allocation.

    Thanks and Regards,


    Friday, July 12, 2013 5:18 PM
  • Hi Hossain,

    No, I didn't Validate my app yet. And problem is not with compilation/Installation. I am facing problem during executing my app in WinRT Platform. 



    Friday, July 12, 2013 5:21 PM
  • Is the DLL compiled for ARM, or just for x86?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, July 16, 2013 3:06 PM
  • Yes, Both DLL and Store app UI Successfully Build for ARM!!!!
    Tuesday, July 16, 2013 3:59 PM