This shows you the differences between two versions of the page.
ep:labs:08:contents:tasks:ex5 [2021/10/19 10:50] cezar.craciunoiu |
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 9: | Line 9: | ||
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}} | ||
- | For grading this task I would go with (you can use any other grading method as long as it's fair): | + | In this updated version, only the calls need to be done, as the exercise was made more simple. |
- | * 5p respecting the CSV format (basically if the tables actually look like tables); this applies to people which will not use the skeleton | + | |
- | * 15p the first table | + | |
- | * 10p half of the second table (doesn't need to be a consecutive half) | + | |
- | * 10p the other half of the second table | + | |
- | + | ||
- | The first table is easier (and values more points) such that students get reaccustomed to WinAPI and the skeleton. | + | |
</solution> | </solution> | ||
| | ||
Line 22: | 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 30: | 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. |