Apply Your Knowledge

Exercises

14.1. Getting Module Information for a Process

When a process executes, it loads several other modules (generally .dll files) to help perform its functions. By using the Process class, you can determine what modules are loaded by an application. For each module, you can also determine various details, such as version number, entry point address, and memory size.

In this exercise, you learn how to work with the ProcessModule class and the ProcessModuleCollection class to get information about the modules loaded by a process that is executing.

Estimated time: 25 minutes

1.
Launch Visual Studio .NET. Select File, New, Blank Solution, and name the new solution 316C14Exercises.
2.
Add a new Windows application project ...

Get MCAD/MCSD.NET Training Guide (Exam 70-316): Developing and Implementing Windows®-Based Applications with Microsoft® Visual C#™ .NET and Microsoft® Visual Studio® .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.