From the course: Learning Assembly Language

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

More on the Windows API

More on the Windows API - Python Tutorial

From the course: Learning Assembly Language

Start my 1-month free trial

More on the Windows API

- [Instructor] Let's take a look at how we might get some of the Windows Internal information, for example, a list of processes. This takes a bit of coding, so I've prepared it for us to go through. We start the data declaration with the handles we'll need, followed by a string buffer at line nine and an output line at line 10. At line 11, we've declared a heading for our console output and then at line 13, we have a double word array of 1,024 entries which will be used to store the list of process numbers. Let's move down to line 93 to look at the mainline code. Firstly, we output the heading line to the console. Then we invoke the Win32 function for enumerating processes, EnumProcesses. In the top right panel, we need to add a new DLL to the project setup and we'll add psapi.dll. This is where we find the Win32 API calls we'll be using. The call to EnumProcesses requires a data structure in which to store the process…

Contents