_AppDomain.ExecuteAssemblyとは? わかりやすく解説

AppDomain.ExecuteAssembly メソッド (String, Evidence, String[])

指定したファイル格納されているアセンブリを、指定した証拠引数使用して実行します

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Function ExecuteAssembly ( _
    assemblyFile As String, _
    assemblySecurity As Evidence, _
    args As String() _
) As Integer
Dim instance As AppDomain
Dim assemblyFile As String
Dim assemblySecurity As Evidence
Dim args As String()
Dim returnValue As Integer

returnValue = instance.ExecuteAssembly(assemblyFile, assemblySecurity, args)
public int ExecuteAssembly (
    string assemblyFile,
    Evidence assemblySecurity,
    string[] args
)
public:
virtual int ExecuteAssembly (
    String^ assemblyFile, 
    Evidence^ assemblySecurity, 
    array<String^>^ args
) sealed
public final int ExecuteAssembly (
    String assemblyFile, 
    Evidence assemblySecurity, 
    String[] args
)
public final function ExecuteAssembly (
    assemblyFile : String, 
    assemblySecurity : Evidence, 
    args : String[]
) : int

パラメータ

assemblyFile

実行するアセンブリ格納されているファイルの名前。

assemblySecurity

アセンブリ指定する証拠

args

アセンブリのエントリ ポイントに渡す引数

戻り値
アセンブリのエントリ ポイント返す値。

例外例外
例外種類条件

ArgumentNullException

assemblyFilenull 参照 (Visual Basic では Nothing) です。

FileNotFoundException

assemblyFile が見つかりません。

BadImageFormatException

assemblyFile有効なアセンブリではありません。

AppDomainUnloadedException

操作が、アンロードされたアプリケーション ドメイン試行されています。

FileLoadException

1 つアセンブリまたはモジュール2 つ異な証拠使用して 2 回読込まれました。

解説解説
使用例使用例

2 つ異なドメインで ExecuteAssembly のオーバーロード1 つ使用する方法次の例に示します

Module Test

   Sub Main()
      Dim currentDomain As AppDomain = AppDomain.CurrentDomain
      Dim otherDomain As AppDomain = AppDomain.CreateDomain("otherDomain")
      
      currentDomain.ExecuteAssembly("MyExecutable.exe")
      ' Prints "MyExecutable running on [default]"

      otherDomain.ExecuteAssembly("MyExecutable.exe")
      ' Prints "MyExecutable running on otherDomain"
   End Sub 'Main

End Module 'Test
class Test {
   public static void Main()
 {
      AppDomain currentDomain = AppDomain.CurrentDomain;
      AppDomain otherDomain = AppDomain.CreateDomain("otherDomain");
      
      currentDomain.ExecuteAssembly("MyExecutable.exe");
      // Prints "MyExecutable running on [default]"

      otherDomain.ExecuteAssembly("MyExecutable.exe");
      // Prints "MyExecutable running on otherDomain"
   }
}
int main()
{
   AppDomain^ currentDomain = AppDomain::CurrentDomain;
   AppDomain^ otherDomain = AppDomain::CreateDomain( "otherDomain" );
   currentDomain->ExecuteAssembly( "MyExecutable.exe" );
   
   // Prints S"MyExecutable running on [default]"
   otherDomain->ExecuteAssembly( "MyExecutable.exe" );
   
   // Prints S"MyExecutable running on otherDomain"
}

.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

AppDomain.ExecuteAssembly メソッド (String)

指定したファイル格納されているアセンブリ実行します

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Function ExecuteAssembly ( _
    assemblyFile As String _
) As Integer
Dim instance As AppDomain
Dim assemblyFile As String
Dim returnValue As Integer

returnValue = instance.ExecuteAssembly(assemblyFile)
public int ExecuteAssembly (
    string assemblyFile
)
public:
virtual int ExecuteAssembly (
    String^ assemblyFile
) sealed
public final int ExecuteAssembly (
    String assemblyFile
)
public final function ExecuteAssembly (
    assemblyFile : String
) : int

パラメータ

assemblyFile

実行するアセンブリ格納されているファイルの名前。

戻り値
アセンブリのエントリ ポイント返す値。

例外例外
例外種類条件

ArgumentNullException

assemblyFilenull 参照 (Visual Basic では Nothing) です。

FileNotFoundException

assemblyFile が見つかりません。

BadImageFormatException

assemblyFile有効なアセンブリではありません。

AppDomainUnloadedException

操作が、アンロードされたアプリケーション ドメイン試行されています。

FileLoadException

