Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » SysInfo - linking fail
Re: SysInfo [message #49092 is a reply to message #49091] Sat, 16 December 2017 23:11 Go to previous messageGo to previous message
Klugier is currently offline  Klugier
Messages: 1106
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

Just small code review of your fix dear Koldo Smile


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

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: firebird error message
Next Topic: ChromiumBrowserExample compilation error due to lack of "cef_atomicops_x86_gcc.h"
Goto Forum:
  


Current Time: Mon Aug 25 13:27:32 CEST 2025

Total time taken to generate the page: 0.07492 seconds