Index: trunk/src/shell32/changenotify.c
===================================================================
--- trunk/src/shell32/changenotify.c	(revision 8047)
+++ trunk/src/shell32/changenotify.c	(revision 8048)
@@ -1,3 +1,3 @@
-/* $Id: changenotify.c,v 1.1 2000-08-30 13:52:50 sandervl Exp $ */
+/* $Id: changenotify.c,v 1.2 2002-03-08 11:00:58 sandervl Exp $ */
 /*
  *	shell change notification
@@ -29,5 +29,5 @@
 	HWND hwnd;		/* window to notify */
 	DWORD uMsg;		/* message to send */
-	LPNOTIFYREGISTER apidl; /* array of entrys to watch*/
+	LPNOTIFYREGISTER apidl; /* array of entries to watch*/
 	UINT cidl;		/* number of pidls in array */
 	LONG wEventMask;	/* subscribed events */
@@ -185,4 +185,17 @@
 
 /*************************************************************************
+ * SHChangeNotifyUpdateEntryList       		[SHELL32.5]
+ */
+BOOL WINAPI
+SHChangeNotifyUpdateEntryList(DWORD unknown1, DWORD unknown2,
+			      DWORD unknown3, DWORD unknown4)
+{
+	FIXME("(0x%08lx, 0x%08lx, 0x%08lx, 0x%08lx)\n",
+	      unknown1, unknown2, unknown3, unknown4);
+
+	return -1;
+}
+
+/*************************************************************************
  * SHChangeNotify				[SHELL32.239]
  */
Index: trunk/src/shell32/classes.c
===================================================================
--- trunk/src/shell32/classes.c	(revision 8047)
+++ trunk/src/shell32/classes.c	(revision 8048)
@@ -1,3 +1,3 @@
-/* $Id: classes.c,v 1.1 2000-08-30 13:52:50 sandervl Exp $ */
+/* $Id: classes.c,v 1.2 2002-03-08 11:00:58 sandervl Exp $ */
 /*
  *	file type mapping 
@@ -17,9 +17,9 @@
 #include "winreg.h"
 
-#include "wine/obj_queryassociations.h"
 #include "shlobj.h"
 #include "shell32_main.h"
 #include "shlguid.h"
 #include "shresdef.h"
+#include "wine/obj_queryassociations.h"
 
 DEFAULT_DEBUG_CHANNEL(shell);
@@ -32,4 +32,8 @@
 
 	TRACE("%s %p\n",szExtension, szFileType );
+
+	/* added because we do not want to have double dots */
+	if (szExtension[0]=='.')
+		bPrependDot=0;
 
 	if (bPrependDot)
@@ -106,5 +110,8 @@
 	      strcpy(szDest, sTemp);
 	    }
-	    if (ParseFieldA (szDest, 2, sNum, 5)) *dwNr=atoi(sNum);
+	    if (ParseFieldA (szDest, 2, sNum, 5))
+               *dwNr=atoi(sNum);
+            else
+               *dwNr=0; /* sometimes the icon number is missing */
 	    ParseFieldA (szDest, 1, szDest, len);
 	    ret = TRUE;
Index: trunk/src/shell32/clipboard.c
===================================================================
--- trunk/src/shell32/clipboard.c	(revision 8047)
+++ trunk/src/shell32/clipboard.c	(revision 8048)
@@ -1,3 +1,3 @@
-/* $Id: clipboard.c,v 1.1 2000-08-30 13:52:50 sandervl Exp $ */
+/* $Id: clipboard.c,v 1.2 2002-03-08 11:00:58 sandervl Exp $ */
 /*
  *	clipboard helper functions
@@ -27,12 +27,13 @@
 #include <string.h>
 
-#include "debugtools.h"
-
+#include "winreg.h"
 #include "pidl.h"
 #include "wine/undocshell.h"
 #include "shell32_main.h"
-#include "shell.h" /* DROPFILESTRUCT */
-
-DEFAULT_DEBUG_CHANNEL(shell)
+#include "shlwapi.h"
+
+#include "debugtools.h"
+
+DEFAULT_DEBUG_CHANNEL(shell);
 
 static int refClipCount = 0;
@@ -102,5 +103,5 @@
 	char szFileName[MAX_PATH];
 	HGLOBAL hGlobal;
-	LPDROPFILESTRUCT pDropFiles;
+	DROPFILES *pDropFiles;
 	int offset;
 	
@@ -108,5 +109,5 @@
 
 	/* get the size needed */
-	size = sizeof(DROPFILESTRUCT);
+	size = sizeof(DROPFILES);
 
 	SHGetPathFromIDListA(pidlRoot, szRootPath);
@@ -126,9 +127,9 @@
 	if(!hGlobal) return hGlobal;
 
-        pDropFiles = (LPDROPFILESTRUCT)GlobalLock(hGlobal);
-        pDropFiles->lSize = sizeof(DROPFILESTRUCT);
-        pDropFiles->fWideChar = FALSE;
-
-	offset = pDropFiles->lSize;
+        pDropFiles = (DROPFILES *)GlobalLock(hGlobal);
+        pDropFiles->pFiles = sizeof(DROPFILES);
+        pDropFiles->fWide = FALSE;
+
+	offset = pDropFiles->pFiles;
 	strcpy(szFileName, szRootPath);
 	
Index: trunk/src/shell32/dataobject.c
===================================================================
--- trunk/src/shell32/dataobject.c	(revision 8047)
+++ trunk/src/shell32/dataobject.c	(revision 8048)
@@ -1,3 +1,3 @@
-/* $Id: dataobject.c,v 1.1 2000-08-30 13:52:51 sandervl Exp $ */
+/* $Id: dataobject.c,v 1.2 2002-03-08 11:00:58 sandervl Exp $ */
 /*
  *	IEnumFORMATETC, IDataObject
@@ -20,5 +20,5 @@
 #include "wine/obj_dataobject.h"
 
-DEFAULT_DEBUG_CHANNEL(shell)
+DEFAULT_DEBUG_CHANNEL(shell);
 
 /***********************************************************************
Index: trunk/src/shell32/dbgwrap.cpp
===================================================================
--- trunk/src/shell32/dbgwrap.cpp	(revision 8047)
+++ trunk/src/shell32/dbgwrap.cpp	(revision 8048)
@@ -169,5 +169,5 @@
 DEBUGWRAP4(ILGlobalFree)
 DEBUGWRAP4(ILCreateFromPathAW)
-DEBUGWRAP4(PathGetExtensionAW)
+DEBUGWRAP12(PathGetExtensionAW)
 NODEF_DEBUGWRAP4(PathIsDirectoryAW)
 NODEF_DEBUGWRAP8(SHRunControlPanel)
Index: trunk/src/shell32/enumidlist.c
===================================================================
--- trunk/src/shell32/enumidlist.c	(revision 8047)
+++ trunk/src/shell32/enumidlist.c	(revision 8048)
@@ -1,3 +1,3 @@
-/* $Id: enumidlist.c,v 1.3 2001-11-16 12:57:45 phaller Exp $ */
+/* $Id: enumidlist.c,v 1.4 2002-03-08 11:00:59 sandervl Exp $ */
 /*
  *	IEnumIDList
@@ -91,5 +91,5 @@
  *  CreateFolderEnumList()
  */
