@@ -30,22 +30,22 @@ public TonClient(ILogger<TonClient> logger, Microsoft.Extensions.Options.IOption
3030 this . tonOptions = options ? . Value ?? throw new ArgumentNullException ( nameof ( options ) ) ;
3131 }
3232
33- [ DllImport ( TonLibResolver . DllNamePlaceholder ) ]
33+ [ DllImport ( TonLibResolver . DllNamePlaceholder , CallingConvention = CallingConvention . Cdecl ) ]
3434 private static extern IntPtr tonlib_client_json_create ( ) ;
3535
36- [ DllImport ( TonLibResolver . DllNamePlaceholder ) ]
36+ [ DllImport ( TonLibResolver . DllNamePlaceholder , CallingConvention = CallingConvention . Cdecl ) ]
3737 private static extern void tonlib_client_json_destroy ( IntPtr client ) ;
3838
39- [ DllImport ( TonLibResolver . DllNamePlaceholder ) ]
39+ [ DllImport ( TonLibResolver . DllNamePlaceholder , CallingConvention = CallingConvention . Cdecl ) ]
4040 private static extern void tonlib_client_set_verbosity_level ( int level ) ;
4141
42- [ DllImport ( TonLibResolver . DllNamePlaceholder , CharSet = CharSet . Ansi ) ]
43- private static extern IntPtr tonlib_client_json_execute ( IntPtr client , string request ) ;
42+ [ DllImport ( TonLibResolver . DllNamePlaceholder , CallingConvention = CallingConvention . Cdecl ) ]
43+ private static extern IntPtr tonlib_client_json_execute ( IntPtr client , [ MarshalAs ( UnmanagedType . LPStr ) ] string request ) ;
4444
45- [ DllImport ( TonLibResolver . DllNamePlaceholder , CharSet = CharSet . Ansi ) ]
46- private static extern void tonlib_client_json_send ( IntPtr client , string request ) ;
45+ [ DllImport ( TonLibResolver . DllNamePlaceholder , CallingConvention = CallingConvention . Cdecl ) ]
46+ private static extern void tonlib_client_json_send ( IntPtr client , [ MarshalAs ( UnmanagedType . LPStr ) ] string request ) ;
4747
48- [ DllImport ( TonLibResolver . DllNamePlaceholder ) ]
48+ [ DllImport ( TonLibResolver . DllNamePlaceholder , CallingConvention = CallingConvention . Cdecl ) ]
4949 private static extern IntPtr tonlib_client_json_receive ( IntPtr client , double timeout ) ;
5050
5151 public OptionsInfo ? OptionsInfo { get ; private set ; }
0 commit comments