ModuleBuilder.DefinePInvokeMethodCore Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
När åsidosättas i en härledd klass definierar en PInvoke metod.
protected:
abstract System::Reflection::Emit::MethodBuilder ^ DefinePInvokeMethodCore(System::String ^ name, System::String ^ dllName, System::String ^ entryName, System::Reflection::MethodAttributes attributes, System::Reflection::CallingConventions callingConvention, Type ^ returnType, cli::array <Type ^> ^ parameterTypes, System::Runtime::InteropServices::CallingConvention nativeCallConv, System::Runtime::InteropServices::CharSet nativeCharSet);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("P/Invoke marshalling may dynamically access members that could be trimmed.")]
protected abstract System.Reflection.Emit.MethodBuilder DefinePInvokeMethodCore(string name, string dllName, string entryName, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("P/Invoke marshalling may dynamically access members that could be trimmed.")>]
abstract member DefinePInvokeMethodCore : string * string * string * System.Reflection.MethodAttributes * System.Reflection.CallingConventions * Type * Type[] * System.Runtime.InteropServices.CallingConvention * System.Runtime.InteropServices.CharSet -> System.Reflection.Emit.MethodBuilder
Protected MustOverride Function DefinePInvokeMethodCore (name As String, dllName As String, entryName As String, attributes As MethodAttributes, callingConvention As CallingConventions, returnType As Type, parameterTypes As Type(), nativeCallConv As CallingConvention, nativeCharSet As CharSet) As MethodBuilder
Parametrar
- name
- String
Namnet på PInvoke metoden.
name kan inte innehålla inbäddade null-värden.
- dllName
- String
Namnet på den DLL där PInvoke metoden definieras.
- entryName
- String
Namnet på startpunkten i DLL:en.
- attributes
- MethodAttributes
En bitvis kombination av uppräkningsvärdena som anger metodens attribut.
- callingConvention
- CallingConventions
Metodens anropskonvention.
- returnType
- Type
Metodens returtyp.
- parameterTypes
- Type[]
Typerna av metodens parametrar.
- nativeCallConv
- CallingConvention
Den interna anropskonventionen.
- nativeCharSet
- CharSet
Metodens interna teckenuppsättning.
Returer
Den definierade PInvoke metoden.
- Attribut