Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Changes in SysInfo Bazaar package (svn 6019)
Changes in SysInfo Bazaar package (svn 6019) [message #39812] |
Thu, 02 May 2013 20:48 |
|
BioBytes
Messages: 307 Registered: October 2008 Location: France
|
Senior Member |
|
|
Hi all,
I have noticed that the following code lines have been modified in SysInfo (Bazaar package) in svn 6019 when compared with svn 6009.
Upp svn 6009
long GetWindowIdFromCaption(String windowCaption, bool exactMatch)
{
Array<long> wid, pid;
Array<String> name, fileName, caption;
GetWindowsList(wid, pid, name, fileName, caption);
for (int i = 0; i < wid.GetCount(); ++i) {
if (exactMatch) {
if (caption[i] == windowCaption)
return wid[i];
} else {
if (caption[i].Find(windowCaption) >= 0)
return wid[i];
}
}
return -1;
}
Upp svn 6019
uint64 GetWindowIdFromCaption(String windowCaption, bool exactMatch)
{
Array<uint64> wid, pid;
Array<String> name, fileName, caption;
GetWindowsList(wid, pid, name, fileName, caption);
for (int i = 0; i < wid.GetCount(); ++i) {
if (exactMatch) {
if (caption[i] == windowCaption)
return wid[i];
} else {
if (caption[i].Find(windowCaption) >= 0)
return wid[i];
}
}
return INT64_MAX;
}
I understand that GetwindowIdFromCaption function should now return a 64 bits integer to consider 64bits platform but I am surprised that the negative result when a single instance is running has been replaced with the INT64_MAX value.
Is there a specific reason for that change?
This is not a real problem but it requires that part of code has to be written in some applications.
Have a happy coding
Regards
Biobytes
|
|
|
Goto Forum:
Current Time: Thu Mar 28 09:38:34 CET 2024
Total time taken to generate the page: 0.01620 seconds
|