-#ifdef __WIN32OS2__
+#ifdef __WIN32OS2__TEST_TURNED_OFF
 //CB: Special version to speed up retrieving files in a directory
 
Index: trunk/src/shell32/makefile
===================================================================
--- trunk/src/shell32/makefile	(revision 8047)
+++ trunk/src/shell32/makefile	(revision 8048)
@@ -1,3 +1,3 @@
-# $Id: makefile,v 1.38 2002-02-14 12:10:08 sandervl Exp $
+# $Id: makefile,v 1.39 2002-03-08 11:00:59 sandervl Exp $
 
 #
@@ -32,4 +32,5 @@
 $(OBJDIR)\initterm.obj \
 $(OBJDIR)\initshell32.obj \
+$(OBJDIR)\os2_integration.obj \
 $(OBJDIR)\brsfolder.obj \
 $(OBJDIR)\changenotify.obj \
Index: trunk/src/shell32/os2_integration.cpp
===================================================================
--- trunk/src/shell32/os2_integration.cpp	(revision 8048)
+++ trunk/src/shell32/os2_integration.cpp	(revision 8048)
@@ -0,0 +1,96 @@
+/* $Id: os2_integration.cpp,v 1.1 2002-03-08 11:00:59 sandervl Exp $ */
+
+/*
+ * Win32 SHELL32 for OS/2
+ *
+ * Copyright 2002 Patrick Haller (patrick.haller@innotek.de)
+ * Project Odin Software License can be found in LICENSE.TXT
+ *
+ */
+
+
+/*****************************************************************************
+ * Includes                                                                  *
+ *****************************************************************************/
+
+#define INCL_DOS
+#define INCL_DOSERRORS
+#define INCL_BASE
+#define INCL_WIN
+#define INCL_WINWORKPLACE
+#include <os2.h>
+
+#include <os2wrap.h>
+#include <win32type.h>
+#include <misc.h>
+#include <string.h>
+
+#include "os2_integration.h"
+
+
+// These constants shall resemble ODIN SHELL error codes
+#ifndef S_OK
+#define S_OK 0
+#endif
+
+#ifndef SE_ERR_OOM
+#define SE_ERR_OOM              8       /* out of memory */
+#endif
+
+#ifndef SE_ERR_ASSOCINCOMPLETE
+#define SE_ERR_ASSOCINCOMPLETE          27
+#endif
+
+
+#ifdef SE_ERR_NOASSOC
+#define SE_ERR_NOASSOC                  31
+#endif
+
+
+
+
+DWORD ShellExecuteOS2(HWND   hwndWin32,
+                      LPCSTR pszOperation,
+                      LPCSTR pszFile,
+                      LPCSTR pszParameters,
+                      LPCSTR pszDirectory,
+                      INT    iShowCmd)
+{
+  APIRET rc;                                              /* API return code */
+  char   szFileFull[260]; 
+  
+  // verify parameter block
+  
+  // Supported operations
+  if ( (NULL == pszOperation) &&
+       (stricmp( pszOperation, "open") != 0) &&
+       (stricmp( pszOperation, "play") != 0) )
+  {
+    // abort execution with error
+    return SE_ERR_ASSOCINCOMPLETE;
+  }
+      
+  // @@@PH
+  // work directory currently ignored
+  // parameters currently ignored
+  
+  // FS: is saved by the wrapper macros
+  
+  // get fully-qualified name
+  rc = DosQueryPathInfo(pszFile,               /* query the file information */
+                        FIL_QUERYFULLNAME,
+                        &szFileFull,
+                        sizeof(szFileFull));
+  if (rc != NO_ERROR)                                    /* check for errors */
+    return SE_ERR_ASSOCINCOMPLETE;
+                   
+  
+  // Finally try to open the WPS object
+  HOBJECT hObject = WinQueryObject( szFileFull );
+  if (NULLHANDLE == hObject)
+    return SE_ERR_OOM;
+    
+  WinSetObjectData(hObject, "OPEN=DEFAULT");
+  
+  return S_OK;
+}
Index: trunk/src/shell32/os2_integration.h
===================================================================
--- trunk/src/shell32/os2_integration.h	(revision 8048)
+++ trunk/src/shell32/os2_integration.h	(revision 8048)
@@ -0,0 +1,26 @@
+/* $Id: os2_integration.h,v 1.1 2002-03-08 11:00:59 sandervl Exp $ */
+
+/*
+ * Win32 SHELL32 for OS/2
+ *
+ * Copyright 2002 Patrick Haller (patrick.haller@innotek.de)
+ * Project Odin Software License can be found in LICENSE.TXT
+ *
+ */
+
+#ifndef _OS2_INTEGRATION_H_
+#define _OS2_INTEGRATION_H_
+
+
+/*****************************************************************************
+ * Prototypes                                                                *
+ *****************************************************************************/
+
+DWORD ShellExecuteOS2(HWND   hwndWin32,
+                      LPCSTR pszOperation,
+                      LPCSTR pszFile,
+                      LPCSTR pszParameters,
+                      LPCSTR pszDirectory,
+                      INT    iShowCmd);
+
+#endif /* _OS2_INTEGRATION_H_ */
Index: trunk/src/shell32/pidl.c
===================================================================
--- trunk/src/shell32/pidl.c	(revision 8047)
+++ trunk/src/shell32/pidl.c	(revision 8048)
@@ -1,2 +1,3 @@
+/* $Id: pidl.c,v 1.15 2002-03-08 11:00:59 sandervl Exp $ */
 /*
  *	pidl Handling
@@ -25,5 +26,5 @@
 #include <string.h>
 #include "winbase.h"
-#include "debugtools.h"
+#include "winreg.h"
 #include "shlguid.h"
 #include "winerror.h"
@@ -35,4 +36,5 @@
 
 #include "pidl.h"
+#include "debugtools.h"
 
 DEFAULT_DEBUG_CHANNEL(pidl);
Index: trunk/src/shell32/shell.c
===================================================================
--- trunk/src/shell32/shell.c	(revision 8047)
+++ trunk/src/shell32/shell.c	(revision 8048)
@@ -1,3 +1,3 @@
-/* $Id: shell.c,v 1.2 2001-10-17 09:15:20 phaller Exp $ */
+/* $Id: shell.c,v 1.3 2002-03-08 11:01:00 sandervl Exp $ */
 /*
  * 				Shell Library Functions
@@ -400,5 +400,8 @@
     /* First try to execute lpFile with lpParameters directly */ 
     strcpy(cmd,lpFile);
-    strcat(cmd,lpParameters ? lpParameters : "");
+    if (lpParameters) {
+        strcat(cmd, " " );
+        strcat(cmd,lpParameters );
+    }
 
     retval = WinExec16( cmd, iShowCmd );
Index: trunk/src/shell32/shell32.def
===================================================================
--- trunk/src/shell32/shell32.def	(revision 8047)
+++ trunk/src/shell32/shell32.def	(revision 8048)
@@ -1,3 +1,3 @@
-; $Id: shell32.def,v 1.36 2002-02-14 12:10:10 sandervl Exp $
+; $Id: shell32.def,v 1.37 2002-03-08 11:01:00 sandervl Exp $
 
 ; Based on Windows 95
