Gets the main module for the associated process.
[Visual Basic] Public ReadOnly Property MainModule As ProcessModule [C#] public ProcessModule MainModule {get;} [C++] public: __property ProcessModule* get_MainModule(); [JScript] public function get MainModule() : ProcessModule;
The ProcessModule that was used to start the process.
Exception Type | Condition |
---|---|
SystemException | You are attempting to access this property on a process on a non-Windows NT computer. |
A process module represents a .dll or .exe loaded into a particular process. A ProcessModule instance lets you view information about a module, including module and file name, and module memory details.
The MainModule property indicates the executable that was used to start the process.
Process Class | Process Members | System.Diagnostics Namespace | Modules