windows phone 8 - WP8: how to get back an IntPtr in c++ -
i'm developping plugin winphone 8 unity3d using c++ , directx. i'm right stuck because don't know how pass intptr type c# code c++ code. it's easier android or ios plugin since can data void*. in windows phone runtime component project it's not possible. read i've got use winrt types. i've search
here code samples:
in c#:
public delegate void wp8enabletexturedrawing(system.intptr texture); private wp8enabletexturedrawing wp8enabletexturedrawing; public void setwp8texturedrawingfunc(wp8enabletexturedrawing func){ wp8enabletexturedrawing = func; } //... wp8enabletexturedrawing(targettexture.getnativetextureptr());
in c++ header file matches delegate way:
static void enabletexturedrawing(platform::object ^textureptr);
but compiler throws error -> no overload 'wp8texturedrawing.texturedrawing.enabletexturedra wing(object)' matches delegate 'nativetexturedrawer.wp8enabletexturedrawing'
i hope has hands in me out.
thank
system.intptr ins't platform::object^. should use toint64() or toint32() intptr memory address getting , sending native code.
Comments
Post a Comment