Current time: 11-14-2019, 02:48 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A little bug about the windows version in the log file of urlBlast.exe
06-08-2011, 05:41 PM
Post: #1
A little bug about the windows version in the log file of urlBlast.exe
I found a little bug in the log file of urlBlast.exe. It's about the information of windows version.
The windows I'm using is Windows 7. But in the log file of urlBlast.exe, windows version was shown as "Windows Vista". Obviously, it's wrong.
I found the bug is in the file urlBlast/log.cpp.
The content of the current file from Line 233 to Line 254 is as blow,
switch( info.dwMajorVersion )
{
case 4: val += _T(" NT"); break;
case 5:
{
switch( info.dwMinorVersion )
{
case 0: val += _T(" 2000"); break;
case 1: val += _T(" XP"); break;
case 2: val += _T(" Server 2003"); break;
}
}
break;

case 6:
{
if( info.wProductType == VER_NT_WORKSTATION )
val += _T(" Vista");
else
val += _T(" Server 2008");
}
}
It should be updated as blow,
switch( info.dwMajorVersion )
{
case 4: val += _T(" NT"); break;
case 5:
{
switch( info.dwMinorVersion )
{
case 0: val += _T(" 2000"); break;
case 1: val += _T(" XP"); break;
case 2: val += (GetSystemMetrics(SM_SERVERR2) == 0 ? _T(" Server 2003") : _T(" Server 2003 R2")); break;
}
}
break;

case 6:
{
switch ( info.dwMinorVersion )
{
case 0: val += (info.wProductType == VER_NT_WORKSTATION ? _T(" Vista") : _T(" Server 2008")); break;
case 1: val += (info.wProductType == VER_NT_WORKSTATION ? _T(" 7") : _T(" Server 2008 R2")); break;
}

}
}
The red part is what I updated.
I referred to the web page http://msdn.microsoft.com/en-us/library/....85).aspx.
I've tested it. It works.
Also, I think that the file wptdriver/log.cc should be updated accordingly.

By the way, this bug is not a big deal. But I found it, so I think I'd better let you know it. :-)
Thanks.
Find all posts by this user
Quote this message in a reply
06-08-2011, 10:43 PM
Post: #2
RE: A little bug about the windows version in the log file of urlBlast.exe
Thanks, needless to say, that code was last updated before Windows 7 :-) I just updated it and added 2008 R2 as well while I was in there.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)