@@ -167,5 +167,5 @@
     ILGlobalGree                      = _ILGlobalFree@4                       @156
     ILCreateFromPath                  = _ILCreateFromPathAW@4                 @157
-    PathGetExtension                  = _PathGetExtensionAW@4                 @158
+    PathGetExtension                  = _PathGetExtensionAW@12                @158
     PathIsDirectory                   = _PathIsDirectoryAW@4                  @159
 ;   SHNetConnectionDialog             = _SHNetConnectionDialog@?              @160
Index: trunk/src/shell32/shell32_main.c
===================================================================
--- trunk/src/shell32/shell32_main.c	(revision 8047)
+++ trunk/src/shell32/shell32_main.c	(revision 8048)
@@ -1,3 +1,3 @@
-/* $Id: shell32_main.c,v 1.6 2001-10-17 09:15:21 phaller Exp $ */
+/* $Id: shell32_main.c,v 1.7 2002-03-08 11:01:00 sandervl Exp $ */
 /*
  * 				Shell basics
@@ -215,4 +215,5 @@
 	LPITEMIDLIST	pidlLast = NULL, pidl = NULL;
 	HRESULT hr = S_OK;
+	BOOL IconNotYetLoaded=TRUE;
 
 	TRACE("(%s fattr=0x%lx sfi=%p(attr=0x%08lx) size=0x%x flags=0x%x)\n", 
@@ -337,5 +338,17 @@
 	if (SUCCEEDED(hr) && (flags & SHGFI_TYPENAME))
 	{
-	  _ILGetFileType(pidlLast, psfi->szTypeName, 80);
+            if (!(flags & SHGFI_USEFILEATTRIBUTES))
+		_ILGetFileType(pidlLast, psfi->szTypeName, 80);
+            else
+            {
+                char sTemp[64];
+                strcpy(sTemp,PathFindExtensionA(path));
+                if (!( HCR_MapTypeToValue(sTemp, sTemp, 64, TRUE)
+                       && HCR_MapTypeToValue(sTemp, psfi->szTypeName, 80, FALSE )))
+                {
+                    lstrcpynA (psfi->szTypeName, sTemp, 80 - 6);
+                    strcat (psfi->szTypeName, "-file");
+                }
+            }
 	}
 
@@ -359,5 +372,5 @@
 	  {
 	    hr = IExtractIconA_GetIconLocation(pei, (flags & SHGFI_OPENICON)? GIL_OPENICON : 0,szLoaction, MAX_PATH, &iIndex, &uFlags);
-	    /* fixme what to do with the index? */
+	    /* FIXME what to do with the index? */
 
 	    if(uFlags != GIL_NOTFILENAME)
@@ -373,4 +386,5 @@
 	if (SUCCEEDED(hr) && (flags & (SHGFI_ICON | SHGFI_SYSICONINDEX)))
 	{
+
 	  if (flags & SHGFI_USEFILEATTRIBUTES)
 	  {
@@ -388,8 +402,14 @@
                 strcpy(sTemp, path);
               }
-	      /* FIXME: if sTemp contains a valid filename, get the icon 
-	         from there, index is in dwNr
-	      */
-              psfi->iIcon = 2;
+              IconNotYetLoaded=FALSE;
+              psfi->iIcon = 0;
+              if (SHGFI_LARGEICON)
+                PrivateExtractIconsA(sTemp,dwNr,GetSystemMetrics(SM_CXICON),
+                                     GetSystemMetrics(SM_CYICON),
+                                     &psfi->hIcon,0,1,0);
+              else
+                PrivateExtractIconsA(sTemp,dwNr,GetSystemMetrics(SM_CXSMICON),
+                                     GetSystemMetrics(SM_CYSMICON),
+                                     &psfi->hIcon,0,1,0);
             }
             else                                  /* default icon */
@@ -413,5 +433,5 @@
 
 	/* icon handle */
-	if (SUCCEEDED(hr) && (flags & SHGFI_ICON))
+	if (SUCCEEDED(hr) && (flags & SHGFI_ICON) && IconNotYetLoaded)
 	  psfi->hIcon = ImageList_GetIcon((flags & SHGFI_LARGEICON) ? ShellBigIconList:ShellSmallIconList, psfi->iIcon, ILD_NORMAL);
 
@@ -432,4 +452,5 @@
 	return ret;
 } 
