Questions tagged «uwp»

1
什么会导致P / Invoke参数传递时混乱?
这是专门在ARM而不是x86或x64上发生的问题。我有一个用户报告此问题,并能够通过Windows IoT在Raspberry Pi 2上使用UWP再现它。我以前用不匹配的调用约定已经看到过这种问题,但是我在P / Invoke声明中指定了Cdecl,我尝试在本机端显式添加__cdecl并获得相同的结果。这里是一些信息: P /调用声明(参考): [DllImport(Constants.DllName, CallingConvention = CallingConvention.Cdecl)] public static extern FLSliceResult FLEncoder_Finish(FLEncoder* encoder, FLError* outError); C#结构(参考): internal unsafe partial struct FLSliceResult { public void* buf; private UIntPtr _size; public ulong size { get { return _size.ToUInt64(); } set { _size = (UIntPtr)value; } } } …
79 c#  windows  uwp  arm  pinvoke 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.