--- antiLeech.cpp.win	2016-02-15 19:31:18.748711749 +0800
+++ antiLeech.cpp	2016-02-15 20:49:25.691484626 +0800
@@ -17,8 +17,11 @@
 //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 
-#include <atlstr.h>
+#include "CString_wx.h"
 #include "antiLeech.h"
+#define __declspec(var)        CantiLeech::
+#define SPECIAL_DLP_VERSION
+#define ALL_VERYCD_MOD
 
 #ifdef _DEBUG
 #define new DEBUG_NEW
@@ -51,7 +54,10 @@ LPCTSTR apszSnafuTag[]=
 		//,_T("[eChanblardNext]")								//21 zz_fly
 };
 
+const DWORD CantiLeech::DLPVersion = 4405;
 
+//deactivate M$WIN-specific codes
+#if 0
 BOOL WINAPI  DllMain (
 					  HANDLE    hModule,
 					  DWORD     dwFunction,
@@ -74,6 +80,7 @@ void __declspec(dllexport)  TestFunc()
 {
 	::MessageBox(NULL,_T("Inside the DLL!"),_T("Nix"),0);
 }
+#endif
 
 //old versions just to keep compatible
 /* //drop old version support
@@ -285,7 +292,7 @@ LPCTSTR __declspec(dllexport) DLPCheckNa
 */
 //end old version ------------------------------------------
 
-bool IsTypicalHex(CString& addon)
+bool CantiLeech::IsTypicalHex(const CString& addon)
 {
 	if(addon.GetLength()>25 || addon.GetLength()<5)
 		return false;
@@ -1244,7 +1251,7 @@ LPCTSTR __declspec(dllexport) DLPCheckUs
 	return NULL;
 }
 
-LPCTSTR __declspec(dllexport) DLPCheckNameAndHashAndMod(CString username, CString& userhash, CString& modversion)
+LPCTSTR __declspec(dllexport) DLPCheckNameAndHashAndMod(const CString& username, const CString& userhash, const CString& modversion)
 {
 	if(username.IsEmpty() || userhash.IsEmpty())
 		return NULL;
@@ -1309,7 +1316,7 @@ LPCTSTR __declspec(dllexport) DLPCheckNa
 
 	//Check for aedit
 	//remark: a unmodded emule can't send a space at last sign
-	if(modversion.IsEmpty() && username.Right(1)==32)
+	if(modversion.IsEmpty() && username.Right(1)==_T(" "))
 		return _T("AEdit");
 
 	//Check for Hex-Modstring