1 つアセンブリまたはモジュール2 つ異な証拠使用して 2 回読込まれました。

解説解説
使用例使用例

2 つ異なドメインExecuteAssemblyオーバーロード1 つ使用する方法次の例に示します

Module Test

   Sub Main()
      Dim currentDomain As AppDomain = AppDomain.CurrentDomain
      Dim otherDomain As AppDomain = AppDomain.CreateDomain("otherDomain")
      
      currentDomain.ExecuteAssembly("MyExecutable.exe")
      ' Prints "MyExecutable running on [default]"

      otherDomain.ExecuteAssembly("MyExecutable.exe")
      ' Prints "MyExecutable running on otherDomain"
   End Sub 'Main

End Module 'Test
class Test {
   public static void Main()
 {
      AppDomain currentDomain = AppDomain.CurrentDomain;
      AppDomain otherDomain = AppDomain.CreateDomain("otherDomain");
      
      currentDomain.ExecuteAssembly("MyExecutable.exe");
      // Prints "MyExecutable running on [default]"

      otherDomain.ExecuteAssembly("MyExecutable.exe");
      // Prints "MyExecutable running on otherDomain"
   }
}
int main()
{
   AppDomain^ currentDomain = AppDomain::CurrentDomain;
   AppDomain^ otherDomain = AppDomain::CreateDomain( "otherDomain" );
   currentDomain->ExecuteAssembly( "MyExecutable.exe" );
   
   // Prints S"MyExecutable running on [default]"
   otherDomain->ExecuteAssembly( "MyExecutable.exe" );
   
   // Prints S"MyExecutable running on otherDomain"
}

.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

AppDomain.ExecuteAssembly メソッド


AppDomain.ExecuteAssembly メソッド (String, Evidence)

指定したファイル格納されているアセンブリを、指定した証拠使用して実行します

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Function ExecuteAssembly ( _
    assemblyFile As String, _
    assemblySecurity As Evidence _
) As Integer
Dim instance As AppDomain
Dim assemblyFile As String
Dim assemblySecurity As Evidence
Dim returnValue As Integer

returnValue = instance.ExecuteAssembly(assemblyFile, assemblySecurity)
public int ExecuteAssembly (
    string assemblyFile,
    Evidence assemblySecurity
)
public:
virtual int ExecuteAssembly (
    String^ assemblyFile, 
    Evidence^ assemblySecurity
) sealed
public final int ExecuteAssembly (
    String assemblyFile, 
    Evidence assemblySecurity
)
public final function ExecuteAssembly (
    assemblyFile : String, 
    assemblySecurity : Evidence
) : int

パラメータ

assemblyFile

実行するアセンブリ格納されているファイルの名前。

assemblySecurity

アセンブリ読み込むために必要な証拠

戻り値
アセンブリのエントリ ポイント返す値。

例外例外
例外種類条件

ArgumentNullException

assemblyFilenull 参照 (Visual Basic では Nothing) です。

FileNotFoundException

assemblyFile が見つかりません。

BadImageFormatException

assemblyFile有効なアセンブリではありません。

AppDomainUnloadedException

操作が、アンロードされたアプリケーション ドメイン試行されています。

FileLoadException

1 つアセンブリまたはモジュール2 つ異な証拠使用して 2 回読込まれました。

解説解説
使用例使用例

2 つ異なドメインExecuteAssemblyオーバーロード1 つ使用する方法次の例に示します

Module Test

   Sub Main()
      Dim currentDomain As AppDomain = AppDomain.CurrentDomain
      Dim otherDomain As AppDomain = AppDomain.CreateDomain("otherDomain")
      
      currentDomain.ExecuteAssembly("MyExecutable.exe")
      ' Prints "MyExecutable running on [default]"

      otherDomain.ExecuteAssembly("MyExecutable.exe")
      ' Prints "MyExecutable running on otherDomain"
   End Sub 'Main

End Module 'Test
class Test {
   public static void Main()
 {
      AppDomain currentDomain = AppDomain.CurrentDomain;
      AppDomain otherDomain = AppDomain.CreateDomain("otherDomain");
      
      currentDomain.ExecuteAssembly("MyExecutable.exe");
      // Prints "MyExecutable running on [default]"

      otherDomain.ExecuteAssembly("MyExecutable.exe");
      // Prints "MyExecutable running on otherDomain"
   }
}
int main()
{
   AppDomain^ currentDomain = AppDomain::CurrentDomain;
   AppDomain^ otherDomain = AppDomain::CreateDomain( "otherDomain" );
   currentDomain->ExecuteAssembly( "MyExecutable.exe" );
   
   // Prints S"MyExecutable running on [default]"
   otherDomain->ExecuteAssembly( "MyExecutable.exe" );
   
   // Prints S"MyExecutable running on otherDomain"
}

