c# - Simconnect data reading in multiple .xaml files -
i using simconnect read data prepar3d in wpf. read data in 1 .xaml file ok. in project, mainwindow consists of many .xaml files means need multiple .xaml files read data @ same time. when try read data simultaneously in 2 .xaml files, created new simconnect object, struct defined unsuccessful.
internal struct simobjectgeneral { [marshalas(unmanagedtype.byvaltstr, sizeconst = 256)] /* 2.declare parameters in simobjectgeneral */ public string title; public int32 ias; public int32 cas; public int32 grossweight; ... ... } internal struct simobjectgeneral_atcl { [marshalas(unmanagedtype.byvaltstr, sizeconst = 256)] /* 2.declare parameters in simobjectgeneral */ public int32 altitude; } simobjectgeneral? simobjectgeneral= data.dwdata[0] simobjectgeneral_?;//it works simobjectgeneral_atcl? simobjectgeneral_atcl = data.dwdata[0] simobjectgeneral_atcl?;//it returns null value, why?
i confused this. help!
Comments
Post a Comment