Use the Unicode string functions from wine/unicode.h instead of the
crtdll ones.

diff --git a/dlls/comctl32/comctl32undoc.c b/dlls/comctl32/comctl32undoc.c
index d091d7b..5850435 100644
--- a/dlls/comctl32/comctl32undoc.c
+++ b/dlls/comctl32/comctl32undoc.c
@@ -20,12 +20,12 @@
 
 #include "winbase.h"
 #include "winerror.h"
+#include "wine/unicode.h"
 #include "objbase.h"
 #include "commctrl.h"
-#include "crtdll.h"
 #include "debugtools.h"
 
-DEFAULT_DEBUG_CHANNEL(commctrl)
+DEFAULT_DEBUG_CHANNEL(commctrl);
 
 
 extern HANDLE COMCTL32_hHeap; /* handle to the private heap */
@@ -2128,7 +2128,7 @@
  *
  */
 LPWSTR WINAPI COMCTL32_StrChrW( LPCWSTR lpStart, WORD wMatch) {
-  return CRTDLL_wcschr(lpStart, wMatch);
+  return strchrW(lpStart, wMatch);
 }
 
 /**************************************************************************
@@ -2152,7 +2152,7 @@
  *
  */
 INT WINAPI COMCTL32_StrCmpNW( LPCWSTR lpStr1, LPCWSTR lpStr2, int nChar) {
-  return CRTDLL_wcsncmp(lpStr1, lpStr2, nChar);
+  return strncmpW(lpStr1, lpStr2, nChar);
 }
 
 /**************************************************************************
@@ -2193,7 +2193,7 @@
  *
  */
 LPWSTR WINAPI COMCTL32_StrStrW( LPCWSTR lpFirst, LPCWSTR lpSrch) {
-  return CRTDLL_wcsstr(lpFirst, lpSrch);
+  return strstrW(lpFirst, lpSrch);
 }
 
 /**************************************************************************
@@ -2209,7 +2209,7 @@
 /* while(*lpLoop) { if lpLoop++; } */
 
   for(; (*lpLoop != 0); lpLoop++)
-    if( CRTDLL_wcschr(lpSet, *(WORD*)lpLoop))
+    if( strchrW(lpSet, *(WORD*)lpLoop))
       return (INT)(lpLoop-lpStr);
   
   return (INT)(lpLoop-lpStr);
diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c
index 8fae402..91d6f9a 100644
--- a/dlls/ntdll/reg.c
+++ b/dlls/ntdll/reg.c
@@ -11,10 +11,10 @@
 #include "debugtools.h"
 #include "winreg.h"
 #include "winerror.h"
+#include "wine/unicode.h"
 #include "file.h"
 #include "server.h"
 #include "ntddk.h"
-#include "crtdll.h"
 #include "ntdll_misc.h"
 
 DEFAULT_DEBUG_CHANNEL(ntdll);
@@ -64,19 +64,19 @@
 	  *KeyHandle = ObjectAttributes->RootDirectory;
 	}
 	else if((ObjectName->Length > (len=lstrlenW(KeyPath_HKLM)))
-	&& (0==CRTDLL__wcsnicmp(ObjectName->Buffer,KeyPath_HKLM,len)))
+	&& (0==strncmpiW(ObjectName->Buffer,KeyPath_HKLM,len)))
 	{  *KeyHandle = HKEY_LOCAL_MACHINE;
 	}
 	else if((ObjectName->Length > (len=lstrlenW(KeyPath_HKU)))
-	&& (0==CRTDLL__wcsnicmp(ObjectName->Buffer,KeyPath_HKU,len)))
+	&& (0==strncmpiW(ObjectName->Buffer,KeyPath_HKU,len)))
 	{  *KeyHandle = HKEY_USERS;
 	}
 	else if((ObjectName->Length > (len=lstrlenW(KeyPath_HCR)))
-	&& (0==CRTDLL__wcsnicmp(ObjectName->Buffer,KeyPath_HCR,len)))
+	&& (0==strncmpiW(ObjectName->Buffer,KeyPath_HCR,len)))
 	{  *KeyHandle = HKEY_CLASSES_ROOT;
 	}
 	else if((ObjectName->Length > (len=lstrlenW(KeyPath_HCC)))
-	&& (0==CRTDLL__wcsnicmp(ObjectName->Buffer,KeyPath_HCC,len)))
+	&& (0==strncmpiW(ObjectName->Buffer,KeyPath_HCC,len)))
 	{  *KeyHandle = HKEY_CURRENT_CONFIG;
 	}
 	else
diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c
index 7fbf4e0..2c6f541 100644
--- a/dlls/ole32/datacache.c
+++ b/dlls/ole32/datacache.c
@@ -38,6 +38,7 @@
 #include "crtdll.h"
 #include "wine/obj_oleview.h"
 #include "wine/obj_cache.h"
