This shows you the differences between two versions of the page.
|
ep:labs:08:contents:tasks:ex5 [2021/10/09 12:02] cezar.craciunoiu Move task 05 to separate content page |
ep:labs:08:contents:tasks:ex5 [2023/10/21 12:48] (current) cezar.craciunoiu [05. [20p] Windows API] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ==== 05. [40p] Windows API ==== | + | ==== 05. [20p] Windows API ==== |
| <note warning> | <note warning> | ||
| For this task we will use the project skeleton inside the //**Task-05**// folder. | For this task we will use the project skeleton inside the //**Task-05**// folder. | ||
| Line 8: | Line 8: | ||
| Here is a solution using the skeleton: {{ep:laboratoare:lab08-task05-sol.zip}} | Here is a solution using the skeleton: {{ep:laboratoare:lab08-task05-sol.zip}} | ||
| + | |||
| + | In this updated version, only the calls need to be done, as the exercise was made more simple. | ||
| </solution> | </solution> | ||
| | | ||
| Line 14: | Line 16: | ||
| This simple Task Manager will print two CSV tables. | This simple Task Manager will print two CSV tables. | ||
| The first will contain system information provided by PSAPI. | The first will contain system information provided by PSAPI. | ||
| - | The second will print memory information for accesible process and its name. | + | The second will print memory information for any accessible process and their name. |
| - | + | ||
| - | **We want to print information in kB instead of bytes for processes**. | + | |
| <note tip> | <note tip> | ||
| Line 22: | Line 22: | ||
| * [[https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-getperformanceinfo | GetPerformanceInfo]] | * [[https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-getperformanceinfo | GetPerformanceInfo]] | ||
| * [[https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-enumprocesses | EnumProcesses]] | * [[https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-enumprocesses | EnumProcesses]] | ||
| - | * [[https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-getprocessimagefilenamea | GetProcessImageFileNameA]] | ||
| * [[https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-getprocessmemoryinfo | GetProcessMemoryInfo]] | * [[https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-getprocessmemoryinfo | GetProcessMemoryInfo]] | ||
| Follow the hints inside the skeleton to see how you will put them all together. | Follow the hints inside the skeleton to see how you will put them all together. | ||