View Single Post
  #1  
Old 10-11-2024, 15:36
sendersu sendersu is offline
VIP
 
Join Date: Oct 2010
Posts: 1,305
Rept. Given: 337
Rept. Rcvd 237 Times in 127 Posts
Thanks Given: 340
Thanks Rcvd at 652 Times in 357 Posts
sendersu Reputation: 200-299 sendersu Reputation: 200-299 sendersu Reputation: 200-299
@HarrySpoofer
thanks for nice piece of work!

If you don't mind I"d provide some small feedback:

1) I'd do case insensitive comparison inside the GetProcessIdByName() routine
-> if (pe.szExeFile == processName)

2) compiler is unhappy on setting signed int to unsided dword;
warning C4245: 'initializing': conversion from 'int' to 'DWORD', signed/unsigned mismatch

do you know if Windows has got some define for wrong pid values?
eg smth like INVALID_HANDLE_VALUE

3) be honest, did you leave an Easter Egg in one routine?

kudos!
Reply With Quote
The Following User Gave Reputation+1 to sendersu For This Useful Post:
niculaita (10-11-2024)
The Following 2 Users Say Thank You to sendersu For This Useful Post:
niculaita (10-11-2024), ontryit (12-19-2024)