+
 /*************************************************************************
  * SHGetFileInfoW			[SHELL32.@]
@@ -462,5 +483,5 @@
 
 /*************************************************************************
- * SHGetFileInfoAW			[SHELL32.@]
+ * SHGetFileInfo			[SHELL32.@]
  */
 DWORD WINAPI SHGetFileInfoAW(
Index: trunk/src/shell32/shell32_odin.cpp
===================================================================
--- trunk/src/shell32/shell32_odin.cpp	(revision 8047)
+++ trunk/src/shell32/shell32_odin.cpp	(revision 8048)
@@ -1,3 +1,3 @@
-/* $Id: shell32_odin.cpp,v 1.3 2002-02-14 12:10:10 sandervl Exp $ */
+/* $Id: shell32_odin.cpp,v 1.4 2002-03-08 11:01:00 sandervl Exp $ */
 
 /*
@@ -55,4 +55,7 @@
 #include <ctype.h>
 #include <module.h>
+
+#include "os2_integration.h"
+
 
 /*****************************************************************************
@@ -982,73 +985,100 @@
                                  LPCSTR lpDirectory,
                                  INT    iShowCmd )
-{   HINSTANCE retval=31;
-    char old_dir[1024];
-    char cmd[256];
-
-    if (lpFile==NULL) return 0; /* should not happen */
-    if (lpOperation==NULL) /* default is open */
-      lpOperation="open";
-
-    if (lpDirectory)
-    { GetCurrentDirectoryA( sizeof(old_dir), old_dir );
-        SetCurrentDirectoryA( lpDirectory );
-    }
-
-    cmd[0] = '\0';
-    retval = SHELL_FindExecutable( lpFile, lpOperation, cmd );
-
-    if (retval > 32)  /* Found */
+{ 
+  HINSTANCE retval=31;
+  char old_dir[1024];
+  char cmd[256];
+  LONG cmdlen = sizeof( cmd );
+  LPSTR tok;
+
+  if (lpFile==NULL) 
+    return 0; /* should not happen */
+  
+  if (lpOperation==NULL) /* default is open */
+    lpOperation="open";
+
+  if (lpDirectory)
+  {
+    // @@@PH 2002-02-26 might throw whole process off track
+    // in case of concurrency
+    GetCurrentDirectoryA( sizeof(old_dir), old_dir );
+    SetCurrentDirectoryA( lpDirectory );
+  }
+
+  cmd[0] = '\0';
+  retval = SHELL_FindExecutable( lpFile, lpOperation, cmd );
+
+  if (retval > 32)  /* Found */
+  {
+    if (lpParameters)
     {
-        if (lpParameters)
-        {
-            strcat(cmd," ");
-            strcat(cmd,lpParameters);
-        }
-
-        dprintf(("starting %s\n",cmd));
-        retval = WinExec( cmd, iShowCmd );
-    }
-    else if(PathIsURLA((LPSTR)lpFile))    /* File not found, check for URL */
+      strcat(cmd," ");
+      strcat(cmd,lpParameters);
+    }
+
+    dprintf(("starting %s\n",cmd));
+    retval = WinExec( cmd, iShowCmd );
+  }
+  else
+  {
+    // - path might be an URL
+    // - argument might be associated with some class / app
+
+    // 2002-02-26 PH
+    // File Extension Association is missing. We'd have to lookup
+    // i. e. ".doc" and create the command.
+    // @@@PH
+
+    // build lookup key
+    char lpstrShellSubkey[256] = "\\shell\\";
+    /* Looking for ...protocol\shell\lpOperation\command */
+    strcat( lpstrShellSubkey, lpOperation );
+    strcat( lpstrShellSubkey, "\\command" );
+
+    // First, check for URL association
+    if(PathIsURLA((LPSTR)lpFile))    /* File not found, check for URL */
     {
-      char lpstrProtocol[256];
-      LONG cmdlen = 512;
       LPSTR lpstrRes;
       INT iSize;
 
       lpstrRes = strchr(lpFile,':');
-      iSize = lpstrRes - lpFile;
-
-      /* Looking for ...protocol\shell\lpOperation\command */
-      strncpy(lpstrProtocol,lpFile,iSize);
-      lpstrProtocol[iSize]='\0';
-      strcat( lpstrProtocol, "\\shell\\" );
-      strcat( lpstrProtocol, lpOperation );
-      strcat( lpstrProtocol, "\\command" );
-
-      /* Remove File Protocol from lpFile */
-      /* In the case file://path/file     */
-      if(!strnicmp(lpFile,"file",iSize))
+      if (NULL != lpstrRes)
       {
-        lpFile += iSize;
-        while(*lpFile == ':') lpFile++;
-      }
-
-
-      /* Get the application for the protocol and execute it */
-      if (RegQueryValueA( HKEY_CLASSES_ROOT, lpstrProtocol, cmd,
+        char szProtocol[256];
+        
+        iSize = lpstrRes - lpFile;
+  
+        strncpy(szProtocol,
+                lpFile, 
+                min( sizeof( szProtocol ), iSize) );
+  
+        /* Remove File Protocol from lpFile */
+        /* In the case file://path/file     */
+        if(!strnicmp(lpFile,"file",iSize))
+        {
+          lpFile += iSize;
+          while(*lpFile == ':') lpFile++;
+        }
+  
+        /* Get the application for the protocol and execute it */
+        if (RegQueryValueA(HKEY_CLASSES_ROOT,
+                           szProtocol, 
+                           cmd,
                            &cmdlen ) == ERROR_SUCCESS )
-      {
-          LPSTR tok;
+        {
           LPSTR tmp;
           char param[256] = "";
           LONG paramlen = 256;
-
+  
           /* Get the parameters needed by the application
              from the associated ddeexec key */
-          tmp = strstr(lpstrProtocol,"command");
+          tmp = strstr(szProtocol,"command");
           tmp[0] = '\0';
-          strcat(lpstrProtocol,"ddeexec");
-
-          if(RegQueryValueA( HKEY_CLASSES_ROOT, lpstrProtocol, param,&paramlen ) == ERROR_SUCCESS)
+          strcat(szProtocol,"ddeexec");
+  
+          if(RegQueryValueA(HKEY_CLASSES_ROOT,
+                            szProtocol,
+                            param,
+                            &paramlen ) == ERROR_SUCCESS)
           {
             strcat(cmd," ");
@@ -1056,42 +1086,91 @@
             cmdlen += paramlen;
           }
-
-          /* Is there a replace() function anywhere? */
-          cmd[cmdlen]='\0';
-          tok=strstr( cmd, "%1" );
-          if (tok != NULL)
+        }
+      }
+    }
+
+
+    // Second, check for filename extension association
+    if (0 == cmd[0])
+    {
+      LPSTR lpstrRDot = strrchr(lpFile, '.');
+      if (NULL != lpstrRDot)
+      {
+        char szAssociation[256];
+        LONG lAssociationLen = sizeof( szAssociation );
+
+        // lookup associated application (or COM object) for
+        // this extension
+        if (RegQueryValueA(HKEY_CLASSES_ROOT,
+                           lpstrRDot,
+                           szAssociation,
+                           &lAssociationLen) == ERROR_SUCCESS)
+        {
+          // append the shell subkey
+          strcat(szAssociation, lpstrShellSubkey);
+          lAssociationLen = sizeof( szAssociation );
+
+          // lookup application for retrieved association
+          if (RegQueryValueA(HKEY_CLASSES_ROOT,
+                             szAssociation,
+                             cmd,
+                             &cmdlen) == ERROR_SUCCESS)
           {
-            tok[0]='\0'; /* truncate string at the percent */
-            strcat( cmd, lpFile ); /* what if no dir in xlpFile? */
-            tok=strstr( cmd, "%1" );
-            if ((tok!=NULL) && (strlen(tok)>2))
-            {
-              strcat( cmd, &tok[2] );
-            }
-          }
-
-          retval = WinExec( cmd, iShowCmd );
+            // received cmd now
+          }
+        }
       }
     }
-    /* Check if file specified is in the form www.??????.*** */
-    else if(!strnicmp(lpFile,"www",3))
+      
+      
+#ifdef __WIN32OS2__
+    if (0 == cmd[0])
     {
-      /* if so, append lpFile http:// and call ShellExecute */
-      char lpstrTmpFile[256] = "http://" ;
-      strcat(lpstrTmpFile,lpFile);
-      retval = ShellExecuteA(hWnd,lpOperation,lpstrTmpFile,NULL,NULL,0);
-    }
+      // OS/2 specific addon:
+      // if no windows association is found, pass on to the workplace shell
+      // eventually.
+      retval = ShellExecuteOS2(hWnd,
+                               lpOperation,
+                               lpFile,
+                               lpParameters,
+                               lpDirectory,
+                               iShowCmd);
+    }
+#endif
+
+    if (0 != cmd[0])
+    {
+      // resolve the parameters
+      // @@@PH 2002-02-26 there might be more than one parameter only
+      /* Is there a replace() function anywhere? */
+      tok=strstr( cmd, "%1" );
+      if (tok != NULL)
+      {
+        tok[0]='\0'; /* truncate string at the percent */
+        strcat( cmd, lpFile ); /* what if no dir in xlpFile? */
+        tok=strstr( cmd, "%1" );
+        if ((tok!=NULL) && (strlen(tok)>2))
+        {
+          strcat( cmd, &tok[2] );
+        }
+      }
+    }
+
     /* Nothing was done yet, try to execute the cmdline directly,
-       maybe it's an OS/2 program */
-    else
+     maybe it's an OS/2 program */
+    if (0 == cmd[0])
     {
       strcpy(cmd,lpFile);
       strcat(cmd,lpParameters ? lpParameters : "");
-      retval = WinExec( cmd, iShowCmd );
-    }
-
-    if (lpDirectory)
-      SetCurrentDirectoryA( old_dir );
-    return retval;
+    }
+      
+    // now launch ... something :)
+    retval = WinExec( cmd, iShowCmd );
+  }
+
+  if (lpDirectory)
+    SetCurrentDirectoryA( old_dir );
+  
+  return retval;
 }
 
