Assembly.LoadModule Assembly.LoadModule Assembly.LoadModule Assembly.LoadModule Method

定义

加载此程序集的内部模块。Loads the module internal to this assembly.

重载

LoadModule(String, Byte[]) LoadModule(String, Byte[]) LoadModule(String, Byte[]) LoadModule(String, Byte[])

加载带有基于通用对象文件格式 (COFF) 的映像(包含已发出的模块)或资源文件的模块(该模块相对于此程序集是内部的)。Loads the module, internal to this assembly, with a common object file format (COFF)-based image containing an emitted module, or a resource file.

LoadModule(String, Byte[], Byte[]) LoadModule(String, Byte[], Byte[]) LoadModule(String, Byte[], Byte[]) LoadModule(String, Byte[], Byte[])

加载带有基于通用对象文件格式 (COFF) 的映像(包含已发出的模块)或资源文件的模块(该模块相对于此程序集是内部的)。Loads the module, internal to this assembly, with a common object file format (COFF)-based image containing an emitted module, or a resource file. 还加载表示此模块的符号的原始字节。The raw bytes representing the symbols for the module are also loaded.

LoadModule(String, Byte[]) LoadModule(String, Byte[]) LoadModule(String, Byte[]) LoadModule(String, Byte[])

加载带有基于通用对象文件格式 (COFF) 的映像(包含已发出的模块)或资源文件的模块(该模块相对于此程序集是内部的)。Loads the module, internal to this assembly, with a common object file format (COFF)-based image containing an emitted module, or a resource file.

public:
 virtual System::Reflection::Module ^ LoadModule(System::String ^ moduleName, cli::array <System::Byte> ^ rawModule);
public System.Reflection.Module LoadModule (string moduleName, byte[] rawModule);
abstract member LoadModule : string * byte[] -> System.Reflection.Module
override this.LoadModule : string * byte[] -> System.Reflection.Module
Public Function LoadModule (moduleName As String, rawModule As Byte()) As Module

参数

moduleName
String String String String

模块的名称。The name of the module. 此字符串必须与程序集清单中的文件名对应。This string must correspond to a file name in this assembly's manifest.

rawModule
Byte[]

基于 COFF 映像的字节数组,该数组包含发送的模块或资源。A byte array that is a COFF-based image containing an emitted module, or a resource.

返回

加载的模块。The loaded module.

实现

异常

moduleNamerawModulenullmoduleName or rawModule is null.

moduleName 与此程序集清单中的文件条目不匹配。moduleName does not match a file entry in this assembly's manifest.

rawModule 不是有效的模块。rawModule is not a valid module.

无法加载已找到的文件。A file that was found could not be loaded.

安全性

SecurityPermission
若要提供的证据。to provide evidence. 关联的枚举: ControlEvidenceAssociated enumeration: ControlEvidence

LoadModule(String, Byte[], Byte[]) LoadModule(String, Byte[], Byte[]) LoadModule(String, Byte[], Byte[]) LoadModule(String, Byte[], Byte[])

加载带有基于通用对象文件格式 (COFF) 的映像(包含已发出的模块)或资源文件的模块(该模块相对于此程序集是内部的)。Loads the module, internal to this assembly, with a common object file format (COFF)-based image containing an emitted module, or a resource file. 还加载表示此模块的符号的原始字节。The raw bytes representing the symbols for the module are also loaded.

public:
 virtual System::Reflection::Module ^ LoadModule(System::String ^ moduleName, cli::array <System::Byte> ^ rawModule, cli::array <System::Byte> ^ rawSymbolStore);
public virtual System.Reflection.Module LoadModule (string moduleName, byte[] rawModule, byte[] rawSymbolStore);
abstract member LoadModule : string * byte[] * byte[] -> System.Reflection.Module
override this.LoadModule : string * byte[] * byte[] -> System.Reflection.Module
Public Overridable Function LoadModule (moduleName As String, rawModule As Byte(), rawSymbolStore As Byte()) As Module

参数

moduleName
String String String String

模块的名称。The name of the module. 此字符串必须与程序集清单中的文件名对应。This string must correspond to a file name in this assembly's manifest.

rawModule
Byte[]

基于 COFF 映像的字节数组,该数组包含发送的模块或资源。A byte array that is a COFF-based image containing an emitted module, or a resource.

rawSymbolStore
Byte[]

一个字节数组,包含表示模块符号的原始字节。A byte array containing the raw bytes representing the symbols for the module. 如果这是一个资源文件,则必须为 nullMust be null if this is a resource file.

返回

加载的模块。The loaded module.

实现

异常

moduleNamerawModulenullmoduleName or rawModule is null.

moduleName 与此程序集清单中的文件条目不匹配。moduleName does not match a file entry in this assembly's manifest.

rawModule 不是有效的模块。rawModule is not a valid module.

无法加载已找到的文件。A file that was found could not be loaded.

安全性

SecurityPermission
若要提供的证据。to provide evidence. 关联的枚举: ControlEvidenceAssociated enumeration: ControlEvidence

适用于