+#include "wine/unicode.h"
 #include "ole2.h"
 #include "debugtools.h"
 
@@ -680,8 +681,8 @@
 
     return (elem->type == STGTY_STREAM)
 	&& (elem->cbSize.s.LowPart >= sizeof(PresentationDataHeader))
-	&& (CRTDLL_wcslen(name) == 11)
-	&& (CRTDLL_wcsncmp(name, OlePres, 8) == 0)
+	&& (strlenW(name) == 11)
+	&& (strncmpW(name, OlePres, 8) == 0)
 	&& CRTDLL_iswdigit(name[8])
 	&& CRTDLL_iswdigit(name[9])
 	&& CRTDLL_iswdigit(name[10]);
diff --git a/dlls/ole32/ole2nls.c b/dlls/ole32/ole2nls.c
index d072122..1a98a15 100644
--- a/dlls/ole32/ole2nls.c
+++ b/dlls/ole32/ole2nls.c
@@ -20,7 +20,6 @@
 #include "winreg.h"
 #include "winerror.h"
 #include "debugtools.h"
-#include "crtdll.h"
 #include "main.h"
 
 DEFAULT_DEBUG_CHANNEL(ole);
diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c
index 6373a8c..59f17e6 100644
--- a/dlls/shell32/shellord.c
+++ b/dlls/shell32/shellord.c
@@ -13,7 +13,6 @@
 #include "winnls.h"
 #include "winversion.h"
 #include "heap.h"
-#include "crtdll.h"
 
 #include "shellapi.h"
 #include "shlobj.h"
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index a3e01a1..114dab9 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -10,16 +10,16 @@
 #include "winnls.h"
 #include "winversion.h"
 #include "winreg.h"
-#include "crtdll.h"
 
 #include "shlobj.h"
 #include "shell32_main.h"
 #include "windef.h"
 #include "options.h"
 #include "wine/undocshell.h"
+#include "wine/unicode.h"
 #include "shlwapi.h"
 
-DEFAULT_DEBUG_CHANNEL(shell)
+DEFAULT_DEBUG_CHANNEL(shell);
 
 /*
 	Combining and Constructing paths
@@ -128,28 +128,28 @@
 	
 	if (!lpszFile || !lpszFile[0] || (lpszFile[0]==(WCHAR)'.' && !lpszFile[1]) ) 
 	{
-	  CRTDLL_wcscpy(szDest,lpszDir);
+          strcpyW(szDest,lpszDir);
 	  return szDest;
 	}
 
 	/*  if lpszFile is a complete path don't care about lpszDir */
 	if (PathGetDriveNumberW(lpszFile) != -1)
 	{
-	  CRTDLL_wcscpy(szDest,lpszFile);
+            strcpyW(szDest,lpszFile);
 	}
 	else if (lpszFile[0] == (WCHAR)'\\' )
 	{
-	  CRTDLL_wcscpy(sTemp,lpszDir);
+	  strcpyW(sTemp,lpszDir);
 	  PathStripToRootW(sTemp);
-	  CRTDLL_wcscat(sTemp,lpszFile);
-	  CRTDLL_wcscpy(szDest,sTemp);
+	  strcatW(sTemp,lpszFile);
+	  strcpyW(szDest,sTemp);
 	}
 	else
 	{
-	  CRTDLL_wcscpy(sTemp,lpszDir);
+	  strcpyW(sTemp,lpszDir);
 	  PathAddBackslashW(sTemp);
-	  CRTDLL_wcscat(sTemp,lpszFile);
-	  CRTDLL_wcscpy(szDest,sTemp);
+	  strcatW(sTemp,lpszFile);
+	  strcpyW(szDest,sTemp);
 	}
 	return szDest;
 }
@@ -196,7 +196,7 @@
 	int len;
 	TRACE("%p->%s\n",lpszPath,debugstr_w(lpszPath));
 