Index: trunk/src/shell32/shell32dbg.def
===================================================================
--- trunk/src/shell32/shell32dbg.def	(revision 8047)
+++ trunk/src/shell32/shell32dbg.def	(revision 8048)
@@ -1,3 +1,3 @@
-; $Id: shell32dbg.def,v 1.1 2002-02-14 12:10:11 sandervl Exp $
+; $Id: shell32dbg.def,v 1.2 2002-03-08 11:01:01 sandervl Exp $
 
 ; Based on Windows 95
@@ -167,5 +167,5 @@
     ILGlobalGree                      = _DbgILGlobalFree@4                       @156
     ILCreateFromPath                  = _DbgILCreateFromPathAW@4                 @157
-    PathGetExtension                  = _DbgPathGetExtensionAW@4                 @158
+    PathGetExtension                  = _DbgPathGetExtensionAW@12                @158
     PathIsDirectory                   = _DbgPathIsDirectoryAW@4                  @159
 ;   SHNetConnectionDialog             = _DbgSHNetConnectionDialog@?              @160
Index: trunk/src/shell32/shelllink.c
===================================================================
--- trunk/src/shell32/shelllink.c	(revision 8047)
+++ trunk/src/shell32/shelllink.c	(revision 8048)
@@ -118,4 +118,9 @@
 #include "poppack.h"
 
+typedef struct
+{
+        HRSRC *pResInfo;
+        int   nIndex;
+} ENUMRESSTRUCT;
 
 static ICOM_VTABLE(IShellLinkA)		slvt;
@@ -162,4 +167,15 @@
 #define _ICOM_THIS_From_IPersistStream(class, name) class* This = (class*)(((char*)name)-_IPersistStream_Offset);
 #define _IPersistStream_From_ICOM_THIS(class, name) class* StreamThis = (class*)(((char*)name)+_IPersistStream_Offset);
+
+
+/* strdup on the process heap */
+inline static LPSTR heap_strdup( LPCSTR str )
+{
+    INT len = strlen(str) + 1;
+    LPSTR p = HeapAlloc( GetProcessHeap(), 0, len );
+    if (p) memcpy( p, str, len );
+    return p;
+}
+
 
 /**************************************************************************
@@ -364,7 +380,15 @@
 static BOOL CALLBACK EnumResNameProc(HANDLE hModule, const char *lpszType, char *lpszName, LONG lParam)
 {
-    *(HRSRC *) lParam = FindResourceA(hModule, lpszName, RT_GROUP_ICONA);
-    return FALSE;
-}
+	ENUMRESSTRUCT *sEnumRes = (ENUMRESSTRUCT *) lParam;
+    
+	if (!sEnumRes->nIndex--)
+	{
+		*sEnumRes->pResInfo = FindResourceA(hModule, lpszName, RT_GROUP_ICONA);
+		return FALSE;
+	}
+	else
+		return TRUE;
+}
+
 
 static int ExtractFromEXEDLL(const char *szFileName, int nIndex, const char *szXPMFileName)
@@ -448,8 +472,16 @@
 #else
     for (i = 0; i < pIconDir->idCount; i++)
-        if ((pIconDir->idEntries[i].bHeight * pIconDir->idEntries[i].bWidth) > nMax)
+        if ((pIconDir->idEntries[i].wBitCount >= nMaxBits) && (pIconDir->idEntries[i].wBitCount <= 8))
         {
-            lpName = MAKEINTRESOURCEA(pIconDir->idEntries[i].nID);
-            nMax = pIconDir->idEntries[i].bHeight * pIconDir->idEntries[i].bWidth;
+          if (pIconDir->idEntries[i].wBitCount > nMaxBits)
+          {
+              nMaxBits = pIconDir->idEntries[i].wBitCount;
+              nMax = 0;
+          }
+          if ((pIconDir->idEntries[i].bHeight * pIconDir->idEntries[i].bWidth) > nMax)
+          {
+              lpName = MAKEINTRESOURCEA(pIconDir->idEntries[i].nID);
+              nMax = pIconDir->idEntries[i].bHeight * pIconDir->idEntries[i].bWidth;
+          }
         }
 
@@ -480,4 +512,5 @@
 
 done:
+
     FreeResource(hResData);
     FreeLibrary(hModule);
@@ -565,5 +598,5 @@
 
     if (!wine_get_unix_file_name( dos, buffer, sizeof(buffer) )) return NULL;
-    return HEAP_strdupA( GetProcessHeap(), 0, buffer );
+    return heap_strdup( buffer );
 }
 
@@ -594,5 +627,5 @@
 static char *extract_icon( const char *path, int index)
 {
-    char *filename = HEAP_strdupA( GetProcessHeap(), 0, tmpnam(NULL) );
+    char *filename = heap_strdup( tmpnam(NULL) );
     if (ExtractFromEXEDLL( path, index, filename )) return filename;
     if (ExtractFromICO( path, filename )) return filename;
@@ -602,4 +635,5 @@
 }
 #endif
+
 
 static HRESULT WINAPI IPersistFile_fnSave(IPersistFile* iface, LPCOLESTR pszFileName, BOOL fRemember)
@@ -709,10 +743,10 @@
     }
     if (!*buffer) return NOERROR;
-    shell_link_app = HEAP_strdupA( GetProcessHeap(), 0, buffer );
+    shell_link_app = heap_strdup( buffer );
 
     if (!WideCharToMultiByte( CP_ACP, 0, pszFileName, -1, buffer, sizeof(buffer), NULL, NULL))
         return ERROR_UNKNOWN;
     GetFullPathNameA( buffer, sizeof(buff2), buff2, NULL );
-    filename = HEAP_strdupA( GetProcessHeap(), 0, buff2 );
+    filename = heap_strdup( buff2 );
 
     if (SHGetSpecialFolderPathA( 0, buffer, CSIDL_STARTUP, FALSE ))
@@ -962,5 +996,5 @@
 
 	            SHGetPathFromIDListA(&lpLinkHeader->Pidl, sTemp);
-	            This->sPath = HEAP_strdupA ( GetProcessHeap(), 0, sTemp);
+	            This->sPath = heap_strdup( sTemp );
 	          }
 		  This->wHotKey = lpLinkHeader->wHotKey;
@@ -1126,5 +1160,4 @@
 	    HeapFree(GetProcessHeap(), 0, This->sArgs);
 
-
 	  if (This->sWorkDir)
 	    HeapFree(GetProcessHeap(), 0, This->sWorkDir);
@@ -1199,5 +1232,5 @@
 	if (This->sDescription)
 	    HeapFree(GetProcessHeap(), 0, This->sDescription);
-	if (!(This->sDescription = HEAP_strdupA(GetProcessHeap(), 0, pszName)))
+	if (!(This->sDescription = heap_strdup(pszName)))
 	    return E_OUTOFMEMORY;
 
@@ -1222,5 +1255,5 @@
 	if (This->sWorkDir)
 	    HeapFree(GetProcessHeap(), 0, This->sWorkDir);
-	if (!(This->sWorkDir = HEAP_strdupA(GetProcessHeap(), 0, pszDir)))
+	if (!(This->sWorkDir = heap_strdup(pszDir)))
 	    return E_OUTOFMEMORY;
 
@@ -1245,5 +1278,5 @@
 	if (This->sArgs)
 	    HeapFree(GetProcessHeap(), 0, This->sArgs);
-	if (!(This->sArgs = HEAP_strdupA(GetProcessHeap(), 0, pszArgs)))
+	if (!(This->sArgs = heap_strdup(pszArgs)))
 	    return E_OUTOFMEMORY;
 
@@ -1304,5 +1337,5 @@
 	if (This->sIcoPath)
 	    HeapFree(GetProcessHeap(), 0, This->sIcoPath);
-	if (!(This->sIcoPath = HEAP_strdupA(GetProcessHeap(), 0, pszIconPath)))
+	if (!(This->sIcoPath = heap_strdup(pszIconPath)))
 	    return E_OUTOFMEMORY;	
 	This->iIcoNdx = iIcon;
@@ -1332,5 +1365,5 @@
 	if (This->sPath)
 	    HeapFree(GetProcessHeap(), 0, This->sPath);
-	if (!(This->sPath = HEAP_strdupA(GetProcessHeap(), 0, pszFile)))
+	if (!(This->sPath = heap_strdup(pszFile)))
 	    return E_OUTOFMEMORY;
 	
Index: trunk/src/shell32/shellord.c
===================================================================
--- trunk/src/shell32/shellord.c	(revision 8047)
+++ trunk/src/shell32/shellord.c	(revision 8048)
@@ -41,4 +41,7 @@
 #include "undocshell.h"
 #endif
+#include "pidl.h"
+#include "shlwapi.h"
+#include "commdlg.h"
 
 DEFAULT_DEBUG_CHANNEL(shell);
@@ -81,5 +84,5 @@
  * ParseFieldW			[internal]
  *
- * copys a field from a ',' delimited string
+ * copies a field from a ',' delimited string
  * 
  * first field is nField = 1
@@ -106,17 +109,47 @@
  * 
  */
