locked
winRT project using native dll which is working fine in windows 8 but not in WinRT surface RRS feed

  • Question

  • Hi,

    I have a  C# WinRT project, which consumes native Dll using marshalling. My project is working as expected in my X64 Windows 8 machine, but i run on 32 bit ARM based surface, it is failing to call functions exported in native dll. It is giving an exception "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)".

    I made sure that, native dll is compiled with Machine type as "ARM", but i am getting this error.

    Please help on this.

    thanks

    Venkat.



    Windows Desktop, Windows Phone developer.

    Thursday, April 25, 2013 4:09 PM

Answers

  • thank you guys for your time..

    it started working fine... i compiled my native code using ARM configuration and added that dll as a content to my project.

    Now the question is, do i need to bundle two native dll(one for ARM and one for x86) to send to windows appstore?

    Thanks

    Venkat.


    Windows Desktop, Windows Phone developer.

    Thursday, April 25, 2013 7:29 PM

All replies

  • Did you add a reference to Microsoft Visual C++ package runtime package to the solution?  
    Thursday, April 25, 2013 4:20 PM
  • Hi Ken,

    I installed MS VC++ run-time package of ARM in Surface. but i am still facing the same problem..


    Windows Desktop, Windows Phone developer.

    Thursday, April 25, 2013 6:48 PM
  • Are you sure the ARM version of the native component is ending up in the ARM install? The error sounds like it is getting the x86 version.

    --Rob

    Thursday, April 25, 2013 7:06 PM
    Moderator
  • thank you guys for your time..

    it started working fine... i compiled my native code using ARM configuration and added that dll as a content to my project.

    Now the question is, do i need to bundle two native dll(one for ARM and one for x86) to send to windows appstore?

    Thanks

    Venkat.


    Windows Desktop, Windows Phone developer.

    Thursday, April 25, 2013 7:29 PM