-	len = CRTDLL_wcslen(lpszPath);
+	len = strlenW(lpszPath);
 	if (len && lpszPath[len-1]!=(WCHAR)'\\') 
 	{
 	  lpszPath[len]  = (WCHAR)'\\';
@@ -468,12 +468,12 @@
  */
 int WINAPI PathGetDriveNumberW(LPCWSTR lpszPath)
 {
-	int chr = CRTDLL_towlower(lpszPath[0]);
+	int chr = tolowerW(lpszPath[0]);
 	
 	TRACE ("%s\n",debugstr_w(lpszPath));
 
 	if (!lpszPath || lpszPath[1]!=':' || chr < 'a' || chr > 'z') return -1;
-	return tolower(lpszPath[0]) - 'a' ;
+	return tolowerW(lpszPath[0]) - 'a' ;
 }
 
 /*************************************************************************
@@ -854,10 +854,10 @@
 
 	while (*x==' ') x++;
 	if (x!=str)
-	  CRTDLL_wcscpy(str,x);
+	  strcpyW(str,x);
 	if (!*str)
 	  return str;
-	x=str+CRTDLL_wcslen(str)-1;
+	x=str+strlenW(str)-1;
 	while (*x==' ')
 	  x--;
 	if (*x==' ')
@@ -931,7 +931,7 @@
  */
 VOID WINAPI PathUnquoteSpacesW(LPWSTR str) 
 {
-	DWORD len = CRTDLL_wcslen(str);
+	DWORD len = strlenW(str);
 
 	TRACE("%s\n",debugstr_w(str));
 
@@ -940,7 +940,7 @@
 	if (str[len-1]!='"')
 	  return;
 	str[len-1]='\0';
-	CRTDLL_wcscpy(str,str+1);
+	strcpyW(str,str+1);
 	return;
 }
 
@@ -977,7 +977,7 @@
  */
 int WINAPI PathParseIconLocationW(LPWSTR lpszPath)
 {
-	LPWSTR lpstrComma = CRTDLL_wcschr(lpszPath, ',');
+	LPWSTR lpstrComma = strchrW(lpszPath, ',');
 	
 	FIXME("%s stub\n", debugstr_w(lpszPath));
 
@@ -1170,7 +1170,7 @@
 	TRACE("path=%s\n",debugstr_w(lpszPath));
 
 	for(i=0; lpszExtensions[i]; i++)
-	  if (!CRTDLL__wcsicmp(lpszExtension,lpszExtensions[i])) return TRUE;
+	  if (!strcmpiW(lpszExtension,lpszExtensions[i])) return TRUE;
 	  
 	return FALSE;
 }
@@ -1313,7 +1313,7 @@
 	    } while (*name++);
 	    return 0;
 	  }
-	  if (CRTDLL_towupper(*mask)!=CRTDLL_towupper(*name) && *mask!='?') return 0;
+	  if (toupperW(*mask)!=toupperW(*name) && *mask!='?') return 0;
 	  name++;
 	  mask++;
 	}
@@ -1428,7 +1428,7 @@
 	if (PathIsRelativeW(lpszPath1) || PathIsRelativeW(lpszPath2)) return FALSE;
 
 	/* usual path */
