public JsonState GetEncodeProgress() { IntPtr json = hbFunctions.hb_get_state_json(this.Handle); string statusJson = Marshal.PtrToStringAnsi(json); JsonState state = JsonConvert.DeserializeObject <JsonState>(statusJson); return(state); }