protected unsafe void Set(IntPtr guid, string value) { var prop = new PropertyString { Text = value }; var propNative = new PropertyString.__Native(); prop.__MarshalTo(ref propNative); InitHeader <PropertyString.__Native>(ref propNative.Header); Device.SetProperty(guid, new IntPtr(&propNative)); }
protected unsafe string GetString(IntPtr guid, int objectCode) { var prop = new PropertyString(); var propNative = new PropertyString.__Native(); InitHeader <PropertyString.__Native>(ref propNative.Header); propNative.Header.Obj = objectCode; Device.GetProperty(guid, new IntPtr(&propNative)); prop.__MarshalFrom(ref propNative); return(prop.Text); }