ProcessModule クラスとは? わかりやすく解説

ProcessModule クラス

特定のプロセス読み込まれ.dll ファイルまたは実行可能ファイル (.exe) を表します

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

Public Class ProcessModule
    Inherits Component
Dim instance As ProcessModule
public class ProcessModule : Component
public class ProcessModule extends Component
public class ProcessModule extends
 Component
解説解説
使用例使用例
Dim myProcess As New Process()
' Get the process start information of notepad.
Dim myProcessStartInfo As New
 ProcessStartInfo("notepad.exe")
' Assign 'StartInfo' of notepad to 'StartInfo' of 'myProcess' object.
myProcess.StartInfo = myProcessStartInfo
' Create a notepad.
myProcess.Start()
System.Threading.Thread.Sleep(1000)
Dim myProcessModule As ProcessModule
' Get all the modules associated with 'myProcess'.
Dim myProcessModuleCollection As ProcessModuleCollection
 = myProcess.Modules
Console.WriteLine("Properties of the modules  associated "
 + _
                     "with 'notepad' are:")
' Display the properties of each of the modules.
Dim i As Integer
For i = 0 To myProcessModuleCollection.Count
 - 1
    myProcessModule = myProcessModuleCollection(i)
    Console.WriteLine("The moduleName is " + myProcessModule.ModuleName)
    Console.WriteLine("The " + myProcessModule.ModuleName.ToString()
 + _
               "'s base address is: " + myProcessModule.BaseAddress.ToString())
    Console.WriteLine("The " + myProcessModule.ModuleName.ToString()
 + _
            "'s Entry point address is: " + myProcessModule.EntryPointAddress.ToString())
    Console.WriteLine("The " + myProcessModule.ModuleName
 + _
                            "'s File name is: " + myProcessModule.FileName)
Next i
' Get the main module associated with 'myProcess'.
myProcessModule = myProcess.MainModule
' Display the properties of the main module.
Console.WriteLine("The process's main moduleName is:  " +
 myProcessModule.ModuleName)
Console.WriteLine("The process's main module's base address is:
 " + _
                        myProcessModule.BaseAddress.ToString())
Console.WriteLine("The process's main module's Entry point address
 is: " + _
                        myProcessModule.EntryPointAddress.ToString())
Console.WriteLine("The process's main module's File name is: "
 + _
                        myProcessModule.FileName)
myProcess.CloseMainWindow()
Process myProcess = new Process();
// Get the process start information of notepad.
ProcessStartInfo  myProcessStartInfo = new ProcessStartInfo("notepad.exe");
// Assign 'StartInfo' of notepad to 'StartInfo' of 'myProcess' object.
myProcess.StartInfo = myProcessStartInfo;
// Create a notepad.
myProcess.Start();      
System.Threading.Thread.Sleep(1000);
ProcessModule myProcessModule;
// Get all the modules associated with 'myProcess'.
ProcessModuleCollection myProcessModuleCollection = myProcess.Modules;
Console.WriteLine("Properties of the modules  associated "
   +"with 'notepad' are:");
// Display the properties of each of the modules.
for( int i=0;i<myProcessModuleCollection.Count;i++)
{
   myProcessModule = myProcessModuleCollection[i];
   Console.WriteLine("The moduleName is "
      +myProcessModule.ModuleName);         
   Console.WriteLine("The " +myProcessModule.ModuleName + "'s base
 address is: "
      +myProcessModule.BaseAddress);
   Console.WriteLine("The " +myProcessModule.ModuleName + "'s Entry
 point address is: "
      +myProcessModule.EntryPointAddress);
   Console.WriteLine("The " +myProcessModule.ModuleName + "'s File
 name is: "
      +myProcessModule.FileName);
}
// Get the main module associated with 'myProcess'.
myProcessModule = myProcess.MainModule;
// Display the properties of the main module.
Console.WriteLine("The process's main moduleName is:  "
   +myProcessModule.ModuleName);     
Console.WriteLine("The process's main module's base address
 is: "
   +myProcessModule.BaseAddress);
Console.WriteLine("The process's main module's Entry point address is: "
   +myProcessModule.EntryPointAddress);
Console.WriteLine("The process's main module's File name is: "
   +myProcessModule.FileName);
myProcess.CloseMainWindow();
Process^ myProcess = gcnew Process;

// Get the process start information of notepad.
ProcessStartInfo^ myProcessStartInfo = gcnew ProcessStartInfo( "notepad.exe"
 );

// Assign 'StartInfo' of notepad to 'StartInfo' of 'myProcess' Object*.
myProcess->StartInfo = myProcessStartInfo;

// Create a notepad.
myProcess->Start();
System::Threading::Thread::Sleep( 1000 );
ProcessModule^ myProcessModule;

// Get all the modules associated with 'myProcess'.
ProcessModuleCollection^ myProcessModuleCollection = myProcess->Modules;
Console::WriteLine( "Properties of the modules  associated with 'notepad' are:"
 );

// Display the properties of each of the modules.
for ( int i = 0; i < myProcessModuleCollection->Count;
 i++ )
{
   myProcessModule = myProcessModuleCollection[ i ];
   Console::WriteLine( "The moduleName is {0}", myProcessModule->ModuleName
 );
   Console::WriteLine( "The {0}'s base address is: {1}",
 myProcessModule->ModuleName, myProcessModule->BaseAddress );
   Console::WriteLine( "The {0}'s Entry point address is: {1}", myProcessModule->ModuleName,
 myProcessModule->EntryPointAddress );
   Console::WriteLine( "The {0}'s File name is: {1}", myProcessModule->ModuleName,
 myProcessModule->FileName );
}
myProcessModule = myProcess->MainModule;

// Display the properties of the main module.
Console::WriteLine( "The process's main moduleName is: {0}", myProcessModule->ModuleName
 );
Console::WriteLine( "The process's main module's base address
 is: {0}", myProcessModule->BaseAddress );
Console::WriteLine( "The process's main module's Entry point address is: {0}",
 myProcessModule->EntryPointAddress );
Console::WriteLine( "The process's main module's File name is: {0}", myProcessModule->FileName
 );
myProcess->CloseMainWindow();
継承階層継承階層
System.Object
   System.MarshalByRefObject
     System.ComponentModel.Component
      System.Diagnostics.ProcessModule
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からProcessModule クラスを検索した結果を表示しています。
Weblioに収録されているすべての辞書からProcessModule クラスを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からProcessModule クラス を検索

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

辞書ショートカット

すべての辞書の索引

「ProcessModule クラス」の関連用語

ProcessModule クラスのお隣キーワード
検索ランキング

   

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



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

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

©2025 GRAS Group, Inc.RSS