-BOOL WIN32API GetFileNameFromBrowse(HWND hwndOwner, LPSTR lpstrFile,
-                                    DWORD nMaxFile, LPCSTR lpstrInitialDir,
-                                    LPCSTR lpstrDefExt, LPCSTR lpstrFilter,
+BOOL WINAPI GetFileNameFromBrowse(
+	HWND hwndOwner,
+	LPSTR lpstrFile,
+	DWORD nMaxFile,
+	LPCSTR lpstrInitialDir,
+	LPCSTR lpstrDefExt,
+	LPCSTR lpstrFilter,
                                     LPCSTR lpstrTitle)
 {
-	FIXME("(%04x,%s,%ld,%s,%s,%s,%s):stub.\n",
+    HMODULE hmodule;
+    FARPROC pGetOpenFileNameA;
+    OPENFILENAMEA ofn;
+    BOOL ret;
+
+    TRACE("%04x, %s, %ld, %s, %s, %s, %s)\n",
 	  hwndOwner, lpstrFile, nMaxFile, lpstrInitialDir, lpstrDefExt,
 	  lpstrFilter, lpstrTitle);
 
-    /* puts up a Open Dialog and requests input into targetbuf */
     /* OFN_HIDEREADONLY|OFN_NOCHANGEDIR|OFN_FILEMUSTEXIST|OFN_unknown */
-    strcpy(lpstrFile,"x:\\dummy.exe");
-    return 1;
+    hmodule = LoadLibraryA("comdlg32.dll");
+    if(!hmodule) return FALSE;
+    pGetOpenFileNameA = GetProcAddress(hmodule, "GetOpenFileNameA");
+    if(!pGetOpenFileNameA)
+    {
+	FreeLibrary(hmodule);
+	return FALSE;
+    }
+
+    memset(&ofn, 0, sizeof(ofn));
+
+    ofn.lStructSize = sizeof(ofn);
+    ofn.hwndOwner = hwndOwner;
+    ofn.lpstrFilter = lpstrFilter;
+    ofn.lpstrFile = lpstrFile;
+    ofn.nMaxFile = nMaxFile;
+    ofn.lpstrInitialDir = lpstrInitialDir;
+    ofn.lpstrTitle = lpstrTitle;
+    ofn.lpstrDefExt = lpstrDefExt;
+    ofn.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_FILEMUSTEXIST;
+    ret = pGetOpenFileNameA(&ofn);
+    
+    FreeLibrary(hmodule);
+    return ret;
 }
 
@@ -348,5 +381,5 @@
 #endif
   
-#if __WIN32OS2_
+#if __WIN32OS2__
   HEAP_free(x);
 #else
@@ -1030,5 +1063,5 @@
 	  /* the commandline contains 'c:\Path\wordpad.exe "%1"' */
 	  HCR_GetExecuteCommand(sei->lpClass, (sei->lpVerb) ? sei->lpVerb : "open", szCommandline, sizeof(szCommandline));
-	  /* fixme: get the extension of lpFile, check if it fits to the lpClass */
+	  /* FIXME: get the extension of lpFile, check if it fits to the lpClass */
 	  TRACE("SEE_MASK_CLASSNAME->'%s'\n", szCommandline);
 	}
@@ -1064,6 +1097,8 @@
 	TRACE("execute:'%s','%s'\n",szApplicationName, szCommandline);
 
-	strcat(szApplicationName, " ");
-	strcat(szApplicationName, szCommandline);
+	if (szCommandline[0]) {
+		strcat(szApplicationName, " ");
+		strcat(szApplicationName, szCommandline);
+	}
 
 	ZeroMemory(&startup,sizeof(STARTUPINFOA));
@@ -1072,5 +1107,6 @@
 	if (! CreateProcessA(NULL, szApplicationName,
 			 NULL, NULL, FALSE, 0, 
-			 NULL, NULL, &startup, &info))
+			 NULL, sei->lpDirectory, 
+			&startup, &info))
 	{
 	  sei->hInstApp = GetLastError();
@@ -1263,6 +1299,6 @@
  *  parameter1 is return value from SHAllocShared
  *  parameter2 is return value from GetCurrentProcessId
- *  the receiver of (WM_USER+2) trys to lock the HANDLE (?) 
- *  the returnvalue seems to be a memoryadress
+ *  the receiver of (WM_USER+2) tries to lock the HANDLE (?) 
+ *  the return value seems to be a memory address
  */
 LPVOID WINAPI SHLockShared(HANDLE hmem, DWORD procID)
Index: trunk/src/shell32/shellpath.c
===================================================================
--- trunk/src/shell32/shellpath.c	(revision 8047)
+++ trunk/src/shell32/shellpath.c	(revision 8048)
@@ -123,5 +123,5 @@
  * PathGetExtensionAW		[SHELL32.158]
  */
-LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath) 
+LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath, DWORD void1, DWORD void2) 
 {
 	if (SHELL_OsIsUnicode())
@@ -824,8 +824,8 @@
 	"PrintHood"
     },
