Home » Developing U++ » UppHub » SysInfo - linking fail
Re: SysInfo [message #49092 is a reply to message #49091] |
Sat, 16 December 2017 23:11   |
 |
Klugier
Messages: 1106 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello,
Just small code review of your fix dear Koldo 
DWORD /*dwThreadId, */dwProcessId; // This is bad habit to keep commented code in your sources. The commented variable should be removed.
// Just keep
DWORD dwProcessId;
// The same thing here...
/* dwThreadId = */GetWindowThreadProcessId(reinterpret_cast<HWND>(hWnd[i]), &dwProcessId);
// Stay with:
GetWindowThreadProcessId(reinterpret_cast<HWND>(hWnd[i]), &dwProcessId);
// -----------------------------------------------
DWORD state = ::WaitForSingleObject(hProc, timeout);
// Why not auto? You will do not need to remember the type returning by WaitForSIngleObject...
auto state = ::WaitForSingleObject(hProc, timeout);
// -----------------------------------------------
if ((state == WAIT_TIMEOUT) || (state == WAIT_FAILED))
ret = ::TerminateProcess(hProc, 0); // You have space indentation instead of tabs...
// -----------------------------------------------
//bool hdSerialMatch = false; // The same problem with commented code - not used remove it.
Sincerely,
Klugier
U++ - one framework to rule them all.
[Updated on: Sat, 16 December 2017 23:13] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon Aug 25 13:27:32 CEST 2025
Total time taken to generate the page: 0.07492 seconds
|