New stubs NTSHChangeNotifyRegister, NTSHChangeNotifyDeregister.
Cleanup, some more functions UNICODE ready.

diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c
index d9ba696..cb2fcae 100644
--- a/dlls/shell32/shelllink.c
+++ b/dlls/shell32/shelllink.c
@@ -115,15 +115,15 @@
 	return NOERROR;
 }
 static HRESULT WINAPI IPersistFile_Load (LPPERSISTFILE this, LPCOLESTR32 pszFileName, DWORD dwMode)
-{	FIXME(shell,"(%p)\n",this);
-	return NOERROR;
+{	FIXME(shell,"(%p)->(%s)\n",this,debugstr_w(pszFileName));
+	return E_FAIL;
 }
 static HRESULT WINAPI IPersistFile_Save (LPPERSISTFILE this, LPCOLESTR32 pszFileName, BOOL32 fRemember)
-{	FIXME(shell,"(%p)\n",this);
+{	FIXME(shell,"(%p)->(%s)\n",this,debugstr_w(pszFileName));
 	return NOERROR;
 }
 static HRESULT WINAPI IPersistFile_SaveCompleted (LPPERSISTFILE this, LPCOLESTR32 pszFileName)
-{	FIXME(shell,"(%p)\n",this);
+{	FIXME(shell,"(%p)->(%s)\n",this,debugstr_w(pszFileName));
 	return NOERROR;
 }
 static HRESULT WINAPI IPersistFile_GetCurFile (LPPERSISTFILE this, LPOLESTR32 *ppszFileName)
diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c
index d56cf60..0d8efa1 100644
--- a/dlls/shell32/shellole.c
+++ b/dlls/shell32/shellole.c
@@ -178,7 +178,8 @@
 	  if (IsEqualCLSID(rclsid, &CLSID_ShellLink))
 	  { if (VERSION_OsIsUnicode ())
 	      lpclf = IShellLinkW_CF_Constructor();
-	    lpclf = IShellLink_CF_Constructor();
+	    else  
+	      lpclf = IShellLink_CF_Constructor();
 	  }
 	  else
 	  { lpclf = IClassFactory_Constructor();
diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c
index 9f16322..cf2b4a8 100644
--- a/dlls/shell32/shellord.c
+++ b/dlls/shell32/shellord.c
@@ -59,6 +59,30 @@
 {	FIXME(shell,"(0x%08lx):stub.\n",x1);
 	return 0;
 }
+/*************************************************************************
+ * NTSHChangeNotifyRegister [SHELL32.640]
+ * NOTES
+ *   Idlist is an array of structures and Count specifies how many items in the array
+ *   (usually just one I think).
+ */
+DWORD WINAPI NTSHChangeNotifyRegister(
+    HWND32 hwnd,
+    LONG events1,
+    LONG events2,
+    DWORD msg,
+    int count,
+    IDSTRUCT *idlist)
+{	FIXME(shell,"(0x%04x,0x%08lx,0x%08lx,0x%08lx,0x%08x,%p):stub.\n",
+		hwnd,events1,events2,msg,count,idlist);
+	return 0;
+}
+/*************************************************************************
+ * NTSHChangeNotifyDeregister [SHELL32.641]
+ */
+DWORD WINAPI NTSHChangeNotifyDeregister(LONG x1)
+{	FIXME(shell,"(0x%08lx):stub.\n",x1);
+	return 0;
+}
 
 /*************************************************************************
  * ParseField [SHELL32.58]
@@ -119,19 +143,6 @@
 }
 
 /*************************************************************************
- * Shell_GetCachedImageIndex [SHELL32.72]
- *
- */
-void WINAPI Shell_GetCachedImageIndex(LPVOID x,DWORD y,DWORD z) 
-{	if( VERSION_OsIsUnicode())
-	{ FIXME(shell,"(L%s,%08lx,%08lx):stub.\n",debugstr_w((LPWSTR)x),y,z);
-	}
-	else
-	{ FIXME(shell,"(%s,%08lx,%08lx):stub.\n",debugstr_a((LPSTR)x),y,z);
-	}
-}
-
-/*************************************************************************
  * SHShellFolderView_Message [SHELL32.73]
  *
  * PARAMETERS
@@ -178,28 +189,6 @@
     return MultiByteToWideChar (0, 0, lpMulti, nMulti, lpWide, nWide);
 }
 
-/*************************************************************************
- * SHCloneSpecialIDList [SHELL32.89]
- * 
- * PARAMETERS
- *  hwndOwner 	[in] 
- *  nFolder 	[in]	CSIDL_xxxxx ??
- *
- * RETURNS
- *  pidl ??
- * NOTES
- *     exported by ordinal
- */
-LPITEMIDLIST WINAPI SHCloneSpecialIDList(HWND32 hwndOwner,DWORD nFolder,DWORD x3)
-{	LPITEMIDLIST ppidl;
-	WARN(shell,"(hwnd=0x%x,csidl=0x%lx,0x%lx):semi-stub.\n",
-					 hwndOwner,nFolder,x3);
-
-	SHGetSpecialFolderLocation(hwndOwner, nFolder, &ppidl);
-
-	return ppidl;
-}
-
 
 /*************************************************************************
  * SHGetSpecialFolderPath [SHELL32.175]
@@ -759,14 +748,6 @@
   return 0;
 }
 /*************************************************************************
- * SHGetDataFromIDListA [SHELL32.247]
- *
- */
-HRESULT WINAPI SHGetDataFromIDListA(DWORD u, DWORD v, DWORD w, DWORD x, DWORD y)
-{	FIXME(shell,"0x%04lx 0x%04lx 0x%04lx 0x%04lx 0x%04lx stub\n",u,v,w,x,y);
-	return 0;
-}
-/*************************************************************************
  * SHRegCloseKey32 [NT4.0:SHELL32.505]
  *
  */
@@ -1001,8 +982,8 @@
  * SetAppStartingCursor32 [SHELL32.99]
  *
  */
-HRESULT WINAPI SetAppStartingCursor32(DWORD u, DWORD v)
-{	FIXME(shell,"0x%04lx 0x%04lx stub\n",u,v );
+HRESULT WINAPI SetAppStartingCursor32(HWND32 u, DWORD v)
+{	FIXME(shell,"hwnd=0x%04x 0x%04lx stub\n",u,v );
 	return 0;
 }
 /*************************************************************************
@@ -1257,7 +1238,7 @@
  * Control_FillCache_RunDLL [SHELL32.8]
  *
  */
-HRESULT WINAPI Control_FillCache_RunDLL(DWORD u, DWORD v, DWORD w, DWORD x)
-{	FIXME(shell,"0x%04lx 0x%04lx 0x%04lx 0x%04lx stub\n",u,v,w,x);
+HRESULT WINAPI Control_FillCache_RunDLL(HWND32 hWnd, HANDLE32 hModule, DWORD w, DWORD x)
+{	FIXME(shell,"0x%04x 0x%04x 0x%04lx 0x%04lx stub\n",hWnd, hModule,w,x);
 	return 0;
 }
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index 85ab2c5..f6c49f6 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -65,7 +65,7 @@
 /*************************************************************************
  * PathBuildRoot [SHELL32.30]
  */
-LPSTR WINAPI PathBuildRoot(LPSTR root,BYTE drive) {
+LPSTR WINAPI PathBuildRoot32A(LPSTR root,BYTE drive) {
   TRACE(shell,"%p %i\n",root, drive);
 	strcpy(root,"A:\\");
 	root[0]+=drive;
@@ -237,7 +237,7 @@
  *     "\" -> "\"
  *     "a:\foo"	-> "a:\"
  */
-DWORD WINAPI PathRemoveFileSpec(LPSTR fn) {
+DWORD WINAPI PathRemoveFileSpec32A(LPSTR fn) {
 	LPSTR	x,cutplace;
   TRACE(shell,"%s\n",fn);
 	if (!fn[0])
@@ -278,7 +278,7 @@
  *     concat_paths(char*target,const char*add);
  *     concats "target\\add" and writes them to target
  */
-LPSTR WINAPI PathAppend(LPSTR x1,LPSTR x2) {
+LPSTR WINAPI PathAppend32A(LPSTR x1,LPSTR x2) {
   TRACE(shell,"%s %s\n",x1,x2);
   while (x2[0]=='\\') x2++;
   return PathCombine32A(x1,x1,x2);
@@ -394,9 +394,18 @@
  *  PathIsExe [SHELL32.43]
  * 
  */
-BOOL32 WINAPI PathIsExe (LPCSTR path)
-{  TRACE(shell,"path=%s\n",path);
-    return FALSE;
+BOOL32 WINAPI PathIsExe32A (LPCSTR path)
+{	FIXME(shell,"path=%s\n",path);
+	return FALSE;
+}
+BOOL32 WINAPI PathIsExe32W (LPCWSTR path)
+{	FIXME(shell,"path=%s\n",debugstr_w(path));
+	return FALSE;
+}
+BOOL32 WINAPI PathIsExe32AW (LPCVOID path)
+{	if (VERSION_OsIsUnicode())
+	  return PathIsExe32W (path);
+	return PathIsExe32A(path);
 }
 
 /*************************************************************************
@@ -405,7 +414,7 @@
  * NOTES
  *     file_exists(char *fn);
  */
-BOOL32 WINAPI PathFileExists(LPSTR fn) {
+BOOL32 WINAPI PathFileExists32A(LPSTR fn) {
   TRACE(shell,"%s\n",fn);
    if (GetFileAttributes32A(fn)==-1)
     	return FALSE;
@@ -525,33 +534,39 @@
  *     look for next arg in string. handle "quoted" strings
  *     returns pointer to argument *AFTER* the space. Or to the \0.
  */
-LPVOID WINAPI PathGetArgs(LPVOID cmdline) 
+LPCSTR WINAPI PathGetArgs32A(LPCSTR cmdline) 
 {	BOOL32	qflag = FALSE;
-	LPWSTR wptr;
-	LPSTR aptr;
-	
-	if (VERSION_OsIsUnicode())
-	{ TRACE(shell,"%sL\n",debugstr_w((LPWSTR)cmdline));
-	  wptr=(LPWSTR) cmdline;
-	  while (*wptr) 
-	  { if ((*wptr==' ') && !qflag)
-		return wptr+1;
-	    if (*wptr=='"')
-		qflag=!qflag;
-	    wptr++;
-	  }
-	  return (LPVOID) wptr;
-	}
-	TRACE(shell,"%s\n",(LPSTR)cmdline);
-	aptr=(LPSTR) cmdline;
-	while (*aptr) 
-	{ if ((*aptr==' ') && !qflag)
-	    return aptr+1;
-	  if (*aptr=='"')
+
+	TRACE(shell,"%s\n",cmdline);
+
+	while (*cmdline) 
+	{ if ((*cmdline==' ') && !qflag)
+	    return cmdline+1;
+	  if (*cmdline=='"')
 	    qflag=!qflag;
-	  aptr++;
+	  cmdline++;
 	}
-	return (LPVOID) aptr;
+	return cmdline;
+
+}
+LPCWSTR WINAPI PathGetArgs32W(LPCWSTR cmdline) 
+{	BOOL32	qflag = FALSE;
+
+	TRACE(shell,"%sL\n",debugstr_w(cmdline));
+
+	while (*cmdline) 
+	{ if ((*cmdline==' ') && !qflag)
+	    return cmdline+1;
+	  if (*cmdline=='"')
+	    qflag=!qflag;
+	  cmdline++;
+	}
+	return cmdline;
+}
+LPCVOID WINAPI PathGetArgs32AW(LPVOID cmdline) 
+{	if (VERSION_OsIsUnicode())
+	  return PathGetArgs32W(cmdline);
+	return PathGetArgs32A(cmdline);
 }
 /*************************************************************************
  * PathQuoteSpaces [SHELL32.55]
@@ -581,15 +596,36 @@
  * NOTES
  *     unquote string (remove ")
  */
-VOID WINAPI PathUnquoteSpaces(LPSTR str) {
-    DWORD      len = lstrlen32A(str);
-    TRACE(shell,"%s\n",str);
-    if (*str!='"') return;
-    if (str[len-1]!='"') return;
-    str[len-1]='\0';
-    lstrcpy32A(str,str+1);
-    return;
+VOID WINAPI PathUnquoteSpaces32A(LPSTR str) 
+{	DWORD      len = lstrlen32A(str);
+	TRACE(shell,"%s\n",str);
+	if (*str!='"')
+	  return;
+	if (str[len-1]!='"')
+	  return;
+	str[len-1]='\0';
+	lstrcpy32A(str,str+1);
+	return;
 }
+VOID WINAPI PathUnquoteSpaces32W(LPWSTR str) 
+{	DWORD len = lstrlen32W(str);
+
+	TRACE(shell,"%s\n",debugstr_w(str));
+
+	if (*str!='"')
+	  return;
+	if (str[len-1]!='"')
+	  return;
+	str[len-1]='\0';
+	lstrcpy32W(str,str+1);
+	return;
+}
+VOID WINAPI PathUnquoteSpaces32AW(LPVOID str) 
+{	if(VERSION_OsIsUnicode())
+	  PathUnquoteSpaces32W(str);
+	PathUnquoteSpaces32A(str);
+}
+
 
 /*************************************************************************
  * PathGetDriveNumber32 [SHELL32.57]
@@ -606,7 +642,7 @@
  * NOTES
  *     exported by ordinal
  */
-BOOL32 WINAPI PathYetAnotherMakeUniqueName(LPDWORD x,LPDWORD y) {
+BOOL32 WINAPI PathYetAnotherMakeUniqueName32A(LPDWORD x,LPDWORD y) {
     FIXME(shell,"(%p,%p):stub.\n",x,y);
     return TRUE;
 }
@@ -617,7 +653,7 @@
  * NOTES
  *     exported by ordinal Name
  */
-BOOL32 WINAPI IsLFNDrive(LPCSTR path) {
+BOOL32 WINAPI IsLFNDrive32A(LPCSTR path) {
     DWORD	fnlen;
 
     if (!GetVolumeInformation32A(path,NULL,0,NULL,&fnlen,NULL,NULL,0))
diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c
index 6c4abe5..403c337 100644
--- a/dlls/shell32/shlview.c
+++ b/dlls/shell32/shlview.c
@@ -247,7 +247,7 @@
 	TRACE(shell,"%p\n",this);
 
 	dwStyle = WS_TABSTOP | WS_VISIBLE | WS_CHILD | WS_BORDER |
-		  LVS_SHAREIMAGELISTS | LVS_EDITLABELS;
+		  LVS_SHAREIMAGELISTS | LVS_EDITLABELS | LVS_ALIGNLEFT;
 	switch (this->FolderSettings.ViewMode)
 	{ case FVM_ICON:	dwStyle |= LVS_ICON;		break;
 	  case FVM_DETAILS: 	dwStyle |= LVS_REPORT;		break;
diff --git a/include/shlobj.h b/include/shlobj.h
index 67e49e5..8f82309 100644
--- a/include/shlobj.h
+++ b/include/shlobj.h
@@ -8,6 +8,7 @@
 #include "oleobj.h"
 #include "storage.h"
 #include "commctrl.h"
+#include "wintypes.h"
 #include "interfaces.h"
 
 #define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
@@ -1289,6 +1290,41 @@
 #define  SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
 
 /****************************************************************************
+*	SHGetDataFromIDList API
+*/
+#define SHGDFIL_FINDDATA        1
+#define SHGDFIL_NETRESOURCE     2
+#define SHGDFIL_DESCRIPTIONID   3
+
+#define SHDID_ROOT_REGITEM          1
+#define SHDID_FS_FILE               2
+#define SHDID_FS_DIRECTORY          3
+#define SHDID_FS_OTHER              4
+#define SHDID_COMPUTER_DRIVE35      5
+#define SHDID_COMPUTER_DRIVE525     6
+#define SHDID_COMPUTER_REMOVABLE    7
+#define SHDID_COMPUTER_FIXED        8
+#define SHDID_COMPUTER_NETDRIVE     9
+#define SHDID_COMPUTER_CDROM        10
+#define SHDID_COMPUTER_RAMDISK      11
+#define SHDID_COMPUTER_OTHER        12
+#define SHDID_NET_DOMAIN            13
+#define SHDID_NET_SERVER            14
+#define SHDID_NET_SHARE             15
+#define SHDID_NET_RESTOFNET         16
+#define SHDID_NET_OTHER             17
+
+typedef struct _SHDESCRIPTIONID 
+{   DWORD   dwDescriptionId;
+    CLSID   clsid;
+} SHDESCRIPTIONID, *LPSHDESCRIPTIONID;
+
+HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
+HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
+#define  SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList)
+
+
+/****************************************************************************
 * shlview structures
 */
 
diff --git a/relay32/shell32.spec b/relay32/shell32.spec
index f3dc7f1..6d1f01a 100644
--- a/relay32/shell32.spec
+++ b/relay32/shell32.spec
@@ -35,33 +35,33 @@
   27 stub ILSaveToStream@8
   28 stub SHILCreateFromPath@12
   29 stdcall PathIsRoot(ptr) PathIsRoot32AW
-  30 stdcall PathBuildRoot(ptr long) PathBuildRoot
+  30 stdcall PathBuildRoot(ptr long) PathBuildRoot32A
   31 stdcall PathFindExtension(ptr) PathFindExtension32AW
   32 stdcall PathAddBackslash(ptr) PathAddBackslash32AW
   33 stdcall PathRemoveBlanks(str) PathRemoveBlanks32AW
   34 stdcall PathFindFilename(ptr) PathFindFilename32AW
-  35 stdcall PathRemoveFileSpec(str) PathRemoveFileSpec
-  36 stdcall PathAppend(str str) PathAppend
+  35 stdcall PathRemoveFileSpec(str) PathRemoveFileSpec32A
+  36 stdcall PathAppend(str str) PathAppend32A
   37 stdcall PathCombine(ptr ptr ptr) PathCombine32AW
   38 stub PathStripPath
   39 stdcall PathIsUNC (ptr) PathIsUNC32AW
   40 stdcall PathIsRelative (ptr) PathIsRelative32AW
   41 stub Control_RunDLLA@16
   42 stub Control_RunDLLW@16
-  43 stdcall PathIsExe (ptr) PathIsExe
+  43 stdcall PathIsExe (ptr) PathIsExe32AW
   44 stub DoEnvironmentSubstA@8
-  45 stdcall PathFileExists(str) PathFileExists
+  45 stdcall PathFileExists(str) PathFileExists32A
   46 stdcall PathMatchSpec (str str) PathMatchSpec32AW
   47 stub PathMakeUniqueName@20
   48 stdcall PathSetDlgItemPath (long long ptr) PathSetDlgItemPath32AW
   49 stub PathQualify@4
   50 stub PathStripToRoot@4
   51 stdcall PathResolve(str long long) PathResolve
-  52 stdcall PathGetArgs(str) PathGetArgs
+  52 stdcall PathGetArgs(str) PathGetArgs32AW
   53 stub DoEnvironmentSubstW@8
   54 stdcall DragAcceptFiles(long long) DragAcceptFiles32
   55 stdcall PathQuoteSpaces (ptr) PathQuoteSpaces32AW
-  56 stdcall PathUnquoteSpaces(str) PathUnquoteSpaces
+  56 stdcall PathUnquoteSpaces(str) PathUnquoteSpaces32AW
   57 stdcall PathGetDriveNumber (str) PathGetDriveNumber32
   58 stdcall ParseField(str long ptr long) ParseField32A
   59 stub RestartDialog@12
@@ -77,10 +77,10 @@
   69 stub SHGetNetResource
   70 stub SHCreateDefClassObject
   71 stdcall Shell_GetImageList(ptr ptr) Shell_GetImageList
-  72 stdcall Shell_GetCachedImageIndex(ptr ptr long) Shell_GetCachedImageIndex
+  72 stdcall Shell_GetCachedImageIndex(ptr ptr long) Shell_GetCachedImageIndex32A # ASCII!!!
   73 stub SHShellFolderView_Message
   74 stub SHCreateStdEnumFmtEtc
-  75 stdcall PathYetAnotherMakeUniqueName(ptr ptr) PathYetAnotherMakeUniqueName
+  75 stdcall PathYetAnotherMakeUniqueName(ptr ptr) PathYetAnotherMakeUniqueName32A
   76 stub DragQueryInfo
   77 stdcall SHMapPIDLToSystemImageListIndex(long long long) SHMapPIDLToSystemImageListIndex
   78 stdcall OleStrToStrN(str long wstr long) OleStrToStrN
@@ -124,7 +124,7 @@
  116 stdcall FileMenu_TrackPopupMenuEx (long long long long long long) FileMenu_TrackPopupMenuEx
  117 stub FileMenu_DeleteItemByCmd
  118 stdcall FileMenu_Destroy (long) FileMenu_Destroy
- 119 stdcall IsLFNDrive(str) IsLFNDrive
+ 119 stdcall IsLFNDrive(str) IsLFNDrive32A
  120 stub FileMenu_AbortInitMenu
  121 stdcall SHFlushClipboard () SHFlushClipboard
  122 stub RunDLL_CallEntry16
@@ -252,8 +252,8 @@
  244 stdcall SHFileOperationW (ptr) SHFileOperation32W   # exported by name
  245 stub SHFormatDrive@16   # exported by name
  246 stub SHFreeNameMappings@4   # exported by name
- 247 stdcall SHGetDataFromIDListA (long long long long long) SHGetDataFromIDListA  # exported by name
- 248 stub SHGetDataFromIDListW@20   # exported by name
+ 247 stdcall SHGetDataFromIDListA (ptr ptr long ptr long) SHGetDataFromIDList32A
+ 248 stdcall SHGetDataFromIDListW (ptr ptr long ptr long) SHGetDataFromIDList32W
  249 stub PathParseIconLocation@4
  250 stub PathRemoveExtension@4
  251 stub PathRemoveArgs@4
@@ -353,8 +353,8 @@
  524 stub RealDriveType@8
  525 stub RealDriveTypeFlags@8
 
- 640 stub NTSHChangeNotifyRegister@24
- 641 stub NTSHChangeNotifyDeregister@4
+ 640 stdcall NTSHChangeNotifyRegister (long long long long long long) NTSHChangeNotifyRegister
+ 641 stdcall NTSHChangeNotifyDeregister (long) NTSHChangeNotifyDeregister
 
  643 stub SHChangeNotifyReceive@16
  644 stub SHChangeNotification_Lock@16