-    { /* CSIDL_LOCAL_APPDATA */
-	0, 0, /* FIXME */
-	NULL,
-	NULL,
+    { /* CSIDL_LOCAL_APPDATA (win2k only/undocumented) */
+	1, HKCU, 
+	"Local AppData",
+	"Local Settings\\Application Data",
     },
     { /* CSIDL_ALTSTARTUP */
Index: trunk/src/shell32/shellstring.c
===================================================================
--- trunk/src/shell32/shellstring.c	(revision 8047)
+++ trunk/src/shell32/shellstring.c	(revision 8048)
@@ -6,17 +6,94 @@
 #include "winnls.h"
 #include "winerror.h"
-#include "debugtools.h"
-#include "heap.h"
+#include "winreg.h"
 
 #include "shlobj.h"
-#include "shlwapi.h"
 #include "shellapi.h"
 #include "shell32_main.h"
 #include "wine/undocshell.h"
 #include "wine/unicode.h"
+#include "debugtools.h"
 
 DEFAULT_DEBUG_CHANNEL(shell);
 
 /************************* STRRET functions ****************************/
+
+/*
+ * ***** NOTE *****
+ *  These routines are identical to StrRetToBuf[AW] in dlls/shlwapi/string.c.
+ *  They were duplicated here because not every version of Shlwapi.dll exports
+ *  StrRetToBuf[AW]. If you change one routine, change them both. YOU HAVE BEEN
+ *  WARNED.
+ * ***** NOTE *****
+ */
+
+HRESULT WINAPI StrRetToStrNA (LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)
+{
+	TRACE("dest=0x%p len=0x%lx strret=0x%p pidl=%p stub\n",dest,len,src,pidl);
+
+	switch (src->uType)
+	{
+	  case STRRET_WSTR:
+	    WideCharToMultiByte(CP_ACP, 0, src->u.pOleStr, -1, (LPSTR)dest, len, NULL, NULL);
+/*	    SHFree(src->u.pOleStr);  FIXME: is this right? */
+	    break;
+
+	  case STRRET_CSTRA:
+	    lstrcpynA((LPSTR)dest, src->u.cStr, len);
+	    break;
+
+	  case STRRET_OFFSETA:
+	    lstrcpynA((LPSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len);
+	    break;
+
+	  default:
+	    FIXME("unknown type!\n");
+	    if (len)
+	    {
+	      *(LPSTR)dest = '\0';
+	    }
+	    return(FALSE);
+	}
+	return S_OK;
+}
+
+/************************************************************************/
+
+HRESULT WINAPI StrRetToStrNW (LPVOID dest1, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)
+{
+    LPWSTR dest = (LPWSTR) dest1;
+	TRACE("dest=0x%p len=0x%lx strret=0x%p pidl=%p stub\n",dest,len,src,pidl);
+
+	switch (src->uType)
+	{
+	  case STRRET_WSTR:
+	    lstrcpynW((LPWSTR)dest, src->u.pOleStr, len);
+/*	    SHFree(src->u.pOleStr);  FIXME: is this right? */
+	    break;
+
+	  case STRRET_CSTRA:
+              if (!MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, dest, len ) && len)
+                  dest[len-1] = 0;
+	    break;
+
+	  case STRRET_OFFSETA:
+	    if (pidl)
+	    {
+              if (!MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset, -1,
+                                        dest, len ) && len)
+                  dest[len-1] = 0;
+	    }
+	    break;
+
+	  default:
+	    FIXME("unknown type!\n");
+	    if (len)
+	    { *(LPSTR)dest = '\0';
+	    }
+	    return(FALSE);
+	}
+	return S_OK;
+}
+
 
 /*************************************************************************
@@ -28,14 +105,4 @@
  *  the pidl is for STRRET OFFSET
  */
-HRESULT WINAPI StrRetToStrNA (LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)
-{
-        return StrRetToBufA( src, pidl, dest, len );
-}
-
-HRESULT WINAPI StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)
-{
-        return StrRetToBufW( src, pidl, dest, len );
-}
-
 HRESULT WINAPI StrRetToStrNAW (LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)
 {
@@ -127,2 +194,42 @@
 	return OleStrToStrNA (lpOut, nOut, lpIn, nIn);
 }
+
+
+/*************************************************************************
+ * CheckEscapes [SHELL32]
+ */
+DWORD WINAPI CheckEscapesA(
+    LPSTR    string,         /* [in]    string to check ??*/
+           DWORD    b,              /* [???]   is 0 */
+           DWORD    c,              /* [???]   is 0 */
+           LPDWORD  d,              /* [???]   is address */
+           LPDWORD  e,              /* [???]   is address */
+           DWORD    handle )        /* [in]    looks like handle but not */
+{
+    FIXME("(%p<%s> %ld %ld %p<%ld> %p<%ld> 0x%08lx) stub\n",
+   string, debugstr_a(string),
+   b,
+   c,
+   d, (d) ? *d : 0xabbacddc,
+   e, (e) ? *e : 0xabbacddd,
+   handle);
+    return 0;
+}
+
+DWORD WINAPI CheckEscapesW(
+    LPWSTR   string,         /* [in]    string to check ??*/
+           DWORD    b,              /* [???]   is 0 */
+           DWORD    c,              /* [???]   is 0 */
+           LPDWORD  d,              /* [???]   is address */
+           LPDWORD  e,              /* [???]   is address */
+           DWORD    handle )        /* [in]    looks like handle but not */
+{
+    FIXME("(%p<%s> %ld %ld %p<%ld> %p<%ld> 0x%08lx) stub\n",
+   string, debugstr_w(string),
+   b,
+   c,
+   d, (d) ? *d : 0xabbacddc,
+   e, (e) ? *e : 0xabbacddd,
+   handle);
+    return 0;
+}
Index: trunk/src/shell32/shlfolder.c
===================================================================
--- trunk/src/shell32/shlfolder.c	(revision 8047)
+++ trunk/src/shell32/shlfolder.c	(revision 8048)
@@ -1537,5 +1537,5 @@
 	    if (! SHELL_DeleteDirectoryA(szPath, bConfirm))
 	    {
-              TRACE("delete %s failed, bConfirm=%d", szPath, bConfirm);
+              TRACE("delete %s failed, bConfirm=%d\n", szPath, bConfirm);
 	      return E_FAIL;
 	    }
@@ -1551,5 +1551,5 @@
 	    if (! SHELL_DeleteFileA(szPath, bConfirm))
 	    {
-              TRACE("delete %s failed, bConfirm=%d", szPath, bConfirm);
+              TRACE("delete %s failed, bConfirm=%d\n", szPath, bConfirm);
 	      return E_FAIL;
 	    }
@@ -1566,5 +1566,5 @@
  * ISFHelper_fnCopyItems
  *
