Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DefinePInvokeMethod() [2/2]

MethodBuilder System.Reflection.Emit.ModuleBuilder.DefinePInvokeMethod ( string name,
string dllName,
string entryName,
MethodAttributes attributes,
CallingConventions callingConvention,
Type? returnType,
Type?[] parameterTypes,
CallingConvention nativeCallConv,
CharSet nativeCharSet )
inline

Definition at line 717 of file ModuleBuilder.cs.

718 {
719 lock (SyncRoot)
720 {
721 if ((attributes & MethodAttributes.Static) == 0)
722 {
723 throw new ArgumentException(SR.Argument_GlobalFunctionHasToBeStatic);
724 }
725 AssemblyBuilder.CheckContext(returnType);
726 AssemblyBuilder.CheckContext(parameterTypes);
728 }
729 }
MethodBuilder DefinePInvokeMethod(string name, string dllName, MethodAttributes attributes, CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet)

References System.Reflection.Emit.ModuleBuilderData._globalTypeBuilder, System.Reflection.Emit.ModuleBuilder._moduleData, System.SR.Argument_GlobalFunctionHasToBeStatic, System.Reflection.Emit.AssemblyBuilder.CheckContext(), System.Reflection.Emit.TypeBuilder.DefinePInvokeMethod(), and System.Reflection.Emit.ModuleBuilder.SyncRoot.