-	if ( CRTDLL_towupper(lpszPath1[0])==CRTDLL_towupper(lpszPath2[0]) &&
+	if ( toupperW(lpszPath1[0])==toupperW(lpszPath2[0]) &&
 	     lpszPath1[1]==':' && lpszPath2[1]==':' &&
 	     lpszPath1[2]=='\\' && lpszPath2[2]=='\\')
 	  return TRUE;
@@ -1503,14 +1503,14 @@
 	if(!lpstrPath) return FALSE;
 
 	/* get protocol        */
-	lpstrRes = CRTDLL_wcschr(lpstrPath,':');
+	lpstrRes = strchrW(lpstrPath,':');
 	if(!lpstrRes) return FALSE;
 	iSize = lpstrRes - lpstrPath;
 
 	while(SupportedProtocol[i])
 	{
-	  if (iSize == CRTDLL_wcslen(SupportedProtocol[i]))
-	    if(!CRTDLL__wcsnicmp(lpstrPath, SupportedProtocol[i], iSize));
+	  if (iSize == strlenW(SupportedProtocol[i]))
+	    if(!strncmpiW(lpstrPath, SupportedProtocol[i], iSize));
 	      return TRUE;
 	  i++;
 	}
diff --git a/dlls/shell32/shellreg.c b/dlls/shell32/shellreg.c
index 9ca6f8d..450f038 100644
--- a/dlls/shell32/shellreg.c
+++ b/dlls/shell32/shellreg.c
@@ -9,7 +9,6 @@
 #include "winnls.h"
 #include "winversion.h"
 #include "heap.h"
-#include "crtdll.h"
 
 #include "shellapi.h"
 #include "shlobj.h"
diff --git a/dlls/shell32/shellstring.c b/dlls/shell32/shellstring.c
index b67f5b2..746c93c 100644
--- a/dlls/shell32/shellstring.c
+++ b/dlls/shell32/shellstring.c
@@ -7,11 +7,11 @@
 #include "winerror.h"
 #include "debugtools.h"
 #include "winversion.h"
-#include "crtdll.h"
 #include "heap.h"
 
 #include "shellapi.h"
 #include "wine/undocshell.h"
+#include "wine/unicode.h"
 
 DEFAULT_DEBUG_CHANNEL(shell);
 
@@ -137,7 +137,7 @@
 LPWSTR WINAPI StrChrW (LPWSTR str, WCHAR x )
 {
 	TRACE("%s 0x%04x\n",debugstr_w(str),x);
-	return CRTDLL_wcschr(str, x);
+	return strchrW(str, x);
 }
 
 /*************************************************************************
@@ -155,7 +155,7 @@
 INT WINAPI StrCmpNW ( LPCWSTR wstr1, LPCWSTR wstr2, INT len)
 {
 	TRACE("%s %s %i stub\n", debugstr_w(wstr1),debugstr_w(wstr2),len);
-	return CRTDLL_wcsncmp(wstr1, wstr2, len);
+	return strncmpW(wstr1, wstr2, len);
 }
 
 /*************************************************************************
@@ -173,7 +173,7 @@
 int WINAPI StrCmpNIW ( LPCWSTR wstr1, LPCWSTR wstr2, int len)
 {
 	TRACE("%s %s %i stub\n", debugstr_w(wstr1),debugstr_w(wstr2),len);
-	return CRTDLL__wcsnicmp(wstr1, wstr2, len);
+	return strncmpiW(wstr1, wstr2, len);
 }
 
 /*************************************************************************
@@ -229,7 +229,7 @@
     while (*lpFirst)
     {
         LPCWSTR p1 = lpFirst, p2 = lpSrch;
-        while (*p1 && *p2 && CRTDLL_towupper(*p1) == CRTDLL_towupper(*p2)) { p1++; p2++; }
+        while (*p1 && *p2 && toupperW(*p1) == toupperW(*p2)) { p1++; p2++; }
         if (!*p2) return (LPWSTR)lpFirst;
         lpFirst++;
     }
diff --git a/dlls/version/info.c b/dlls/version/info.c
index 6f68156..5b2cfb4 100644
--- a/dlls/version/info.c
+++ b/dlls/version/info.c
@@ -12,9 +12,9 @@
 #include "winreg.h"
 #include "winver.h"
 #include "wine/winestring.h"
+#include "wine/unicode.h"
 #include "winerror.h"
 #include "heap.h"
-#include "crtdll.h"
 #include "debugtools.h"
 
 DEFAULT_DEBUG_CHANNEL(ver)
@@ -404,7 +404,7 @@
 
     while ( (DWORD)child < (DWORD)info + info->wLength )
     {
-        if ( !CRTDLL__wcsnicmp( child->szKey, szKey, cbKey ) )
+        if ( !strncmpiW( child->szKey, szKey, cbKey ) )
             return child;
 
         child = VersionInfo32_Next( child );
diff --git a/loader/pe_resource.c b/loader/pe_resource.c
index 4379d33..29f13c6 100644
--- a/loader/pe_resource.c
+++ b/loader/pe_resource.c
@@ -13,6 +13,7 @@
 #include <stdlib.h>
 #include <sys/types.h>
 #include "wine/winestring.h"
+#include "wine/unicode.h"
 #include "windef.h"
 #include "winnls.h"
 #include "pe_image.h"
@@ -22,7 +23,6 @@
 #include "process.h"
 #include "stackframe.h"
 #include "neexe.h"
-#include "crtdll.h"
 #include "debugtools.h"
 
 /**********************************************************************
@@ -72,7 +72,7 @@
 			entryTable[entrynum].u1.s.NameOffset);
 		if(namelen != str->Length)
 			continue;
-		if(CRTDLL__wcsnicmp(name,str->NameString,str->Length)==0)
+		if(strncmpiW(name,str->NameString,str->Length)==0)
 			return (PIMAGE_RESOURCE_DIRECTORY) (
 				root +
 				entryTable[entrynum].u2.s.OffsetToDirectory);
diff --git a/ole/ole2nls.c b/ole/ole2nls.c
index 2f17ea1..bc65ddf 100644
--- a/ole/ole2nls.c
+++ b/ole/ole2nls.c
@@ -14,6 +14,7 @@
 #include "windef.h"
 #include "wingdi.h"
 #include "winuser.h"
+#include "wine/unicode.h"
 #include "heap.h"
 #include "options.h"
 #include "winver.h"
@@ -21,7 +22,6 @@
 #include "winreg.h"
 #include "winerror.h"
 #include "debugtools.h"
-#include "crtdll.h"
 #include "main.h"
 
 DEFAULT_DEBUG_CHANNEL(ole);
@@ -2939,8 +2939,7 @@
 	l1 = (l1==-1)?lstrlenW(s1):l1;
 	l2 = (l2==-1)?lstrlenW(s2):l2;
 	len = l1<l2 ? l1:l2;
-	ret = (fdwStyle & NORM_IGNORECASE) ?
-		CRTDLL__wcsnicmp(s1,s2,len) : CRTDLL_wcsncmp(s1,s2,len);
+	ret = (fdwStyle & NORM_IGNORECASE) ? strncmpiW(s1,s2,len) : strncmpW(s1,s2,len);
 	/* not equal, return 1 or 3 */
 	if(ret!=0) return ret+2;
 	/* same len, return 2 */