- * copys items to this folder
+ * copies items to this folder
  */
 static HRESULT WINAPI ISFHelper_fnCopyItems(
@@ -1721,5 +1721,5 @@
 	if (pchEaten) *pchEaten = 0;	/* strange but like the original */
 	
-	/* fixme no real parsing implemented */
+	/* FIXME no real parsing implemented */
 	pidlTemp = _ILCreateMyComputer();
 	szNext = lpszDisplayName;
@@ -1778,4 +1778,5 @@
 	GUID		const * clsid;
 	IShellFolder	*pShellFolder, *pSubFolder;
+	HRESULT		hr;
 	
 	TRACE("(%p)->(pidl=%p,%p,\n\tIID:\t%s,%p)\n",
@@ -1824,15 +1825,16 @@
 	{
 	  *ppvOut = pShellFolder;
+	  hr = S_OK;
 	}
 	else				/* go deeper */
 	{
-	  IShellFolder_BindToObject(pShellFolder, ILGetNext(pidl), NULL, riid, (LPVOID)&pSubFolder);
+	  hr = IShellFolder_BindToObject(pShellFolder, ILGetNext(pidl), NULL, riid, (LPVOID)&pSubFolder);
 	  IShellFolder_Release(pShellFolder);
 	  *ppvOut = pSubFolder;
 	}
 
-	TRACE("-- (%p) returning (%p)\n",This, *ppvOut);
-
-	return S_OK;
+	TRACE("-- (%p) returning (%p) %08lx\n",This, *ppvOut, hr);
+
+	return hr;
 }
 
@@ -2220,4 +2222,5 @@
 	IShellFolder	*pShellFolder, *pSubFolder;
 	LPITEMIDLIST	pidltemp;
+	HRESULT		hr;
 	
 	TRACE("(%p)->(pidl=%p,%p,\n\tIID:\t%s,%p)\n",
@@ -2247,15 +2250,17 @@
 	{
 	  *ppvOut = pShellFolder;
+	  hr = S_OK;
 	}
 	else				/* go deeper */
 	{
-	  IShellFolder_BindToObject(pShellFolder, ILGetNext(pidl), NULL, &IID_IShellFolder, (LPVOID)&pSubFolder);
+	  hr = IShellFolder_BindToObject(pShellFolder, ILGetNext(pidl), NULL,
+					 riid, (LPVOID)&pSubFolder);
 	  IShellFolder_Release(pShellFolder);
 	  *ppvOut = pSubFolder;
 	}
 
-	TRACE("-- (%p) returning (%p)\n",This, *ppvOut);
-
-	return S_OK;
+	TRACE("-- (%p) returning (%p) %08lx\n",This, *ppvOut, hr);
+
+	return hr;
 }
 
Index: trunk/src/shell32/shlview.c
===================================================================
--- trunk/src/shell32/shlview.c	(revision 8047)
+++ trunk/src/shell32/shlview.c	(revision 8048)
@@ -139,5 +139,5 @@
 typedef void (* CALLBACK PFNSHGETSETTINGSPROC)(LPSHELLFLAGSTATE lpsfs, DWORD dwMask);
 #else
-typedef void CALLBACK (*PFNSHGETSETTINGSPROC)(LPSHELLFLAGSTATE lpsfs, DWORD dwMask);
+typedef void (CALLBACK *PFNSHGETSETTINGSPROC)(LPSHELLFLAGSTATE lpsfs, DWORD dwMask);
 #endif
 
@@ -536,5 +536,5 @@
 	  ListView_SetItemA(This->hWndList, &lvItem);
 	  ListView_Update(This->hWndList, nItem);
-	  return TRUE;					/* fixme: better handling */
+	  return TRUE;					/* FIXME: better handling */
 	}
 	return FALSE;
@@ -1152,5 +1152,6 @@
 	
 	  case LVN_GETDISPINFOA:
-	    TRACE("-- LVN_GETDISPINFOA %p\n",This);
+	  case LVN_GETDISPINFOW:
+	    TRACE("-- LVN_GETDISPINFO %p\n",This);
 	    pidl = (LPITEMIDLIST)lpdi->item.lParam;
 
@@ -1161,6 +1162,14 @@
 	        SHELLDETAILS sd;
 	        IShellFolder2_GetDetailsOf(This->pSF2Parent, pidl, lpdi->item.iSubItem, &sd);
+                if (lpnmh->code == LVN_GETDISPINFOA)
+                {
 	        StrRetToStrNA( lpdi->item.pszText, lpdi->item.cchTextMax, &sd.str, NULL);
 	        TRACE("-- text=%s\n",lpdi->item.pszText);		
+	      }
+                else /* LVN_GETDISPINFOW */
+                {
+                    StrRetToStrNW( lpdi->item.pszText, lpdi->item.cchTextMax, &sd.str, NULL);
+                    TRACE("-- text=%s\n",debugstr_w((WCHAR*)(lpdi->item.pszText)));
+                }
 	      }
 	      else
@@ -1559,5 +1568,5 @@
 	if ((lpmsg->message>=WM_KEYFIRST) && (lpmsg->message>=WM_KEYLAST))
 	{
-	  TRACE("-- key=0x04%x",lpmsg->wParam) ;
+	  TRACE("-- key=0x04%x\n",lpmsg->wParam) ;
 	}
 	return S_FALSE; /* not handled */
Index: trunk/src/shell32/shpolicy.c
===================================================================
--- trunk/src/shell32/shpolicy.c	(revision 8047)
+++ trunk/src/shell32/shpolicy.c	(revision 8048)
@@ -18,9 +18,11 @@
 
 #include "windef.h"
-#include "wingdi.h"
 #include "winerror.h"
 #include "winreg.h"
+
+#include "wine/undocshell.h"
+#include "wine/winuser16.h"
+
 #include "debugtools.h"
-#include "wine/winuser16.h"
 
 DEFAULT_DEBUG_CHANNEL(shell);
Index: trunk/src/shell32/shresdef.h
===================================================================
--- trunk/src/shell32/shresdef.h	(revision 8047)
+++ trunk/src/shell32/shresdef.h	(revision 8048)
@@ -1,3 +1,3 @@
-/* $Id: shresdef.h,v 1.9 2001-04-23 10:47:23 sandervl Exp $ */
+/* $Id: shresdef.h,v 1.10 2002-03-08 11:01:03 sandervl Exp $ */
 
 /*
@@ -31,4 +31,9 @@
 #define IDS_SHV_COLUMN3DV       12
 #define IDS_SHV_COLUMN4DV       13
+
+#ifndef __WIN32OS2__
+#define IDS_DESKTOP		20
+#define IDS_MYCOMPUTER		21
+#endif
 
 #define IDS_SELECT              22
Index: trunk/src/shell32/shv_bg_cmenu.c
===================================================================
--- trunk/src/shell32/shv_bg_cmenu.c	(revision 8047)
+++ trunk/src/shell32/shv_bg_cmenu.c	(revision 8048)
@@ -236,5 +236,5 @@
 	      {
 	        ISFHelper_CopyItems(psfhlpdst, psfFrom, lpcida->cidl, apidl);
-		/* fixme handle move 
+		/* FIXME handle move 
 		ISFHelper_DeleteItems(psfhlpsrc, lpcida->cidl, apidl);
 		*/
Index: trunk/src/shell32/shv_item_cmenu.c
===================================================================
--- trunk/src/shell32/shv_item_cmenu.c	(revision 8047)
+++ trunk/src/shell32/shv_item_cmenu.c	(revision 8048)
@@ -338,5 +338,5 @@
  * DoCopyOrCut
  *
- * copys the currently selected items into the clipboard
+ * copies the currently selected items into the clipboard
  */
 static BOOL DoCopyOrCut(
