diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 2f55157c..1ddb77c0 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -515,8 +515,12 @@ namespace CppSharp.Generators.CSharp if (CSharpTypePrinter.IsConstCharString(field.QualifiedType)) isRefClass = true; + FunctionType functionType; + if (fieldType.IsPointerTo(out functionType)) + isRefClass = true; + if (isRefClass) - type = "void**"; + type = "void*"; var location = string.Format("({0} + {1})", instance, field.OffsetInBytes);