Windows 7 Ui Integration
#21
Posted 29 October 2009 - 09:34 AM
#22
Posted 29 October 2009 - 01:40 PM
tHeWiZaRdOfDoS, on 29 October 2009 - 11:34 AM, said:
I know of the CPartFile enumerations, but I wasn't aware of the SetStatus() function.
I belive these events would be a good match, but I could take a second opinion to heart.
CPartFile Windows 7
========= =========
PS_ERROR TBPF_ERROR
PS_INSUFFICIENT TBPF_ERROR
PS_COMPLETING Show Progress
PS_COMPLETE TBPF_INDETERMINATE <--- Shows just a looped animation of the progress action taking place, used primarily as a way to show that the progress bar will show and calculates in the background how much work will need to be done.
#23
Posted 31 October 2009 - 01:58 AM
1) Could use function overloading to pass the HWND function to use, but their are several occurrences of the function so it's a maze.
2) And their is no way to pass on information to tell the function to recognize it's running on Windows 7.
3) Not a problem, but can ruin the Windows 7 experience the Tray Design.
#24
Posted 31 October 2009 - 07:07 AM
1) What function do you want to pass the HWND to?
2) You can write your own detection, in otherfunctions.cpp is a detection scheme for XP/Vista/etc. and you could enhance that to detect 7
3) ???
#25
Posted 31 October 2009 - 09:37 AM
tHeWiZaRdOfDoS, on 31 October 2009 - 09:07 AM, said:
1) What function do you want to pass the HWND to?
2) You can write your own detection, in otherfunctions.cpp is a detection scheme for XP/Vista/etc. and you could enhance that to detect 7
3) ???
I know! :S
1) The handle for the main window has to be passed in the Taskbar function. DrawStatusBar has the 2 error states which should trigger the Windows 7 Taskbar UI notifications (1 PS_COMPLETE || status == PS_COMPLETING, 2 eVirtualState == PS_INSUFFICIENT || status == PS_ERROR).
2) While using the Shell Version Detection in Emule.cpp, I can detect Windows 7 running. But the problem is I don't know how to tell the smaller functions.
3) I fear that the eMule minimize in tray by design might cause problems with the Windows 7 UI.
#26
Posted 31 October 2009 - 11:21 AM
2) Well, here's a snippet how to modify the existing functions:
Otherfunctions.h:
Quote
#define _WINVER_NT4_ 0x0401 // 4.1 (baked version)
#define _WINVER_98_ 0x040A // 4.10
#define _WINVER_ME_ 0x045A // 4.90
#define _WINVER_2K_ 0x0500 // 5.0
#define _WINVER_XP_ 0x0501 // 5.1
#define _WINVER_2003_ 0x0502 // 5.2
#define _WINVER_VISTA_ 0x0600 // 6.0
#define _WINVER_WIN7_ 0x0610 // 6.1
Otherfunctions.cpp:
Quote
{
OSVERSIONINFOEX osvi;
ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
if (!GetVersionEx((OSVERSIONINFO*)&osvi))
{
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
if (!GetVersionEx((OSVERSIONINFO*)&osvi))
return FALSE;
}
switch (osvi.dwPlatformId)
{
case VER_PLATFORM_WIN32_NT:
if (osvi.dwMajorVersion <= 4)
return _WINVER_NT4_;
if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0)
return _WINVER_2K_;
if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1)
return _WINVER_XP_;
if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2)
return _WINVER_2003_;
if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0)
return _WINVER_VISTA_;
if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 1)
return _WINVER_WIN7_;
return _WINVER_VISTA_; // never return Win95 if we get the info about a NT system
case VER_PLATFORM_WIN32_WINDOWS:
if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0)
return _WINVER_95_;
if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 10)
return _WINVER_98_;
if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 90)
return _WINVER_ME_;
break;
}
return _WINVER_95_; // there should'nt be anything lower than this
}
After these changes you can use thePrefs.GetWindowsVersion() == _WINVER_WIN7_ to check for Win7.
Please note, however, that you have to adapt all occurences of _WINVER_VISTA_, too or eMule might not work correct, anymore.
3) maybe, but I'd simply try it out
#27
Posted 02 December 2009 - 04:53 PM
#28
Posted 15 January 2010 - 05:35 PM

