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 » 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 Go to previous message
BioBytes is currently offline  BioBytes
Messages: 285
Registered: October 2008
Location: France
Experienced 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. Confused

Have a happy coding Very Happy

Regards

Biobytes
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: linker problem
Next Topic: [BUG] MscBuilder crashes the IDE when building all shared.
Goto Forum:
  


Current Time: Thu Jul 09 17:06:14 CEST 2020

Total time taken to generate the page: 0.01614 seconds