diff --git a/src/Generator/Driver.cs b/src/Generator/Driver.cs index a4f3907b..d7ae356c 100644 --- a/src/Generator/Driver.cs +++ b/src/Generator/Driver.cs @@ -261,6 +261,7 @@ namespace CppSharp public bool GenerateFunctionTemplates; public bool GeneratePartialClasses; public bool GenerateVirtualTables; + public bool GenerateInternalImports; public string IncludePrefix; public bool WriteOnlyWhenChanged; public Func GenerateName; diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index c84f8720..82b8b709 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -1998,6 +1998,9 @@ namespace CppSharp.Generators.CSharp libName = libName.Substring(3); } + if (Options.GenerateInternalImports) + libName = "__Internal"; + Write("[DllImport(\"{0}\", ", libName); var callConv = Helpers.ToCSharpCallConv(function.CallingConvention);