[問題] DllImport C++ struct轉換問題

作者: a2975313 (GN)   2020-04-05 02:01:00
我有個struct是用DllImport轉來的
vs debug mode怪的是,如果從結構最上層(FPD)展開是可以看到Serial的完整值,
但單純看Serial卻都只能看到第一個字元???
Serial在C++ struct中是byte*,在C#是fixed sbyte[]轉string。
是否有人知道原因,感謝。
https://imgur.com/5GCxfxS.jpg
※ 編輯: a2975313 (118.171.174.97 臺灣), 04/06/2020 23:52:15
作者: easypro   2020-04-17 21:57:00
結構錯誤吧,https://www.itread01.com/content/1546521875.html 裡有對應方式可以幫你解結構問題

Links booklink

Contact Us: admin [ a t ] ucptt.com