Progress and up/down-load indicator in a test build of the NetF WARP mod.
/netfinity
- Compiled for 32 and 64 bit Windows versions
- Optimized for fast (100Mbit/s) Internet connections
- Faster file completion via Dynamic Block Requests and dropping of stalling sources
- Faster searching via KAD with equal or reduced overhead
- Less GUI lockups through multi-threaded disk IO operations
- VIP "Payback" queue
- Fakealyzer (helps you chosing the right files)
- Quality Of Service to keep eMule from disturbing VoIP and other important applications (Vista/7/8 only!)
#29
Posted 16 January 2010 - 12:46 PM
#30
Posted 16 January 2010 - 01:54 PM
Enig123, on 16 January 2010 - 01:46 PM, said:
- Compiled for 32 and 64 bit Windows versions
- Optimized for fast (100Mbit/s) Internet connections
- Faster file completion via Dynamic Block Requests and dropping of stalling sources
- Faster searching via KAD with equal or reduced overhead
- Less GUI lockups through multi-threaded disk IO operations
- VIP "Payback" queue
- Fakealyzer (helps you chosing the right files)
- Quality Of Service to keep eMule from disturbing VoIP and other important applications (Vista/7/8 only!)
#31
Posted 16 January 2010 - 05:26 PM
#32
Posted 16 January 2010 - 05:50 PM
The Win7 UI work looks good although I'd be more interested in the 64Bit, crumbs, disk IO optimization features to reach maturity
Seven for the Dwarf-lords in their halls of stone,
Nine for Mortal Men doomed to die,
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them
In the Land of Mordor where the Shadows lie.
Dark Lord of the Forum
Morph your Mule
Need a little help with your MorphXT? Click here
#33
Posted 16 January 2010 - 09:08 PM
tHeWiZaRdOfDoS, on 16 January 2010 - 06:26 PM, said:
To get it work you have to compile with the Windows 7 SDK, which requires a few code lines to change. Most of the problems compiling with VS 2008 is actually due to the Windows Vista SDK (ofcourse using the Windows 7 SDK doesn't make it better) and that it doesn't support Windows 2000 as a target, which is set in the stdafx.h. Compiling for VS 2010 requires some more work as changing some NULL macros to nullptr in the cryptolib and find an alternative to the qedit.h header.
Andu, on 16 January 2010 - 06:50 PM, said:
This is easy! Just set the compiler to 64bit mode and fix all warnings. (there are only a couple of thousand warnings so that is quickly done) Maybe there was something more but essentially that was what I did. With some proper rewrite of the crypto code the 64bit build can be be as much as twice as fast under load.
Crumbs:
This one is a bit more complicated. The sharing and downloading of incomplete parts is quite easy, but the asynchronus hashing takes a little bit more time to do.
Disk IO optimizations:
This is esentially fixes to try to align all download requests to 4kB boundaries and setting file cache mode to random access. Hopefully I can find a way to disable snapshotting for part files, so that they don't use up valuable snapshot/backup space and save IO overhead synching with the snapshot.
- Compiled for 32 and 64 bit Windows versions
- Optimized for fast (100Mbit/s) Internet connections
- Faster file completion via Dynamic Block Requests and dropping of stalling sources
- Faster searching via KAD with equal or reduced overhead
- Less GUI lockups through multi-threaded disk IO operations
- VIP "Payback" queue
- Fakealyzer (helps you chosing the right files)
- Quality Of Service to keep eMule from disturbing VoIP and other important applications (Vista/7/8 only!)
#34
Posted 16 January 2010 - 09:36 PM
netfinity, on 16 January 2010 - 09:08 PM, said:
Just to avoid creating new myths: This applies to the crypto lib code only (and 100% is probably a bit to optimistic), which however is not used for any time consuming operation in eMule (obfuscation is not using crptolib). On this topic, it would be however intresting if zlib could be speed up significantly, which might be possible (dont know). Hashing seems unlikely to be able to profit too much since MD4 is using 32bit values.
Quote
A bit OT, but i think those problems will solve themself in a few years with the success of SSDs. Selfsolving problems are the best anyway
#35
Posted 16 January 2010 - 10:27 PM
Seven for the Dwarf-lords in their halls of stone,
Nine for Mortal Men doomed to die,
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them
In the Land of Mordor where the Shadows lie.
Dark Lord of the Forum
Morph your Mule
Need a little help with your MorphXT? Click here
#36
Posted 16 January 2010 - 10:34 PM
Andu, on 16 January 2010 - 10:27 PM, said:
Yes, but that doesn't needs any optimizing, eMule writes data to the disk only once, except if a part war corrupted of course.
#37
Posted 16 January 2010 - 10:42 PM
Some Support, on 16 January 2010 - 10:36 PM, said:
netfinity, on 16 January 2010 - 09:08 PM, said:
Some Support, on 16 January 2010 - 10:36 PM, said:
Quote
However the discussion topic was actually about this;
- Compiled for 32 and 64 bit Windows versions
- Optimized for fast (100Mbit/s) Internet connections
- Faster file completion via Dynamic Block Requests and dropping of stalling sources
- Faster searching via KAD with equal or reduced overhead
- Less GUI lockups through multi-threaded disk IO operations
- VIP "Payback" queue
- Fakealyzer (helps you chosing the right files)
- Quality Of Service to keep eMule from disturbing VoIP and other important applications (Vista/7/8 only!)
#38
Posted 16 January 2010 - 11:07 PM
netfinity, on 16 January 2010 - 10:42 PM, said:
I must admit i'm not that familiar with the differences on processor architectures, so you might be right. But im skeptical - while the new registers offer a advantages, all adressing operations get more time and space consuming. But if anyone is bored enough to do a real benchmark with eMule (ideally with a 32bit OS vs. 64bit) under load or for simplicity filehashing time, that would be certainly intresting. Right now, having one lean version which runs on all systems just seems like a pretty big advantage (not to talk about the coding work).
Quote
Indeed, and once you are finished im quite eager to look at it
#39
Posted 17 January 2010 - 05:04 AM
I've test the time consuming of md4, sha and md5 among crypto++ 5.6.0, emule's asm and shareaza's x64 version 6 months ago.
I created a test app to hash 150MB data. To make it simple, the data is filled with a specific char like 0.
The result is (all the tests were on 64bit system)
asm crypto++(32bit) crypto++(64bit) shareaza(64bit) md4 359ms 328ms 343ms 343ms sha 765ms 796ms 609ms 828ms emule crypto++(32bit) crypto++(64bit) emule(64bit) md5 609ms 484ms 500ms 609ms
As the table show 64bit crypto++ is a bit faster than the original.
Another IPFilter time consuming result(Load 17MB)
32bit(SSE2): 563ms 64bit: 478ms
I've changed IPFilter code to make it load faster under VS2008. It won't change that trend in my opinion.
btw, although VS2008 SDK doesn't support Windows 2000 as a target, the exe compiled with VS2008 still can run on Windows 2000.
This post has been edited by dolphinX: 17 January 2010 - 05:09 AM
#40
Posted 27 January 2010 - 03:44 PM
My Windows 7 machine was all acting up, finally got a new machine and got my own Windows 7 copy!
I'm trying to compile this time with Visual Studio 2010, and I agree with netfinity it's more logic.










Sign In
Register




