diff --git a/ffi/dotnet-idsdk/IoticsIdLib/src/Tools.cs b/ffi/dotnet-idsdk/IoticsIdLib/src/Tools.cs index 3b0b557..3915c49 100644 --- a/ffi/dotnet-idsdk/IoticsIdLib/src/Tools.cs +++ b/ffi/dotnet-idsdk/IoticsIdLib/src/Tools.cs @@ -3,10 +3,10 @@ namespace IOTICS; class Tools { - public static string InvokeGoFunction(Func goFunction) + public static string InvokeGoFunction(Func goFunction) { string? error; - IdLib.Return result; + IdLib.StringAndError result; try { diff --git a/ffi/dotnet-idsdk/IoticsIdLib/src/id/IdLib.cs b/ffi/dotnet-idsdk/IoticsIdLib/src/id/IdLib.cs index c2aaf7a..90f112d 100644 --- a/ffi/dotnet-idsdk/IoticsIdLib/src/id/IdLib.cs +++ b/ffi/dotnet-idsdk/IoticsIdLib/src/id/IdLib.cs @@ -5,7 +5,7 @@ Wrapper class that loads the DLL and exposes the methods as C# code. */ internal partial class IdLib { - // Define the struct that matches the return type of CreateDefaultSeed in Go + // Define the struct that matches the return type of most of the functions below [StructLayout(LayoutKind.Sequential)] public struct Return { @@ -158,7 +158,7 @@ public static partial Return CreateTwinDidWithControlDelegation( return null; string? result = Marshal.PtrToStringAnsi(ptr); - FreeUpCString(ptr); // Assuming your Go library has a function to free the allocated memory + FreeUpCString(ptr); return result; }