This documentation is archived and is not being maintained.

Process.Modules Property

Gets the modules that have been loaded by the associated process.

[Visual Basic]
Public ReadOnly Property Modules As ProcessModuleCollection
public ProcessModuleCollection Modules {get;}
public: __property ProcessModuleCollection* get_Modules();
public function get Modules() : ProcessModuleCollection;

Property Value

An array of type ProcessModule that represents the modules that have been loaded by the associated process.


Exception Type Condition
SystemException You are attempting to access the Modules property for a process that is running on a remote computer. The property is available only for processes running on the local computer.


The process Id is not available.


A process module represents a .dll or .exe file that is loaded into a particular process. A ProcessModule instance lets you view information about a module, including the module name, file name, and module memory details.

A process can load multiple modules into memory. For example, .exe files that load additional .dll files have multiple modules.

After starting the process, this collection is empty until the system has loaded the process. If the process has a main window, you can call WaitForInputIdle before retrieving this property to ensure that the collection is nonempty when you get the list.

Windows 98 Platform Note:  This property is not available on this platform if you started the process with ProcessStartInfo.UseShellExecute set to true.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

Process Class | Process Members | System.Diagnostics Namespace | ProcessModule