diff --git a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs index 588a2f89..efe3a234 100644 --- a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs +++ b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs @@ -220,7 +220,8 @@ namespace CppSharp.Generators.CSharp if (isManagedContext && param != null && (param.IsOut || param.IsInOut)) return pointee.Visit(this, quals); - if (ContextKind == CSharpTypePrinterContextKind.GenericDelegate) + if (ContextKind == CSharpTypePrinterContextKind.GenericDelegate || + pointee.IsPrimitiveType(PrimitiveType.Void)) return "global::System.IntPtr"; return pointee.Visit(this, quals) + "*";