diff --git a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs index a526c484..e9e1d4fd 100644 --- a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs +++ b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs @@ -202,6 +202,10 @@ namespace CppSharp.Generators.CSharp if (ContextKind == CSharpTypePrinterContextKind.GenericDelegate) return "global::System.IntPtr"; + + if (primitive == PrimitiveType.Void) + return "global::System.IntPtr"; + return VisitPrimitiveType(primitive, quals) + "*"; }