|
|
@ -1357,7 +1357,7 @@ namespace CppSharp.Generators.CSharp |
|
|
|
PushBlock(CSharpBlockKind.VTableDelegate); |
|
|
|
PushBlock(CSharpBlockKind.VTableDelegate); |
|
|
|
|
|
|
|
|
|
|
|
WriteLine("[SuppressUnmanagedCodeSecurity]"); |
|
|
|
WriteLine("[SuppressUnmanagedCodeSecurity]"); |
|
|
|
WriteLine("[UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.{0})]", |
|
|
|
WriteLine("[UnmanagedFunctionPointerAttribute(global::System.Runtime.InteropServices.CallingConvention.{0})]", |
|
|
|
Helpers.ToCSharpCallConv(method.CallingConvention)); |
|
|
|
Helpers.ToCSharpCallConv(method.CallingConvention)); |
|
|
|
|
|
|
|
|
|
|
|
CSharpTypePrinterResult retType; |
|
|
|
CSharpTypePrinterResult retType; |
|
|
@ -1430,7 +1430,7 @@ namespace CppSharp.Generators.CSharp |
|
|
|
delegateName = delegateInstance + "Delegate"; |
|
|
|
delegateName = delegateInstance + "Delegate"; |
|
|
|
delegateRaise = delegateInstance + "RaiseInstance"; |
|
|
|
delegateRaise = delegateInstance + "RaiseInstance"; |
|
|
|
|
|
|
|
|
|
|
|
WriteLine("[UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.Cdecl)]"); |
|
|
|
WriteLine("[UnmanagedFunctionPointerAttribute(global::System.Runtime.InteropServices.CallingConvention.Cdecl)]"); |
|
|
|
WriteLine("delegate void {0}({1});", delegateName, args); |
|
|
|
WriteLine("delegate void {0}({1});", delegateName, args); |
|
|
|
WriteLine("{0} {1};", delegateName, delegateRaise); |
|
|
|
WriteLine("{0} {1};", delegateName, delegateRaise); |
|
|
|
NewLine(); |
|
|
|
NewLine(); |
|
|
@ -2195,7 +2195,7 @@ namespace CppSharp.Generators.CSharp |
|
|
|
else if (typedef.Type.IsPointerTo(out functionType)) |
|
|
|
else if (typedef.Type.IsPointerTo(out functionType)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
PushBlock(CSharpBlockKind.Typedef); |
|
|
|
PushBlock(CSharpBlockKind.Typedef); |
|
|
|
WriteLine("[UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.{0})]", |
|
|
|
WriteLine("[UnmanagedFunctionPointerAttribute(global::System.Runtime.InteropServices.CallingConvention.{0})]", |
|
|
|
Helpers.ToCSharpCallConv(functionType.CallingConvention)); |
|
|
|
Helpers.ToCSharpCallConv(functionType.CallingConvention)); |
|
|
|
TypePrinter.PushContext(CSharpTypePrinterContextKind.Native); |
|
|
|
TypePrinter.PushContext(CSharpTypePrinterContextKind.Native); |
|
|
|
WriteLine("{0}unsafe {1};", |
|
|
|
WriteLine("{0}unsafe {1};", |
|
|
@ -2324,7 +2324,7 @@ namespace CppSharp.Generators.CSharp |
|
|
|
Write("[DllImport(\"{0}\", ", libName); |
|
|
|
Write("[DllImport(\"{0}\", ", libName); |
|
|
|
|
|
|
|
|
|
|
|
var callConv = Helpers.ToCSharpCallConv(function.CallingConvention); |
|
|
|
var callConv = Helpers.ToCSharpCallConv(function.CallingConvention); |
|
|
|
WriteLine("CallingConvention = System.Runtime.InteropServices.CallingConvention.{0},", |
|
|
|
WriteLine("CallingConvention = global::System.Runtime.InteropServices.CallingConvention.{0},", |
|
|
|
callConv); |
|
|
|
callConv); |
|
|
|
|
|
|
|
|
|
|
|
WriteLineIndent("EntryPoint=\"{0}\")]", function.Mangled); |
|
|
|
WriteLineIndent("EntryPoint=\"{0}\")]", function.Mangled); |
|
|
|