How can I get a COM component witch can be used on windows phone 8 project with C# RRS feed

  • 问题

  • Recently,I work on windows phone‘s developing。

    I got a project witch written by C language,in my windows phone 8 Solution,I create a Dynamic link library(DLL) project and it can be builded successful。Upper it,I use a runtime component project to provide DLL’s method to UI(C#) project。In method,I got some pointer parameters,I use Intptr object to pass a byte[] object to runtime componen project。damn!it was crashed=。=

    Maybe,I got a wrong way。 But if not,how can I pass a pointer parameter to runtime component project or DLL project?Perhaps,it has other way witch can use [Dllimort] method to import my DLL file。


    PS: My solution‘s structure。

    1.   [Dynamic link library project(C++)].dll_method(void *para);

    2.   [Runtime component project(C++)].rc_method(Intptr p)

    3.   [Windows phone 8 project(C#)].method()
              GCHandle g = GCHandle.Alloc(byte[], GCHandleType.Pinned);
              IntPtr p = g.AddrOfPinnedObject();

    2012年10月19日 3:24


  • #1 please turn on the windows runtime extension

    windows phone & iPhone developer 我更喜欢Windows phone

    2012年11月15日 6:49