.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

AppDomain.ExecuteAssembly メソッド (String, Evidence, String[], Byte[], AssemblyHashAlgorithm)

指定したファイル格納されているアセンブリを、指定した証拠引数使用して実行します

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Function ExecuteAssembly ( _
    assemblyFile As String, _
    assemblySecurity As Evidence, _
    args As String(), _
    hashValue As Byte(), _
    hashAlgorithm As AssemblyHashAlgorithm _
) As Integer
Dim instance As AppDomain
Dim assemblyFile As String
Dim assemblySecurity As Evidence
Dim args As String()
Dim hashValue As Byte()
Dim hashAlgorithm As AssemblyHashAlgorithm
Dim returnValue As Integer

returnValue = instance.ExecuteAssembly(assemblyFile, assemblySecurity, args, hashValue,
 hashAlgorithm)
public int ExecuteAssembly (
    string assemblyFile,
    Evidence assemblySecurity,
    string[] args,
    byte[] hashValue,
    AssemblyHashAlgorithm hashAlgorithm
)
public:
int ExecuteAssembly (
    String^ assemblyFile, 
    Evidence^ assemblySecurity, 
    array<String^>^ args, 
    array<unsigned char>^ hashValue, 
    AssemblyHashAlgorithm hashAlgorithm
)
public int ExecuteAssembly (
    String assemblyFile, 
    Evidence assemblySecurity, 
    String[] args, 
    byte[] hashValue, 
    AssemblyHashAlgorithm hashAlgorithm
)
public function ExecuteAssembly (
    assemblyFile : String, 
    assemblySecurity : Evidence, 
    args : String[], 
    hashValue : byte[], 
    hashAlgorithm : AssemblyHashAlgorithm
) : int

パラメータ

assemblyFile

実行するアセンブリ格納されているファイルの名前。

assemblySecurity

アセンブリ指定する証拠

args

アセンブリのエントリ ポイントに渡す引数

hashValue

計算されハッシュ コードの値を表します

hashAlgorithm

アセンブリ マニフェスト使用するハッシュ アルゴリズム表します

戻り値
アセンブリのエントリ ポイント返す値。

例外例外
例外種類条件

ArgumentNullException

assemblyFilenull 参照 (Visual Basic では Nothing) です。

FileNotFoundException

assemblyFile が見つかりません。

BadImageFormatException

assemblyFile有効なアセンブリではありません。

AppDomainUnloadedException

操作が、アンロードされたアプリケーション ドメイン試行されています。

FileLoadException

1 つアセンブリまたはモジュール2 つ異な証拠使用して 2 回読込まれました。

解説解説
使用例使用例

2 つ異なドメインで ExecuteAssembly のオーバーロード1 つ使用する方法次の例に示します

Module Test

   Sub Main()
      Dim currentDomain As AppDomain = AppDomain.CurrentDomain
      Dim otherDomain As AppDomain = AppDomain.CreateDomain("otherDomain")
      
      currentDomain.ExecuteAssembly("MyExecutable.exe")
      ' Prints "MyExecutable running on [default]"

      otherDomain.ExecuteAssembly("MyExecutable.exe")
      ' Prints "MyExecutable running on otherDomain"
   End Sub 'Main

End Module 'Test
class Test {
   public static void Main()
 {
      AppDomain currentDomain = AppDomain.CurrentDomain;
      AppDomain otherDomain = AppDomain.CreateDomain("otherDomain");
      
      currentDomain.ExecuteAssembly("MyExecutable.exe");
      // Prints "MyExecutable running on [default]"

      otherDomain.ExecuteAssembly("MyExecutable.exe");
      // Prints "MyExecutable running on otherDomain"
   }
}
int main()
{
   AppDomain^ currentDomain = AppDomain::CurrentDomain;
   AppDomain^ otherDomain = AppDomain::CreateDomain( "otherDomain" );
   currentDomain->ExecuteAssembly( "MyExecutable.exe" );
   
   // Prints S"MyExecutable running on [default]"
   otherDomain->ExecuteAssembly( "MyExecutable.exe" );
   
   // Prints S"MyExecutable running on otherDomain"
}

.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

_AppDomain.ExecuteAssembly メソッド




英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「_AppDomain.ExecuteAssembly」の関連用語

_AppDomain.ExecuteAssemblyのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



_AppDomain.ExecuteAssemblyのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS