Index: trunk/src/shell32/makefile
===================================================================
--- trunk/src/shell32/makefile	(revision 181)
+++ trunk/src/shell32/makefile	(revision 183)
@@ -1,3 +1,3 @@
-# $Id: makefile,v 1.6 1999-06-23 22:19:05 phaller Exp $
+# $Id: makefile,v 1.7 1999-06-24 19:27:48 phaller Exp $
 
 #
@@ -21,5 +21,6 @@
 TARGET = shell32
 
-OBJS =  shell32.obj sh.obj she.obj drag.obj initterm.obj misc.obj ordinal.obj unknown.obj
+OBJS =  shell32.obj sh.obj she.obj drag.obj initterm.obj \
+        misc.obj ordinal.obj unknown.obj path.obj
 
 all: $(TARGET).dll $(TARGET).lib
@@ -53,4 +54,6 @@
 unknown.obj: unknown.cpp shell32.h
 
+path.obj: path.cpp shell32.h
+
 initterm.obj: initterm.cpp
 
Index: trunk/src/shell32/misc.cpp
===================================================================
--- trunk/src/shell32/misc.cpp	(revision 181)
+++ trunk/src/shell32/misc.cpp	(revision 183)
@@ -1,3 +1,3 @@
-/* $Id: misc.cpp,v 1.1 1999-06-23 22:17:52 phaller Exp $ */
+/* $Id: misc.cpp,v 1.2 1999-06-24 19:27:48 phaller Exp $ */
 
 /*
@@ -17,4 +17,7 @@
 #include <os2win.h>
 #include <shellapi.h>
+#include <wchar.h>
+#include <wcstr.h>
+#include <winnls.h>
 #include "shell32.h"
 #include <misc.h>
@@ -352,2 +355,753 @@
 }
 
+
+/*****************************************************************************
+ * Name      : ParseField
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.58
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+DWORD WIN32API ParseFieldA(LPCSTR src,
+                           DWORD  field,
+                           LPSTR  dst,
+                           DWORD  len)
+{
+  dprintf(("SHELL32: ParseFieldA(%s,%08xh,%08xh,%08xh) not correctly implemented.\n",
+           src,
+           field,
+           dst,
+           len));
+
+  if (!src || !src[0] || !dst || !len)
+    return 0;
+
+  if (field >1)
+  {
+    field--;
+    while (field)
+    {
+      if (*src==0x0) return FALSE;
+      if (*src==',') field--;
+      src++;
+    }
+  }
+
+  while (*src!=0x00 && *src!=',' && len>0)
+  {
+    *dst=*src; dst++, src++; len--;
+  }
+  *dst=0x0;
+  return TRUE;
+}
+
+
+/*****************************************************************************
+ * Name      : PickIconDlg
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.62
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+DWORD WIN32API PickIconDlg(DWORD x,DWORD y,DWORD z,DWORD a)
+{
+  dprintf(("SHELL32: PickIconDlg(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
+           x,
+           y,
+           z,
+           a));
+
+  return 0xffffffff;
+}
+
+
+/*****************************************************************************
+ * Name      : GetFileNameFromBrowse
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.63
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+DWORD WIN32API GetFileNameFromBrowse(HWND   howner,
+                                     LPSTR  targetbuf,
+                                     DWORD  len,
+                                     DWORD  x,
+                                     LPCSTR suffix,
+                                     LPCSTR y,
+                                     LPCSTR cmd)
+{
+  dprintf(("SHELL32: GetFileNameFromBrowse(%08xh,  %08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
+           howner,
+           targetbuf,
+           len,
+           x,
+           suffix,
+           y,
+           cmd));
+
+  /* puts up a Open Dialog and requests input into targetbuf */
+  /* OFN_HIDEREADONLY|OFN_NOCHANGEDIR|OFN_FILEMUSTEXIST|OFN_unknown */
+  strcpy(targetbuf,
+         "x:\\dummy.exe");
+
+  return 1;
+}
+
+
+/*****************************************************************************
+ * Name      : OleStrToStrN
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.78
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+BOOL WIN32API OleStrToStrN (LPSTR   lpMulti,
+                            INT     nMulti,
+                            LPCWSTR lpWide,
+                            INT     nWide)
+{
+  dprintf(("SHELL32: OleStrToStrN(%08xh,%08xh,%08xh,%08xh)\n",
+           lpMulti,
+           nMulti,
+           lpWide,
+           nWide));
+
+  return WideCharToMultiByte (0,
+                              0,
+                              lpWide,
+                              nWide,
+                              lpMulti,
+                              nMulti,
+                              NULL,
+                              NULL);
+}
+
+
+/*****************************************************************************
+ * Name      : StrToOleStrN
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.79
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+BOOL WIN32API StrToOleStrN (LPWSTR lpWide,
+                            INT    nWide,
+                            LPCSTR lpMulti,
+                            INT    nMulti)
+{
+  dprintf(("SHELL32: StrToOleStrN(%08xh,%08xh,%08xh,%08xh)\n",
+           lpWide,
+           nWide,
+           lpMulti,
+           nMulti));
+
+  return MultiByteToWideChar (0,
+                              0,
+                              lpMulti,
+                              nMulti,
+                              lpWide,
+                              nWide);
+}
+
+
+/*****************************************************************************
+ * Name      : RegisterShellHook
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.181
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *
+ * PARAMS
+ *      hwnd [I]  window handle
+ *      y    [I]  flag ????
+ *
+ * NOTES
+ *     exported by ordinal
+ */
+
+void WIN32API RegisterShellHook(HWND  hwnd,
+                                DWORD y)
+{
+  dprintf(("SHELL32: RegisterShellHook(%08xh, %08xh) not implemented.\n",
+           hwnd,
+           y));
+}
+
+
+/*****************************************************************************
+ * Name      : RunFileDlg
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.61
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+DWORD WIN32API RunFileDlg (HWND  hwndOwner,
+                           DWORD dwParam1,
+                           DWORD dwParam2,
+                           LPSTR lpszTitle,
+                           LPSTR lpszPrompt,
+                           UINT  uFlags)
+{
+  dprintf(("SHELL32: RunFileDlg(%08xh,%08xh,%08xh,%s,%s,%08xh) not implemented.\n",
+           hwndOwner,
+           dwParam1,
+           dwParam2,
+           lpszTitle,
+           lpszPrompt,
+           uFlags));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : ExitWindowsDialog
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.60
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+void WIN32API ExitWindowsDialog (HWND hWndOwner)
+{
+  dprintf(("SHELL32: ExitWindowsDialog(%08xh)\n",
+           hWndOwner));
+
+   if (MessageBoxA(hWndOwner,
+                   "Do you want to exit ODIN?",
+                   "Shutdown",
+                   MB_YESNO|MB_ICONQUESTION)
+       == IDOK)
+   {
+     SendMessageA (hWndOwner,
+                   WM_QUIT,
+                   0,
+                   0);
+   }
+}
+
+
+/*****************************************************************************
+ * Name      : ArrangeWindows
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.184
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+DWORD WIN32API ArrangeWindows (DWORD dwParam1,
+                               DWORD dwParam2,
+                               DWORD dwParam3,
+                               DWORD dwParam4,
+                               DWORD dwParam5)
+{
+  dprintf(("SHELL32: ArrangeWindows(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
+           dwParam1,
+           dwParam2,
+           dwParam3,
+           dwParam4,
+           dwParam5));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : SignalFileOpen
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.103
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+DWORD WIN32API SignalFileOpen (DWORD dwParam1)
+{
+  dprintf(("SHELL32: SignalFileOpen(%08xh) not implemented.\n",
+           dwParam1));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : DAD_ShowDrawImage
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.137
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+HRESULT WIN32API DAD_ShowDragImage (DWORD u)
+{
+  dprintf(("SHELL32: DAD_ShowDragImage(%08xh) not implemented.\n",
+           u));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : ReadCabinetState
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.651
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+HRESULT WIN32API ReadCabinetState(DWORD u,
+                                  DWORD v)
+{
+  dprintf(("SHELL32: ReadCabinetState(%08xh, %08xh) not implemented.\n",
+           u,
+           v));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : WriteCabinetState
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.652
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+HRESULT WIN32API WriteCabinetState(DWORD u)
+{
+  dprintf(("SHELL32: WriteCabinetState(%08xh) not implemented.\n",
+           u));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : FileIconInit
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.660
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+BOOL WIN32API FileIconInit(BOOL bFullInit)
+{
+  dprintf(("SHELL32: FileIconInit(%08xh) not implemented.\n",
+           bFullInit));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : IsUserAdmin
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.680
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+HRESULT WIN32API IsUserAdmin(void)
+{
+  dprintf(("SHELL32: IsUserAdmin() not implmented. Yes, user is admin ;-)\n"));
+
+  return TRUE;
+}
+
+
+/*****************************************************************************
+ * Name      : StrRetToStrN
+ * Purpose   : converts a STRRET to a normal string
+ * Parameters: the pidl is for STRRET OFFSET
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.96
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+HRESULT WIN32API StrRetToStrN (LPVOID       dest,
+                               DWORD        len,
+                               LPSTRRET     src,
+                               LPITEMIDLIST pidl)
+{
+  dprintf(("SHELL32: StrRetToStrN(%08xh,%08xh,%08xh,%08xh) not implemented.\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);
+      break;
+
+    case STRRET_CSTRA:
+      //if (VERSION_OsIsUnicode())
+      //  lstrcpynAtoW((LPWSTR)dest, src->u.cStr, len);
+      //else
+        strncpy((LPSTR)dest,
+                src->u.cStr,
+                len);
+      break;
+
+    case STRRET_OFFSETA:
+      if (pidl)
+      {
+        //if(VERSION_OsIsUnicode())
+        //  lstrcpynAtoW((LPWSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len);
+        //else
+          strncpy((LPSTR)dest,
+                  ((LPCSTR)&pidl->mkid)+src->u.uOffset,
+                  len);
+        break;
+      }
+
+    default:
+      dprintf(("SHELL32: StrRetToStrN: unknown type!\n"));
+
+      if (len)
+        *(LPSTR)dest = '\0';
+
+      return(FALSE);
+  }
+  return(TRUE);
+}
+
+/*****************************************************************************
+ * Name      : StrChrW
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.651
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+LPWSTR WIN32API StrChrW (LPWSTR str,
+                         WCHAR  x)
+{
+  dprintf (("SHELL32: StrChrW(%08xh, %08xh)\n",
+            str,
+            x));
+
+  return ((LPWSTR)wcschr((const wchar_t*)str,
+                         x));
+}
+
+
+/*****************************************************************************
+ * Name      : StrChrNIW
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.?
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+INT WIN32API StrCmpNIW (LPWSTR wstr1,
+                        LPWSTR wstr2,
+                        INT    len)
+{
+  dprintf(("SHELL32: StrCmpNIW(%08xh,%08xh,%08xh) not correctly implemented.\n",
+           wstr1,
+           wstr2,
+           len));
+
+  return (wcsncmp((const wchar_t*)wstr1,
+                  (const wchar_t*)wstr2,
+                  len));
+}
+
+
+/*****************************************************************************
+ * Name      : DriveType
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.64
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+HRESULT WIN32API DriveType(DWORD u)
+{
+  dprintf(("SHELL32: DriveType(%08xh) not implemented.\n",
+           u));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : StrRChrW
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.320, wcsrchr does not work?
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+LPWSTR WIN32API StrRChrW(LPWSTR lpStart,
+                         LPWSTR lpEnd,
+                         DWORD  wMatch)
+{
+  LPWSTR wptr=NULL;
+
+  dprintf(("SHELL32: StrRChrW(%08xh,%08xh,%08xh)\n",
+           lpStart,
+           lpEnd,
+           wMatch));
+
+  /* if the end not given, search*/
+  if (!lpEnd)
+  {
+    lpEnd=lpStart;
+    while (*lpEnd)
+      lpEnd++;
+  }
+
+  do
+  {
+    if (*lpStart==(WCHAR)wMatch)
+      wptr = lpStart;
+    lpStart++;
+  }
+  while ( lpStart<=lpEnd );
+  return wptr;
+}
+
+
+/*****************************************************************************
+ * Name      : Control_FillCache_RunDLL
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.8
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+HRESULT WIN32API Control_FillCache_RunDLL(HWND   hWnd,
+                                          HANDLE hModule,
+                                          DWORD  w,
+                                          DWORD  x)
+{
+  dprintf(("SHELL32: Control_FillCache_RunDLL(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
+           hWnd,
+           hModule,
+           w,
+           x));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : RunDLL_CallEntry16
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.122 - the name is propably wrong
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+HRESULT WIN32API RunDLL_CallEntry16(DWORD v,
+                                    DWORD w,
+                                    DWORD x,
+                                    DWORD y,
+                                    DWORD z)
+{
+  dprintf(("SHELL32: RunDLL_CallEntry16(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
+           v,
+           w,
+           x,
+           y,
+           z));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : SHELL32_654
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.654
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+HRESULT WIN32API SHELL32_654 (DWORD x,
+                              DWORD y)
+{
+  dprintf(("SHELL32: SHELL32_654(%08xh,%08xh) not implemented.\n",
+           x,
+           y));
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : RLBuildListOfPaths
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.146 - builds a DPA
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+DWORD WIN32API RLBuildListOfPaths ()
+{
+  dprintf(("SHELL32: RLBuildListOfPaths() not implemented.\n"));
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : StrToOleStr
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.163
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+int WIN32API StrToOleStr (LPWSTR lpWideCharStr,
+                          LPCSTR lpMultiByteString)
+{
+  dprintf(("SHELL32: StrToOleStr(%08xh,%08xh)\n",
+           lpWideCharStr,
+           lpMultiByteString));
+
+  return MultiByteToWideChar(0,
+                             0,
+                             lpMultiByteString,
+                             -1,
+                             lpWideCharStr,
+                             MAX_PATH);
+}
+
+
+/*****************************************************************************
+ * Name      : SetAppStartingCursor
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.99
+ * Status    : UNTESTED UNKNOWN STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+HRESULT WIN32API SetAppStartingCursor(HWND  u,
+                                      DWORD v)
+{
+  dprintf(("SHELL32: SetAppStartingCursor (SHELL32.99): (%08xh,%08xh) not implemented.\n",
+           u,
+           v));
+
+  return 0;
+}
+
Index: trunk/src/shell32/ordinal.cpp
===================================================================
--- trunk/src/shell32/ordinal.cpp	(revision 181)
+++ trunk/src/shell32/ordinal.cpp	(revision 183)
@@ -1,3 +1,3 @@
-/* $Id: ordinal.cpp,v 1.2 1999-06-24 09:02:07 phaller Exp $ */
+/* $Id: ordinal.cpp,v 1.3 1999-06-24 19:27:49 phaller Exp $ */
 
 /*
@@ -17,5 +17,4 @@
 #include <shellapi.h>
 #include <winreg.h>
-#include "shell32.h"
 
 #include <stdarg.h>
@@ -24,8 +23,13 @@
 #include <stdlib.h>
 #include <string.h>
+#include <wchar.h>
+#include <wcstr.h>
 
 #include <misc.h>
 #include <nameid.h>
 #include <unicode.h>
+#include <winnls.h>
+
+#include "shell32.h"
 
 
@@ -36,34 +40,13 @@
 
 /*************************************************************************
- *           SHELL32_2              [SHELL32.2]
- */
-DWORD WIN32API SHELL32_2(HWND hwnd,
-                            DWORD x2,
-                            DWORD x3,
-                            DWORD x4,
-                            DWORD x5,
-                            DWORD x6)
-{
-  dprintf(("SHELL32: .2 (0x%04x,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx) not implemented.\n",
-           hwnd,
-           x2,
-           x3,
-           x4,
-           x5,
-           x6));
-  return 0;
-}
-
-
-/*************************************************************************
  *           SHELL32_16             [SHELL32.16]
  * find_lastitem_in_itemidlist()
  */
-LPSHITEMID WIN32API SHELL32_16(LPITEMIDLIST iil)
+LPSHITEMID WIN32API ILFindLastID(LPITEMIDLIST iil)
 {
   LPSHITEMID lastsii,
              sii;
 
-  dprintf(("SHELL32: .16 (%08xh)\n",
+  dprintf(("SHELL32: ILFindLastID (%08xh)\n",
            iil));
 
@@ -85,425 +68,70 @@
 
 /*************************************************************************
- *           SHELL32_29             [SHELL32.29]
- * is_rootdir(const char*path)
- */
-BOOL WIN32API SHELL32_29(LPCSTR x)
-{
-  dprintf(("SHELL32: .29 (%s)\n",
+ *           SHELL32_71             [SHELL32.71]
+ * returns internal shell values in the passed pointers
+ */
+BOOL WIN32API Shell_GetImageList(LPDWORD x,
+                                 LPDWORD y)
+{
+  dprintf(("SHELL32: Shell_GetImageList (%08xh, %08xh) not implemented.\n",
+           x,
+           y));
+
+  return TRUE;
+}
+
+
+/*************************************************************************
+ *           SHELL32_72             [SHELL32.72]
+ * dunno. something with icons
+ */
+void WIN32API Shell_GetCachedImageIndex(LPSTR x,
+                                        DWORD y,
+                                        DWORD z)
+{
+  dprintf (("SHELL32: Shell_GetCachedImageIndex (%08xh, %08xh, %08xh) not implemented.\n",
+            x,
+            y,
+            z));
+}
+
+
+/*************************************************************************
+ *           SHELL32_89             [SHELL32.89]
+ */
+DWORD WIN32API SHCloneSpecialIDList(DWORD x1,
+                                    DWORD x2,
+                                    DWORD x3)
+{
+  dprintf(("SHELL32: SHCloneSpecialIDList (%08xh, %08xh, %08xh) not implemented.\n",
+           x1,
+           x2,
+           x3));
+
+  return 0;
+}
+
+
+/*************************************************************************
+ *              SHELL32_119 [SHELL32.119]
+ * unknown
+ */
+BOOL WIN32API IsLFNDrive(LPVOID x)
+{
+  dprintf(("SHELL32: IsLFNDrive (%08xh) not implemented.\n",
            x));
 
-
-  if (!lstrcmpA(x+1,":\\"))      /* "X:\" */
-    return 1;
-
-  if (!lstrcmpA(x,"\\"))     /* "\" */
-    return 1;
-
-  if (x[0]=='\\' && x[1]=='\\')
-  {     /* UNC "\\<xx>\" */
-    int foundbackslash = 0;
-
-    x=x+2;
-    while (*x)
-    {
-      if (*x++=='\\')
-        foundbackslash++;
-    }
-
-    if (foundbackslash<=1)  /* max 1 \ more ... */
-      return 1;
-  }
-  return 0;
-}
-
-
-/*************************************************************************
- *           SHELL32_30             [SHELL32.30]
- * get_rootdir(char*path,int drive)
- */
-LPSTR WIN32API SHELL32_30(LPSTR root,
-                             BYTE drive)
-{
-  dprintf(("SHELL32: .30 (%s, %u)\n",
-           root,
-           drive));
-
-
-  strcpy(root,
-         "A:\\");
-  root[0]+=drive;
-
-  return root;
-}
-
-
-/*************************************************************************
- *                  SHELL32_31      [SHELL32.31]
- * returns pointer to last . in last pathcomponent or at \0.
- */
-LPSTR WIN32API SHELL32_31(LPSTR path)
-{
-  LPSTR   lastpoint = NULL;
-
-  dprintf(("SHELL32: .31 (%s)\n",
-           path));
-
-
-  while (*path)
-  {
-    if (*path=='\\'||*path==' ')
-      lastpoint=NULL;
-
-    if (*path=='.')
-      lastpoint=path;
-
-    path++;
-  }
-
-  return lastpoint ? lastpoint : path;
-}
-
-
-/*************************************************************************
- *              SHELL32_32  [SHELL32.32]
- * append \ if there is none
- */
-LPSTR WIN32API SHELL32_32(LPSTR path)
-{
-  int len;
-
-  dprintf(("SHELL32: .31 (%s)\n",
-           path));
-
-
-  len = lstrlenA(path);
-
-  if (len && path[len-1]!='\\')
-  {
-    path[len+0]='\\';
-    path[len+1]='\0';
-    return path+len+1;
-  }
-  else
-    return path+len;
-}
-
-
-/*************************************************************************
- *              SHELL32_33      [SHELL32.33]
- * remove spaces from beginning and end of passed string
- */
-LPSTR WIN32API SHELL32_33(LPSTR str)
-{
-  LPSTR x = str;
-
-  dprintf(("SHELL32: .33 (%s)\n",
-           str));
-
-
-  while (*x==' ')
-    x++;
-
-  if (x!=str)
-    lstrcpyA(str,
-               x);
-
-  if (!*str)
-    return str;
-
-  x=str+strlen(str)-1;
-
-  while (*x==' ')
-    x--;
-
-  if (*x==' ')
-    *x='\0';
-
-  return x;
-}
-
-
-/*************************************************************************
- *              SHELL32_34  [SHELL32.34]
- * basename(char *fn);
- */
-LPSTR WIN32API SHELL32_34(LPSTR fn)
-{
-  LPSTR basefn;
-
-  dprintf(("SHELL32: .34 (%s)\n",
-           fn));
-
-
-  basefn = fn;
-  while (fn[0])
-  {
-    if (( (fn[0]=='\\') ||
-          (fn[0]==':')) && fn[1] && fn[1]!='\\')
-      basefn = fn+1;
-
-    fn++;
-  }
-
-  return basefn;
-}
-
-/*************************************************************************
- *           SHELL32_35             [SHELL32.35]
- * bool getpath(char *pathname); truncates passed argument to a valid path
- * returns if the string was modified or not.
- * "\foo\xx\foo"-> "\foo\xx"
- * "\"      -> "\"
- * "a:\foo" -> "a:\"
- */
-DWORD WIN32API SHELL32_35(LPSTR fn)
-{
-  LPSTR x,cutplace;
-
-  dprintf(("SHELL32: .35 (%s)\n",
-           fn));
-
-
-    if (!fn[0])
-        return 0;
-    x=fn;
-    cutplace = fn;
-    while (*x) {
-        if (*x=='\\') {
-            cutplace=x++;
-            continue;
-        }
-        if (*x==':') {
-            x++;
-            if (*x=='\\')
-                cutplace=++x;
-            continue; /* already x++ed */
-        }
-        x++;
-    }
-    if (!*cutplace)
-        return 0;
-    if (cutplace==fn) {
-        if (fn[0]=='\\') {
-            if (!fn[1])
-                return 0;
-            fn[0]='\0';
-            return 1;
-        }
-    }
-    *cutplace='\0';
-    return 1;
-}
-
-/*************************************************************************
- *              SHELL32_37  [SHELL32.37]
- * concat_paths(char*target,const char*add);
- * concats "target\\add" and writes them to target
- */
-LPSTR WIN32API SHELL32_37(LPSTR target,
-                             LPSTR x1,
-                             LPSTR x2)
-{
-  char  buf[260];
-
-  dprintf(("SHELL32: .37 (%s, %s, %s)\n",
-           target,
-           x1,
-           x2));
-
-
-  if (!x2 || !x2[0])
-  {
-    lstrcpyA(target,x1);
-
-    return target;
-  }
-
-  lstrcpyA(buf,x1);
-  SHELL32_32(buf); /* append \ if not there */
-  lstrcatA(buf,x2);
-  lstrcpyA(target,buf);
-
-  return target;
-}
-
-/*************************************************************************
- *              SHELL32_36  [SHELL32.36]
- * concat_paths(char*target,const char*add);
- * concats "target\\add" and writes them to target
- */
-LPSTR WIN32API SHELL32_36(LPSTR x1,
-                             LPSTR x2)
-{
-  dprintf(("SHELL32: .36 (%s, %s)\n",
-           x1,
-           x2));
-
-
-  while (x2[0]=='\\')
-    x2++;
-
-  return SHELL32_37(x1,
-                       x1,
-                       x2);
-}
-
-/*************************************************************************
- *              SHELL32_39  [SHELL32.39]
- * isUNC(const char*path);
- */
-BOOL WIN32API SHELL32_39(LPCSTR path)
-{
-  dprintf (("SHELL32: .39 (%s)\n",
-            path));
-
-
-  if ((path[0]=='\\') &&
-      (path[1]=='\\'))
-    return TRUE;
-
-  return FALSE;
-}
-
-
-/*************************************************************************
- *              SHELL32_45  [SHELL32.45]
- * file_exists(char *fn);
- */
-BOOL WIN32API SHELL32_45(LPSTR fn)
-{
-  dprintf(("SHELL32: .45 (%s)\n",
-           fn));
-
-
-  if (GetFileAttributesA(fn)==-1)
-    return FALSE;
-  else
-    return TRUE;
-}
-
-/*************************************************************************
- *              SHELL32_52  [SHELL32.52]
- * look for next arg in string. handle "quoted" strings
- * returns pointer to argument *AFTER* the space. Or to the \0.
- */
-LPSTR WIN32API SHELL32_52(LPSTR cmdline)
-{
-  BOOL  qflag = FALSE;
-
-  dprintf (("SHELL32: .52 (%s)\n",
-            cmdline));
-
-
-  while (*cmdline)
-  {
-    if ((*cmdline==' ') && !qflag)
-      return cmdline+1;
-
-    if (*cmdline=='"')
-      qflag=!qflag;
-
-    cmdline++;
-  }
-  return cmdline;
-}
-
-
-/*************************************************************************
- *              SHELL32_56      [SHELL32.56]
- * unquote string (remove ")
- */
-VOID WIN32API SHELL32_56(LPSTR str)
-{
-  DWORD      len = lstrlenA(str);
-
-  dprintf (("SHELL32: .56 (%s)\n",
-            str));
-
-
-  if (*str!='"')
-    return;
-
-  if (str[len-1]!='"')
-    return;
-
-  str[len-1]='\0';
-  lstrcpyA(str,
-             str+1);
-  return;
-}
-
-
-/*************************************************************************
- *           SHELL32_58             [SHELL32.58]
- */
-DWORD WIN32API SHELL32_58(LPCSTR src,
-                             DWORD x2,
-                             LPSTR target,
-                             DWORD pathlen)
-{
-  dprintf (("SHELL32: .58 (%s, %08xh, %08xh, %08xh) not implemented\n",
-            src,
-            x2,
-            target,
-            pathlen));
-
-  return 0;
-}
-
-
-/*************************************************************************
- *           SHELL32_62             [SHELL32.62]
- */
-DWORD WIN32API SHELL32_62(DWORD x,
-                             DWORD y,
-                             DWORD z,
-                             DWORD a)
-{
-  dprintf(("SHELL32: .62 (%08xh, %08xh, %08xh, %08xh) not implemented.\n",
-           x,
-           y,
-           z,
-           a));
-
-  return 0xffffffff;
-}
-
-
-/*************************************************************************
- *                      SHELL32_63                     [SHELL32.63]
- */
-DWORD WIN32API SHELL32_63(HWND   howner,
-                             LPSTR  targetbuf,
-                             DWORD  len,
-                             DWORD  x,
-                             LPCSTR suffix,
-                             LPCSTR y,
-                             LPCSTR cmd)
-{
-  dprintf (("SHELL32: .63 (%08xh, %08x, %08xh, %08xh, %08xh, %08xh, %s) not implemented.\n",
-            howner,
-            targetbuf,
-            len,
-            x,
-            suffix,
-            y,
-            cmd));
-
-  /* puts up a Open Dialog and requests input into targetbuf */
-  /* OFN_HIDEREADONLY|OFN_NOCHANGEDIR|OFN_FILEMUSTEXIST|OFN_unknown */
-  lstrcpyA(targetbuf,"x:\\s3.exe");
-  return 1;
-}
-
-
-/*************************************************************************
- *                      SHELL32_68                     [SHELL32.68]
- */
-DWORD WIN32API SHELL32_68(DWORD x,
-                             DWORD y,
-                             DWORD z)
-{
-  dprintf(("SHELL32: .68 (%08xh, %08xh, %08xh) not implemented.\n",
+  return TRUE;
+}
+
+
+/*************************************************************************
+ *           SHELL32_77             [SHELL32.77]
+ */
+DWORD WIN32API SHMapPIDLToSystemImageListIndex(DWORD x,
+                                               DWORD y,
+                                               DWORD z)
+{
+  dprintf(("SHELL32: SHMapPIDLToSystemImageListIndex (%08xh, %08xh, %08xh) not implemented.\n",
            x,
            y,
@@ -515,195 +143,13 @@
 
 /*************************************************************************
- *           SHELL32_71             [SHELL32.71]
- * returns internal shell values in the passed pointers
- */
-BOOL WIN32API SHELL32_71(LPDWORD x,
-                            LPDWORD y)
-{
-  dprintf(("SHELL32: .71 (%08xh, %08xh) not implemented.\n",
-           x,
-           y));
-
-  return TRUE;
-}
-
-
-/*************************************************************************
- *           SHELL32_72             [SHELL32.72]
- * dunno. something with icons
- */
-void WIN32API SHELL32_72(LPSTR x,
-                            DWORD y,
-                            DWORD z)
-{
-  dprintf (("SHELL32: .27 (%08xh, %08xh, %08xh) not implemented.\n",
-            x,
-            y,
-            z));
-}
-
-
-/*************************************************************************
- *           SHELL32_89             [SHELL32.89]
- */
-DWORD WIN32API SHELL32_89(DWORD x1,
-                             DWORD x2,
-                             DWORD x3)
-{
-  dprintf(("SHELL32: .89 (%08xh, %08xh, %08xh) not implemented.\n",
-           x1,
-           x2,
-           x3));
-
-  return 0;
-}
-
-
-/*************************************************************************
- *              SHELL32_119 [SHELL32.119]
- * unknown
- */
-void WIN32API SHELL32_119(LPVOID x)
-{
-  dprintf(("SHELL32: .119 (%08xh) not implemented.\n",
-           x));
-}
-
-
-/*************************************************************************
- *              SHELL32_175 [SHELL32.175]
- * unknown
- */
-void WIN32API SHELL32_175(DWORD x1,
-                             DWORD x2,
-                             DWORD x3,
-                             DWORD x4)
-{
-  dprintf (("SHELL32: .175 (%08x, %08xh, %08xh, %08xh not implemented.\n",
-            x1,
-            x2,
-            x3,
-            x4));
-}
-
-
-/*************************************************************************
- *              SHELL32_181 [SHELL32.181]
- * unknown
- */
-void WIN32API SHELL32_181(DWORD x,
-                             DWORD y)
-{
-  dprintf(("SHELL32: .181 (%08xh, %08xh) not implemented.\n",
-           x,
-           y));
-}
-
-
-/*************************************************************************
- *              SHELL32_75  [SHELL32.75]
- * unknown
- */
-BOOL WIN32API SHELL32_75(LPDWORD x,
-                            LPDWORD y)
-{
-  dprintf(("SHELL32: .75 (%08xh, %08xh) not implemented.\n",
-           x,
-           y));
-
-  return TRUE;
-}
-
-
-/*************************************************************************
- *           SHELL32_77             [SHELL32.77]
- */
-DWORD WIN32API SHELL32_77(DWORD x,
-                             DWORD y,
-                             DWORD z)
-{
-  dprintf(("SHELL32: .77 (%08xh, %08xh, %08xh) not implemented.\n",
-           x,
-           y,
-           z));
-
-  return 0;
-}
-
-
-/*************************************************************************
- *           SHELL32_79             [SHELL32.79]
- * create_directory_and_notify(...)
- */
-DWORD WIN32API SHELL32_79(LPCSTR dir,
-                             LPVOID xvoid)
-{
-  dprintf(("SHELL32: .79 (%s, %08xh)\n",
-           dir,
-           xvoid));
-
-  if (!CreateDirectoryA(dir,
-                          (PSECURITY_ATTRIBUTES)xvoid))
-    return FALSE;
-
-    /* @@@PH: SHChangeNotify(8,1,dir,0); */
-  return TRUE;
-}
-
-
-/*************************************************************************
- *           SHELL32_100            [SHELL32.100]
- * walks through policy table, queries <app> key, <type> value, returns
- * queried (DWORD) value.
- * {0x00001,Explorer,NoRun}
- * {0x00002,Explorer,NoClose}
- * {0x00004,Explorer,NoSaveSettings}
- * {0x00008,Explorer,NoFileMenu}
- * {0x00010,Explorer,NoSetFolders}
- * {0x00020,Explorer,NoSetTaskbar}
- * {0x00040,Explorer,NoDesktop}
- * {0x00080,Explorer,NoFind}
- * {0x00100,Explorer,NoDrives}
- * {0x00200,Explorer,NoDriveAutoRun}
- * {0x00400,Explorer,NoDriveTypeAutoRun}
- * {0x00800,Explorer,NoNetHood}
- * {0x01000,Explorer,NoStartBanner}
- * {0x02000,Explorer,RestrictRun}
- * {0x04000,Explorer,NoPrinterTabs}
- * {0x08000,Explorer,NoDeletePrinter}
- * {0x10000,Explorer,NoAddPrinter}
- * {0x20000,Explorer,NoStartMenuSubFolders}
- * {0x40000,Explorer,MyDocsOnNet}
- * {0x80000,WinOldApp,NoRealMode}
- */
-DWORD WIN32API SHELL32_100(DWORD pol)
-{
- HKEY xhkey;
-
-  dprintf (("SHELL32: .100 (%08xh) not implemented.\n",
-            pol));
-
-  if (RegOpenKeyA((HKEY)HKEY_CURRENT_USER,
-                    "Software\\Microsoft\\Windows\\CurrentVersion\\Policies",
-                    &xhkey))
-    return 0;
-
-  /* FIXME: do nothing for now, just return 0 (== "allowed") */
-  RegCloseKey(xhkey);
-
-  return 0;
-}
-
-
-/*************************************************************************
  *           SHELL32_152            [SHELL32.152]
  * itemlist_length
  */
-DWORD WIN32API SHELL32_152(LPITEMIDLIST iil)
+DWORD WIN32API ILGetSize(LPITEMIDLIST iil)
 {
   LPSHITEMID    si;
   DWORD     len;
 
-  dprintf(("SHELL32: .152 (%08xh)\n",
+  dprintf(("SHELL32: ILGetSize (%08xh)\n",
            iil));
 
@@ -722,67 +168,4 @@
 
 
-/*************************************************************************
- *                      SHELL32_158                    [SHELL32.158]
- */
-LPSTR WIN32API SHELL32_158(LPSTR path,
-                              DWORD y,
-                              DWORD z)
-{
-  dprintf(("SHELL32: .158 (%s, %08xh, %08xh)\n",
-           path,
-           y,
-           z));
-
-  path = SHELL32_31(path);
-
-  return *path ? (path+1) : path;
-}
-
-
-/*************************************************************************
- *           SHELL32_165            [SHELL32.165]
- * create_path_and_notify(...)
- */
-DWORD WIN32API SHELL32_165(DWORD x,
-                              LPCSTR path)
-{
-  dprintf (("SHELL32 .165 (%08x, %08xh) not implemented.\n",
-            x,
-            path));
-
-  if (SHELL32_79(path,
-                    (LPVOID)x))
-    return 0;
-
-  return 0;
-}
-
-
-/*************************************************************************
- *           SHELL32_195            [SHELL32.195]
- * free_ptr() - frees memory using IMalloc
- */
-DWORD WIN32API SHELL32_195(LPVOID x)
-{
-  dprintf (("SHELL32: .195 (%08xh) (LocalFree)\n",
-            x));
-
-  return (DWORD)LocalFree((HLOCAL)x);
-}
-
-
-/*************************************************************************
- *           SHELL32_196            [SHELL32.196]
- * void *task_alloc(DWORD len), uses SHMalloc allocator
- */
-LPVOID WIN32API SHELL32_196(DWORD len)
-{
-  dprintf(("SHELL32: .196 (%08xh) (LocalAlloc)\n",
-           len));
-
-  return (LPVOID)LocalAlloc(len,
-                              LMEM_ZEROINIT); /* FIXME */
-}
-
 
 /*************************************************************************
@@ -790,15 +173,15 @@
  * copy_itemidlist()
  */
-LPITEMIDLIST WIN32API SHELL32_18(LPITEMIDLIST iil)
+LPITEMIDLIST WIN32API ILClone(LPITEMIDLIST iil)
 {
   DWORD     len;
   LPITEMIDLIST  newiil;
 
-  dprintf(("SHELL32: .18 (%08xh)\n",
+  dprintf(("SHELL32: ILClone(%08xh)\n",
            iil));
 
 
-  len = SHELL32_152(iil);
-  newiil = (LPITEMIDLIST)SHELL32_196(len);
+  len = ILGetSize(iil);
+  newiil = (LPITEMIDLIST)SHAlloc(len);
   memcpy(newiil,
          iil,
@@ -813,18 +196,18 @@
  * merge_itemidlist()
  */
-LPITEMIDLIST WIN32API SHELL32_25(LPITEMIDLIST iil1,
-                                    LPITEMIDLIST iil2)
+LPITEMIDLIST WIN32API ILCombine(LPITEMIDLIST iil1,
+                                LPITEMIDLIST iil2)
 {
   DWORD     len1,len2;
   LPITEMIDLIST  newiil;
 
-  dprintf(("SHELL32: .25 (%08xh, %08xh)\n",
+  dprintf(("SHELL32: ILCombine(%08xh, %08xh)\n",
            iil1,
            iil2));
 
 
-  len1   = SHELL32_152(iil1)-2;
-  len2   = SHELL32_152(iil2);
-  newiil = (LPITEMIDLIST)SHELL32_196(len1+len2);
+  len1   = ILGetSize(iil1)-2;
+  len2   = ILGetSize(iil2);
+  newiil = (LPITEMIDLIST)SHAlloc(len1+len2);
 
   memcpy(newiil,
@@ -844,7 +227,7 @@
  * free_check_ptr - frees memory (if not NULL) allocated by SHMalloc allocator
  */
-DWORD WIN32API SHELL32_155(LPVOID x)
-{
-  dprintf(("SHELL32: .155 (%08xh)\n",
+DWORD WIN32API ILFree(LPVOID x)
+{
+  dprintf(("SHELL32: ILFree (%08xh)\n",
            x));
 
@@ -852,5 +235,5 @@
     return 0;
 
-  return SHELL32_195(x);
+  return SHFree(x);
 }
 
@@ -860,10 +243,10 @@
  * unknown
  */
-DWORD WIN32API SHELL32_85(DWORD x1,
+DWORD WIN32API OpenRegStream(DWORD x1,
                              DWORD x2,
                              DWORD x3,
                              DWORD x4)
 {
-  dprintf(("SHELL32: .85 (%08x, %08xh, %08xh, %08xh) not implemented.\n",
+  dprintf(("SHELL32: OpenRegStream (%08x, %08xh, %08xh, %08xh) not implemented.\n",
            x1,
            x2,
@@ -876,10 +259,10 @@
 
 /*****************************************************************************
- * Name      : .4
+ * Name      :
  * Purpose   :
  * Parameters:
  * Variables :
  * Result    :
- * Remark    : unknown
+ * Remark    : SHELL32.162
  * Status    : UNTESTED UNKNOWN STUB
  *
@@ -887,7 +270,7 @@
  *****************************************************************************/
 
-DWORD WIN32API SHELL32_4(DWORD x1)
-{
-  dprintf(("SHELL32: .4 (%08xh) not implemented.\n",
+DWORD WIN32API SHSimpleIDListFromPathAW(DWORD x1)
+{
+  dprintf(("SHELL32: .162 (%08xh) not implemented.\n",
            x1));
 
@@ -897,10 +280,10 @@
 
 /*****************************************************************************
- * Name      : .59
+ * Name      :
  * Purpose   :
  * Parameters:
  * Variables :
  * Result    :
- * Remark    : unknown
+ * Remark    : SHELL32.102
  * Status    : UNTESTED UNKNOWN STUB
  *
@@ -908,165 +291,11 @@
  *****************************************************************************/
 
-DWORD WIN32API SHELL32_59(void)
-{
-  dprintf(("SHELL32: .59 () not implemented.\n"));
-
-  return (0);
-}
-
-
-/*****************************************************************************
- * Name      : .162
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : unknown
- * Status    : UNTESTED UNKNOWN STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
- *****************************************************************************/
-
-DWORD WIN32API SHELL32_162(DWORD x1)
-{
-  dprintf(("SHELL32: .162 (%08xh) not implemented.\n",
-           x1));
-
-  return (0);
-}
-
-
-/*****************************************************************************
- * Name      : .145
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : unknown
- * Status    : UNTESTED UNKNOWN STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
- *****************************************************************************/
-
-DWORD WIN32API SHELL32_145(DWORD x1,
-                            DWORD x2)
-{
-  dprintf(("SHELL32: .145 (%08xh, %08xh) not implemented.\n",
-           x1,
-           x2));
-
-  return (0);
-}
-
-
-/*****************************************************************************
- * Name      : .43
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : unknown
- * Status    : UNTESTED UNKNOWN STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
- *****************************************************************************/
-
-DWORD WIN32API SHELL32_43(DWORD x1)
-{
-  dprintf(("SHELL32: .43 (%08xh) not implemented.\n",
-           x1));
-
-  return (0);
-}
-
-
-/*****************************************************************************
- * Name      : .51
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : unknown
- * Status    : UNTESTED UNKNOWN STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
- *****************************************************************************/
-
-DWORD WIN32API SHELL32_51(DWORD x1,
-                           DWORD x2,
-                           DWORD x3)
-{
-  dprintf(("SHELL32: .51 (%08xh, %08xh, %08xh) not implemented.\n",
-           x1,
-           x2,
-           x3));
-
-  return (0);
-}
-
-
-/*****************************************************************************
- * Name      : .55
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : unknown
- * Status    : UNTESTED UNKNOWN STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
- *****************************************************************************/
-
-DWORD WIN32API SHELL32_55(DWORD x1)
-{
-  dprintf(("SHELL32: .55 (%08xh) not implemented.\n",
-           x1));
-
-  return (0);
-}
-
-
-/*****************************************************************************
- * Name      : SetAppStartingCursor
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : SHELL32.99
- * Status    : UNTESTED UNKNOWN STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
- *****************************************************************************/
-
-HRESULT WIN32API SetAppStartingCursor(HWND  u,
-                                      DWORD v)
-{
-  dprintf(("SHELL32: SetAppStartingCursor (SHELL32.99): (%08xh,%08xh) not implemented.\n",
-           u,
-           v));
-
-  return 0;
-}
-
-
-/*****************************************************************************
- * Name      : .102
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : unknown
- * Status    : UNTESTED UNKNOWN STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
- *****************************************************************************/
-
-DWORD WIN32API SHELL32_102(DWORD x1,
-                            DWORD x2,
-                            DWORD x3,
-                            DWORD x4,
-                            DWORD x5)
-{
-  dprintf(("SHELL32: .102 (%08xh, %08xh, %08xh, %08xh, %08xh) not implemented.\n",
+DWORD WIN32API SHCoCreateInstance(DWORD x1,
+                                  DWORD x2,
+                                  DWORD x3,
+                                  DWORD x4,
+                                  DWORD x5)
+{
+  dprintf(("SHELL32: SHCoCreateInstance (%08xh, %08xh, %08xh, %08xh, %08xh) not implemented.\n",
            x1,
            x2,
@@ -1077,3 +306,2 @@
   return (0);
 }
-
Index: trunk/src/shell32/sh.cpp
===================================================================
--- trunk/src/shell32/sh.cpp	(revision 181)
+++ trunk/src/shell32/sh.cpp	(revision 183)
@@ -1,3 +1,3 @@
-/* $Id: sh.cpp,v 1.3 1999-06-24 09:02:08 phaller Exp $ */
+/* $Id: sh.cpp,v 1.4 1999-06-24 19:27:49 phaller Exp $ */
 
 /*
@@ -15,4 +15,5 @@
 #include <shellapi.h>
 #include <winreg.h>
+//#include <shlobj.h> @@@PH shlobj is yet to be ported
 #include "shell32.h"
 
@@ -32,24 +33,840 @@
  *****************************************************************************/
 
-
-/*****************************************************************************
- * Name      : HRESULT SHGetMalloc
- * Purpose   :
- * Parameters: LPMALLOC *ppMalloc
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
- *****************************************************************************/
-
-HRESULT WIN32API SHGetMalloc(LPMALLOC *ppMalloc)
-{
-  dprintf(("SHELL32: SHGetMalloc(%08xh) not implemented.\n",
-           ppMalloc));
-
-  return(0);
-}
+#define LPSHELLVIEWDATA  LPVOID
+#define LPUNKNOWN        LPVOID
+#define IDSTRUCT         VOID
+#define LPSHELLFLAGSTATE LPVOID
+#define IDropTarget      VOID
+
+static LPUNKNOWN SHELL32_IExplorerInterface=0;
+
+
+/*****************************************************************************
+ * Name      : DWORD WIN32API SHChangeNotifyRegister
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.2
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *
+ * NOTES
+ *   Idlist is an array of structures and Count specifies how many items in the array
+ *   (usually just one I think).
+ */
+
+DWORD WIN32API SHChangeNotifyRegister(HWND hwnd,
+                                      LONG events1,
+                                      LONG events2,
+                                      DWORD msg,
+                                      int count,
+                                      IDSTRUCT *idlist)
+{
+  dprintf(("SHELL32: SHChangeNotifyRegister(%08xh,  %08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
+           hwnd,
+           events1,
+           events2,
+           msg,
+           count,
+           idlist));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : DWORD WIN32API SHChangeNotifyDeregister
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.4
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ */
+
+DWORD WIN32API SHChangeNotifyDeregister(LONG x1)
+{
+  dprintf(("SHELL32: SHChangeNotifyDeregister(%08xh) not implemented.\n",
+           x1));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : void WIN32API SHGetSettings
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.68
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *
+ * NOTES
+ *  the registry path are for win98 (tested)
+ *  and possibly are the same in nt40
+ */
+
+void WIN32API SHGetSettings(LPSHELLFLAGSTATE lpsfs,
+                            DWORD            dwMask,
+                            DWORD            dwx)
+{
+  HKEY  hKey;
+  DWORD dwData;
+  DWORD dwDataSize = sizeof (DWORD);
+
+  dprintf(("SHELL32: SHGetSettings(%08xh, %08xh, %08xh)\n",
+           lpsfs,
+           dwMask,
+           dwx));
+
+  if (RegCreateKeyExA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
+            0, 0, 0, KEY_ALL_ACCESS, 0, &hKey, 0))
+    return;
+
+//@@@PH: todo
+#if 0
+   if ( (SSF_SHOWEXTENSIONS & dwMask) && !RegQueryValueExA(hKey, "HideFileExt", 0, 0, (LPBYTE)&dwData, &dwDataSize))
+     lpsfs->fShowExtensions  = ((dwData == 0) ?  0 : 1);
+
+   if ( (SSF_SHOWINFOTIP & dwMask) && !RegQueryValueExA(hKey, "ShowInfoTip", 0, 0, (LPBYTE)&dwData, &dwDataSize))
+     lpsfs->fShowInfoTip  = ((dwData == 0) ?  0 : 1);
+
+   if ( (SSF_DONTPRETTYPATH & dwMask) && !RegQueryValueExA(hKey, "DontPrettyPath", 0, 0, (LPBYTE)&dwData, &dwDataSize))
+     lpsfs->fDontPrettyPath  = ((dwData == 0) ?  0 : 1);
+
+   if ( (SSF_HIDEICONS & dwMask) && !RegQueryValueExA(hKey, "HideIcons", 0, 0, (LPBYTE)&dwData, &dwDataSize))
+     lpsfs->fHideIcons  = ((dwData == 0) ?  0 : 1);
+
+   if ( (SSF_MAPNETDRVBUTTON & dwMask) && !RegQueryValueExA(hKey, "MapNetDrvBtn", 0, 0, (LPBYTE)&dwData, &dwDataSize))
+     lpsfs->fMapNetDrvBtn  = ((dwData == 0) ?  0 : 1);
+
+   if ( (SSF_SHOWATTRIBCOL & dwMask) && !RegQueryValueExA(hKey, "ShowAttribCol", 0, 0, (LPBYTE)&dwData, &dwDataSize))
+     lpsfs->fShowAttribCol  = ((dwData == 0) ?  0 : 1);
+
+   if (((SSF_SHOWALLOBJECTS | SSF_SHOWSYSFILES) & dwMask) && !RegQueryValueExA(hKey, "Hidden", 0, 0, (LPBYTE)&dwData, &dwDataSize))
+   { if (dwData == 0)
+     { if (SSF_SHOWALLOBJECTS & dwMask)  lpsfs->fShowAllObjects  = 0;
+       if (SSF_SHOWSYSFILES & dwMask)    lpsfs->fShowSysFiles  = 0;
+     }
+     else if (dwData == 1)
+     { if (SSF_SHOWALLOBJECTS & dwMask)  lpsfs->fShowAllObjects  = 1;
+       if (SSF_SHOWSYSFILES & dwMask)    lpsfs->fShowSysFiles  = 0;
+     }
+     else if (dwData == 2)
+     { if (SSF_SHOWALLOBJECTS & dwMask)  lpsfs->fShowAllObjects  = 0;
+       if (SSF_SHOWSYSFILES & dwMask)    lpsfs->fShowSysFiles  = 1;
+     }
+   }
+#endif
+
+  RegCloseKey (hKey);
+}
+
+
+/*****************************************************************************
+ * Name      : int WIN32API SHShellFolderView_Message
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.73
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *
+ * SHShellFolderView_Message                   [SHELL32.73]
+ *
+ * PARAMETERS
+ *  hwndCabinet defines the explorer cabinet window that contains the
+ *              shellview you need to communicate with
+ *  uMsg        identifying the SFVM enum to perform
+ *  lParam
+ *
+ * NOTES
+ *  Message SFVM_REARRANGE = 1
+ *    This message gets sent when a column gets clicked to instruct the
+ *    shell view to re-sort the item list. lParam identifies the column
+ *    that was clicked.
+ */
+
+int WIN32API SHShellFolderView_Message(HWND   hwndCabinet,
+                                       UINT   uMsg,
+                                       LPARAM lParam)
+{
+  dprintf(("SHELL32: SHShellFolderView_Message(%08xh,%08xh,%08xh) not implemented.\n",
+           hwndCabinet,
+           uMsg,
+           lParam));
+
+  return 0;
+}
+
+
+
+
+/*****************************************************************************
+ * Name      : DWORD WIN32API SHRegisterDragDrop
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.86
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *
+ * NOTES
+ *     exported by ordinal
+ */
+
+DWORD WIN32API SHRegisterDragDrop(HWND        hWnd,
+                                  IDropTarget *pDropTarget)
+{
+  dprintf(("SHELL32: SHRegisterDragDrop(%08xh,%08xh)\n",
+           hWnd,
+           pDropTarget));
+
+  // return RegisterDragDrop(hWnd,
+  //                         pDropTarget);
+  return 0;
+}
+
+/*****************************************************************************
+ * Name      : DWORD WIN32API SHRevokeDragDrop
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.87
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *
+ * NOTES
+ *     exported by ordinal
+ */
+
+DWORD WIN32API SHRevokeDragDrop(DWORD x)
+{
+  dprintf(("SHELL32: SHRevokeDragDrop(%08xh) not implemented.\n",
+           x));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHWaitForFileToOpen
+ * Purpose   :
+ * Parameters: DWORD x
+ *             DWORD y
+ *             DWORD z
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.97
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHWaitForFileToOpen(DWORD u,
+                                     DWORD v,
+                                     DWORD w)
+{
+  dprintf(("SHELL32: SHWaitForFileToOpen(%08xh,%08xh,%08xh) not implemented.\n",
+           u,
+           v,
+           w));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : DWORD WIN32API SHRestricted
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.100
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *
+ * walks through policy table, queries <app> key, <type> value, returns
+ * queried (DWORD) value.
+ * {0x00001,Explorer,NoRun}
+ * {0x00002,Explorer,NoClose}
+ * {0x00004,Explorer,NoSaveSettings}
+ * {0x00008,Explorer,NoFileMenu}
+ * {0x00010,Explorer,NoSetFolders}
+ * {0x00020,Explorer,NoSetTaskbar}
+ * {0x00040,Explorer,NoDesktop}
+ * {0x00080,Explorer,NoFind}
+ * {0x00100,Explorer,NoDrives}
+ * {0x00200,Explorer,NoDriveAutoRun}
+ * {0x00400,Explorer,NoDriveTypeAutoRun}
+ * {0x00800,Explorer,NoNetHood}
+ * {0x01000,Explorer,NoStartBanner}
+ * {0x02000,Explorer,RestrictRun}
+ * {0x04000,Explorer,NoPrinterTabs}
+ * {0x08000,Explorer,NoDeletePrinter}
+ * {0x10000,Explorer,NoAddPrinter}
+ * {0x20000,Explorer,NoStartMenuSubFolders}
+ * {0x40000,Explorer,MyDocsOnNet}
+ * {0x80000,WinOldApp,NoRealMode}
+ *
+ * NOTES
+ *     exported by ordinal
+ */
+
+DWORD WIN32API SHRestricted (DWORD pol)
+{
+  HKEY  xhkey;
+
+  dprintf(("SHELL32: SHRestricted(%08xh) not implemented.\n",
+           pol));
+
+  if (RegOpenKeyA(HKEY_CURRENT_USER,
+                  "Software\\Microsoft\\Windows\\CurrentVersion\\Policies",
+                  &xhkey))
+    return 0;
+
+  /* FIXME: do nothing for now, just return 0 (== "allowed") */
+  RegCloseKey(xhkey);
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHFlushClipboard
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.121
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHFlushClipboard(void)
+{
+  dprintf(("SHELL32: SHFlushClipboard() not implemented.\n"));
+
+  return 1;
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHFreeUnusedLibraries
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.123
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHFreeUnusedLibraries (void)
+{
+  dprintf(("SHELL32: SHFreeUnusedLibraries() not implemented.\n"));
+  return TRUE;
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHWinHelp
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.127
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHWinHelp (DWORD v,
+                            DWORD w,
+                            DWORD x,
+                            DWORD z)
+{
+  dprintf(("SHELL32: SHWinHelp(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
+           v,
+           w,
+           x,
+           z));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHOutOfMemoryMessageBox
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.126
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHOutOfMemoryMessageBox(DWORD u,
+                                         DWORD v,
+                                         DWORD w)
+{
+  dprintf(("SHELL32: SHOutOfmemoryMessageBox(%08xh,%08xh,%08xh) not implemented.\n",
+           u,
+           v,
+           w));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHLoadOLE
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.151
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHLoadOLE(DWORD u)
+{
+  dprintf(("SHELL32: SHLoadOle(%08xh) not implemented.\n",
+           u));
+
+  return S_OK;
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHRunControlPanel
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.161
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHRunControlPanel (DWORD x,
+                                    DWORD z)
+{
+  dprintf(("SHELL32: SHRunControlPanel(%08xh, %08xh) not implemented.\n",
+           x,
+           z));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : DWORD WIN32API SHCreateDirectory
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.165
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *
+ * NOTES
+ *  exported by ordinal
+ *  not sure about LPSECURITY_ATTRIBUTES
+ */
+
+DWORD WIN32API SHCreateDirectory(LPSECURITY_ATTRIBUTES sec,
+                                 LPCSTR                path)
+{
+  dprintf(("SHELL32: SHCreateDirectory(%08xh, %08xh) not implemented.\n",
+           sec,
+           path));
+
+ if (CreateDirectoryA(path,sec))
+   return TRUE;
+
+ /* SHChangeNotify(8,1,path,0); */
+ return FALSE;
+
+//   if (SHELL32_79(path,(LPVOID)x))
+//      return 0;
+//   FIXME("(%08lx,%s):stub.\n",x,path);
+//   return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHValidateUNC
+ * Purpose   : validating a UNC path ? so the parameters are not correct !
+ * Parameters: DWORD x
+ *             DWORD y
+ *             DWORD z
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.173
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHValidateUNC (DWORD x,
+                                DWORD y,
+                                DWORD z)
+{
+  dprintf(("SHELL32: SHValidateUnc(%08x,%08xh,%08xh) not implemented.\n",
+           x,
+           y,
+           z));
+
+ return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHCreateShellFolderViewEx
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.174
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+
+HRESULT WIN32API SHCreateShellFolderViewEx(LPSHELLVIEWDATA psvcbi,
+                                           LPVOID* ppv)
+{
+  dprintf(("SHELL32: SHCreateShellFolderViewEx(%08xh,%08xh) not implemented.\n",
+           psvcbi,
+           ppv));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHSetInstanceExplorer
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.176
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHSetInstanceExplorer (LPUNKNOWN lpUnknown)
+{
+  dprintf(("SHELL32: SHSetInstanceExplorer(%08xh)\n",
+           lpUnknown));
+
+  SHELL32_IExplorerInterface = lpUnknown;
+  return (HRESULT) lpUnknown;
+}
+
+
+/*****************************************************************************
+ * Name      : DWORD WIN32API SHFree
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.195
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *
+ * NOTES
+ *     free_ptr() - frees memory using IMalloc
+ *     exported by ordinal
+ */
+
+DWORD WIN32API SHFree(LPVOID x)
+{
+  dprintf(("SHELL32: SHFree(%08xh)\n",
+           x));
+
+  if (!HIWORD(x))
+  {
+    *(LPDWORD)0xdeaf0000 = 0;
+  }
+
+  return HeapFree(GetProcessHeap(),0,x);
+}
+
+
+/*****************************************************************************
+ * Name      : LPVOID WIN32API SHAlloc
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.196
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *
+ * NOTES
+ *     void *task_alloc(DWORD len), uses SHMalloc allocator
+ *     exported by ordinal
+ */
+
+LPVOID WIN32API SHAlloc(DWORD len)
+{
+  dprintf(("SHELL32: SHAlloc(%08xh)\n",
+           len));
+
+  return (LPVOID)HeapAlloc(GetProcessHeap(),0,len);
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHAbortInvokeCommand
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.198
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHAbortInvokeCommand(void)
+{
+  dprintf(("SHELL32: SHAbortInvokeCommand() not implemented.\n"));
+
+  return 1;
+}
+
+
+/*****************************************************************************
+ * Name      : VOID SHAddToRecentDocs
+ * Purpose   :
+ * Parameters: UINT    uFlags
+ *             LPCVOID pv
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.234
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+VOID WIN32API SHAddToRecentDocs(UINT    uFlags,
+                                LPCVOID pv)
+{
+  dprintf(("SHELL32: SHAddToRecentDocs(%08xh,%08xh) not implemented.\n",
+           uFlags,
+           pv));
+}
+
+
+/*****************************************************************************
+ * Name      : LPITEMIDLIST SHBrowseForFolder
+ * Purpose   :
+ * Parameters: LPBROWSEINFOA lpbi
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.236
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+LPITEMIDLIST WIN32API SHBrowseForFolder(LPBROWSEINFOA lpbi)
+{
+  dprintf(("SHELL32: SHBrowseForFolder(%08xh) not implemented.\n",
+           lpbi));
+
+  //@@@PH automatically decide between A and W
+
+  return(NULL);
+}
+
+
+/*****************************************************************************
+ * Name      : LPITEMIDLIST SHBrowseForFolderA
+ * Purpose   :
+ * Parameters: LPBROWSEINFOA lpbi
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.237
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+LPITEMIDLIST WIN32API SHBrowseForFolderA(LPBROWSEINFOA lpbi)
+{
+  dprintf(("SHELL32: SHBrowseForFolderA(%08xh) not implemented.\n",
+           lpbi));
+
+  return(NULL);
+}
+
+
+/*****************************************************************************
+ * Name      : LPITEMIDLIST SHBrowseForFolderW
+ * Purpose   :
+ * Parameters: LPBROWSEINFOW lpbi
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.238
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+LPITEMIDLIST WIN32API SHBrowseForFolderW(LPBROWSEINFOA lpbi)
+{
+  dprintf(("SHELL32: SHBrowseForFolderW(%08xh) not implemented.\n",
+           lpbi));
+
+  return(NULL);
+}
+
+
+/*****************************************************************************
+ * Name      : VOID SHChangeNotify
+ * Purpose   :
+ * Parameters: LONG    wEventId
+ *             UINT    uFlags
+ *             LPCVOID dwItem1
+ *             LPCVOID dwItem2
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.239
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+VOID WIN32API SHChangeNotify(LONG    wEventId,
+                             UINT    uFlags,
+                             LPCVOID dwItem1,
+                             LPCVOID dwItem2)
+{
+  dprintf(("SHELL32: SHChangeNotify(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
+           wEventId,
+           uFlags,
+           dwItem1,
+           dwItem2));
+
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHFileOperation
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.242
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+DWORD WIN32API SHFileOperationAW(LPVOID lpFileOp)
+{
+  dprintf(("SHELL32: SHFileOperationAW(%08xh) not implemented.\n",
+           lpFileOp));
+
+  // if OsIsUnicode()
+  //   SHFileOperationA(lpFileOp);
+  // else
+  //   SHFileOperationW(lpFileOp);
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHFileOperationA
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.243
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+DWORD WIN32API SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp)
+{
+  dprintf(("SHELL32: SHFileOperationA(%08xh) not implemented.\n",
+           lpFileOp));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHFileOperationW
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.244
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+DWORD WIN32API SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
+{
+  dprintf(("SHELL32: SHFileOperationW(%08xh) not implemented.\n",
+           lpFileOp));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHGetDesktopFolder
+ * Purpose   :
+ * Parameters: LPSHELLFOLDER *ppshf
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.252
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHGetDesktopFolder(LPSHELLFOLDER *ppshf)
+{
+  dprintf(("SHELL32: SHGetDesktopFolder(%08xh) not implemented.\n",
+           ppshf));
+
+  return(1);
+}
+
 
 
@@ -64,5 +881,5 @@
  * Variables :
  * Result    :
- * Remark    :
+ * Remark    : SHELL32.253 .254
  * Status    : UNTESTED STUB
  *
@@ -97,5 +914,5 @@
  * Variables :
  * Result    :
- * Remark    :
+ * Remark    : SHELL32.255
  * Status    : UNTESTED STUB
  *
@@ -124,114 +941,51 @@
 
 /*****************************************************************************
- * Name      : HRESULT SHGetDesktopFolder
- * Purpose   :
- * Parameters: LPSHELLFOLDER *ppshf
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
- *****************************************************************************/
-
-HRESULT WIN32API SHGetDesktopFolder(LPSHELLFOLDER *ppshf)
-{
-  dprintf(("SHELL32: SHGetDesktopFolder(%08xh) not implemented.\n",
-           ppshf));
-
-  return(1);
-}
-
-
-/*****************************************************************************
- * Name      : VOID SHAddToRecentDocs
- * Purpose   :
- * Parameters: UINT    uFlags
- *             LPCVOID pv
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
- *****************************************************************************/
-
-VOID WIN32API SHAddToRecentDocs(UINT    uFlags,
-                                LPCVOID pv)
-{
-  dprintf(("SHELL32: SHAddToRecentDocs(%08xh,%08xh) not implemented.\n",
-           uFlags,
-           pv));
-}
-
-
-/*****************************************************************************
- * Name      : VOID SHChangeNotify
- * Purpose   :
- * Parameters: LONG    wEventId
- *             UINT    uFlags
- *             LPCVOID dwItem1
- *             LPCVOID dwItem2
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
- *****************************************************************************/
-
-VOID WIN32API SHChangeNotify(LONG    wEventId,
-                             UINT    uFlags,
-                             LPCVOID dwItem1,
-                             LPCVOID dwItem2)
-{
-  dprintf(("SHELL32: SHChangeNotify(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           wEventId,
-           uFlags,
-           dwItem1,
-           dwItem2));
-}
-
-
-/*****************************************************************************
- * Name      : DWORD SHFileOperationA
- * Purpose   :
- * Parameters: LPSHFILEOPSTRUCTA lpFileOp
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
- *****************************************************************************/
-
-DWORD WIN32API SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp)
-{
-  dprintf(("SHELL32: SHFileOperationA(%08xh) not implemented.\n",
-           lpFileOp));
+ * Name      : HRESULT SHGetInstanceExplorer
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.256
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHGetInstanceExplorer (LPUNKNOWN * lpUnknown)
+{
+  dprintf(("SHELL32: SHGetInstanceExplorer(%08xh) not implemented.\n",
+           lpUnknown));
+
+  *lpUnknown = SHELL32_IExplorerInterface;
+
+  if (!SHELL32_IExplorerInterface)
+    return E_FAIL;
+
+  //@@@PH to do:
+  //SHELL32_IExplorerInterface->lpvtbl->fnAddRef(SHELL32_IExplorerInterface);
+  return NOERROR;
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHGetMalloc
+ * Purpose   :
+ * Parameters: LPMALLOC *ppMalloc
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.257
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHGetMalloc(LPMALLOC *ppMalloc)
+{
+  dprintf(("SHELL32: SHGetMalloc(%08xh) not implemented.\n",
+           ppMalloc));
 
   return(0);
 }
 
-
-/*****************************************************************************
- * Name      : DWORD SHFileOperationW
- * Purpose   :
- * Parameters: LPSHFILEOPSTRUCTW lpFileOp
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
- *****************************************************************************/
-
-DWORD WIN32API SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
-{
-  dprintf(("SHELL32: SHFileOperationW(%08xh) not implemented.\n",
-           lpFileOp));
-
-  return(0);
-}
 
 
@@ -243,5 +997,5 @@
  * Variables :
  * Result    :
- * Remark    :
+ * Remark    : SHELL32.259 .260
  * Status    : UNTESTED STUB
  *
@@ -261,4 +1015,28 @@
 
 /*****************************************************************************
+ * Name      : BOOL SHGetPathFromIDListW
+ * Purpose   :
+ * Parameters: LPCITEMIDLIST pidl
+ *             LPSTR         pszPath
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.261
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+BOOL WIN32API SHGetPathFromIDListW(LPCITEMIDLIST pidl,
+                                   LPWSTR        pszPath)
+{
+  dprintf(("SHELL32: SHGetPathFromIDListW(%08xh,%08xh) not implemented.\n",
+           pidl,
+           pszPath));
+
+  return(FALSE);
+}
+
+
+/*****************************************************************************
  * Name      : HRESULT SHGetSpecialFolderLocation
  * Purpose   :
@@ -268,5 +1046,5 @@
  * Variables :
  * Result    :
- * Remark    :
+ * Remark    : SHELL32.262
  * Status    : UNTESTED STUB
  *
@@ -288,23 +1066,255 @@
 
 /*****************************************************************************
- * Name      : LPITEMIDLIST SHBrowseForFolder
- * Purpose   :
- * Parameters: LPBROWSEINFOA lpbi
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
- *****************************************************************************/
-
-LPITEMIDLIST WIN32API SHBrowseForFolder(LPBROWSEINFOA lpbi)
-{
-  dprintf(("SHELL32: SHBrowseForFolder(%08xh) not implemented.\n",
-           lpbi));
-
-  return(NULL);
-}
-
+ * Name      : HRESULT SHRegCloseKey
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.505
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHRegCloseKey (HKEY hkey)
+{
+  dprintf(("SHELL32: SHRegCloseKey(%08xh)\n",
+           hkey));
+
+  return RegCloseKey( hkey );
+}
+
+/*****************************************************************************
+ * Name      : HRESULT SHRegOpenKeyA
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.506
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHRegOpenKeyA(HKEY  hKey,
+                               LPSTR lpSubKey,
+                               LPHKEY phkResult)
+{
+  dprintf(("SHELL32: SHRegOpenKeyA(%08xh,%s,%08xh)\n",
+           hKey,
+           lpSubKey,
+           phkResult));
+
+ return RegOpenKeyA(hKey,
+                    lpSubKey,
+                    phkResult);
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHRegOpenKeyW
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.507
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHRegOpenKeyW (HKEY    hKey,
+                                LPCWSTR lpszSubKey,
+                                LPHKEY  phkResult)
+{
+  dprintf(("SHELL32: SHRegOpenKeyW(%08xh,%08xh,%08xh)\n",
+           hKey,
+           lpszSubKey,
+           phkResult));
+
+ return RegOpenKeyW(hKey,
+                    lpszSubKey,
+                    phkResult);
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHRegQueryValueA
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.508
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHRegQueryValueA(HKEY   hKey,
+                                  LPSTR  lpszSubKey,
+                                  LPSTR  lpszData,
+                                  LPLONG lpcbData)
+{
+  dprintf(("SHELL32: SHRegQueryValueW(%08xh,%s,%08xh,%08xh)\n",
+           hKey,
+           lpszSubKey,
+           lpszData,
+           lpcbData));
+
+  return (HRESULT)RegQueryValueA(hKey,
+                                 lpszSubKey,
+                                 lpszData,
+                                 lpcbData);
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHRegQueryValueExA
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.509
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHRegQueryValueExA(DWORD   u,
+                                    LPSTR   v,
+                                    LPDWORD w,
+                                    LPDWORD x,
+                                    LPBYTE  y,
+                                    LPDWORD z)
+{
+  dprintf(("SHELL32: SHRegQueryValueExA(%08xh,%s,%08xh,%08xh,%08xh,%08xh)\n",
+           u,
+           v,
+           w,
+           x,
+           y,
+           z));
+
+  return (HRESULT)RegQueryValueExA(u,
+                                   v,
+                                   w,
+                                   x,
+                                   y,
+                                   z);
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHRegQueryValueExW
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.510
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHRegQueryValueExW(DWORD    u,
+                                    LPWSTR   v,
+                                    LPDWORD  w,
+                                    LPDWORD  x,
+                                    LPBYTE   y,
+                                    LPDWORD  z)
+{
+  dprintf(("SHELL32: SHRegQueryValueExW(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)\n",
+           u,
+           v,
+           w,
+           x,
+           y,
+           z));
+
+  return (HRESULT)RegQueryValueExW(u,
+                                   v,
+                                   w,
+                                   x,
+                                   y,
+                                   z);
+}
+
+
+/*****************************************************************************
+ * Name      : HRESULT SHRegQueryValueW
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.511
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *****************************************************************************/
+
+HRESULT WIN32API SHRegQueryValueW(HKEY   hKey,
+                                  LPWSTR lpszSubKey,
+                                  LPWSTR lpszData,
+                                  LPLONG lpcbData)
+{
+  dprintf(("SHELL32: SHRegQueryValueW(%08xh,%08xh,%08xh,%08xh)\n",
+           hKey,
+           lpszSubKey,
+           lpszData,
+           lpcbData));
+
+  return (HRESULT)RegQueryValueW(hKey,
+                                 lpszSubKey,
+                                 lpszData,
+                                 lpcbData);
+}
+
+
+/*****************************************************************************
+ * Name      : HGLOBAL SHAllocShared
+ * Purpose   : allocate shared memory ?
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.520
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *
+ * NOTES
+ *  parameter1 is return value from HeapAlloc
+ *  parameter2 is equal to the size allocated with HeapAlloc
+ *  parameter3 is return value from GetCurrentProcessId
+ *
+ *  the return value is posted as lParam with 0x402 (WM_USER+2) to somewhere
+ *  WM_USER+2 could be the undocumented CWM_SETPATH
+ *  the allocated memory contains a pidl
+ */
+
+HGLOBAL WIN32API SHAllocShared(LPVOID psrc,
+                               DWORD  size,
+                               DWORD  procID)
+{
+  HGLOBAL hmem;
+  LPVOID pmem;
+
+  dprintf(("SHELL32: SHAllocShared(%08xh,%08xh,%08xh)\n",
+           psrc,
+           size,
+           procID));
+
+  hmem = GlobalAlloc(GMEM_FIXED,
+                     size);
+  if (!hmem)
+    return 0;
+
+  pmem = GlobalLock (hmem);
+  if (! pmem)
+    return 0;
+
+  memcpy (pmem, psrc, size);
+  GlobalUnlock(hmem);
+  return hmem;
+}
 
 
@@ -376,4 +1386,5 @@
  *  parameter2 is return value from GetCurrentProcessId
  */
+
 HANDLE WIN32API SHFreeShared(HANDLE hmem,
                              DWORD  procID)
@@ -386,2 +1397,62 @@
 }
 
+
+/*****************************************************************************
+ * Name      : DWORD WIN32API NTSHChangeNotifyRegister
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.640
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ *
+ * NOTES
+ *   Idlist is an array of structures and Count specifies how many items in the array
+ *   (usually just one I think).
+ */
+
+DWORD WIN32API NTSHChangeNotifyRegister(HWND hwnd,
+                                        LONG events1,
+                                        LONG events2,
+                                        DWORD msg,
+                                        int count,
+                                        IDSTRUCT *idlist)
+{
+  dprintf(("SHELL32: NTSHChangeNotifyRegister(%08xh,  %08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
+           hwnd,
+           events1,
+           events2,
+           msg,
+           count,
+           idlist));
+
+   return SHChangeNotifyRegister(hwnd,
+                                 events1,
+                                 events2,
+                                 msg,
+                                 count,
+                                 idlist);
+}
+
+
+/*****************************************************************************
+ * Name      : DWORD WIN32API NTSHChangeNotifyDeregister
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.641
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1999/06/09 20:02]
+ */
+DWORD WIN32API NTSHChangeNotifyDeregister(LONG x1)
+{
+  dprintf(("SHELL32: NTSHChangeNotifyDeregister(%08xh) not implemented.\n",
+           x1));
+
+  return SHChangeNotifyDeregister(x1);
+}
+
Index: trunk/src/shell32/shell32.cpp
===================================================================
--- trunk/src/shell32/shell32.cpp	(revision 181)
+++ trunk/src/shell32/shell32.cpp	(revision 183)
@@ -1,3 +1,3 @@
-/* $Id: shell32.cpp,v 1.7 1999-06-23 22:28:52 phaller Exp $ */
+/* $Id: shell32.cpp,v 1.8 1999-06-24 19:27:49 phaller Exp $ */
 
 /*
@@ -21,4 +21,5 @@
  *****************************************************************************/
 
+#include <odin.h>
 #include <os2win.h>
 #include <shellapi.h>
@@ -65,5 +66,5 @@
  * Variables :
  * Result    :
- * Remark    :
+ * Remark    : SHELL32.289
  * Status    : UNTESTED
  *
@@ -101,5 +102,5 @@
  * Variables :
  * Result    :
- * Remark    :
+ * Remark    : SHELL32.293
  * Status    : UNTESTED
  *
@@ -154,5 +155,5 @@
  * Variables :
  * Result    :
- * Remark    :
+ * Remark    : SHELL32.287
  * Status    : UNTESTED
  *
@@ -193,5 +194,5 @@
  * Variables :
  * Result    :
- * Remark    :
+ * Remark    : SHELL32.288
  * Status    : UNTESTED
  *
@@ -239,12 +240,18 @@
 
 
-/*************************************************************************
- *              Shell_NotifyIcon    [SHELL32.240]
- *  FIXME
- *  This function is supposed to deal with the systray.
- *  Any ideas on how this is to be implimented?
- */
-BOOL WIN32API Shell_NotifyIconA(DWORD dwMessage,
-                           PNOTIFYICONDATAA pnid )
+/*****************************************************************************
+ * Name      : BOOL Shell_NotifyIconA
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.296 .297
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
+BOOL WIN32API Shell_NotifyIconA(DWORD            dwMessage,
+                                PNOTIFYICONDATAA pnid)
 {
   dprintf(("SHELL32: Shell_NotifyIconA(%08xh,%08xh) not implemented.\n",
@@ -256,10 +263,16 @@
 
 
-/*************************************************************************
- *              Shell_NotifyIcon    [SHELL32.240]
- *  FIXME
- *  This function is supposed to deal with the systray.
- *  Any ideas on how this is to be implimented?
- */
+/*****************************************************************************
+ * Name      : BOOL Shell_NotifyIconW
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : SHELL32.298
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Patrick Haller [Tue, 1998/06/15 03:00]
+ *****************************************************************************/
+
 BOOL WIN32API Shell_NotifyIconW(DWORD dwMessage,
                                          PNOTIFYICONDATAW pnid )
@@ -301,5 +314,5 @@
  * Variables :
  * Result    :
- * Remark    :
+ * Remark    : SHELL32.290 .291
  * Status    : UNTESTED STUB
  *
@@ -322,5 +335,5 @@
  * Variables :
  * Result    :
- * Remark    :
+ * Remark    : SHELL32.292
  * Status    : UNTESTED STUB
  *
@@ -354,14 +367,14 @@
  *****************************************************************************/
 
-DWORD WIN32API ShellMessageBoxW(HMODULE hmod,
-                                HWND    hwnd,
-                                DWORD   idText,
-                                DWORD   idTitle,
-                                DWORD   uType,
-                                LPCVOID arglist)
+DWORD CDECL ShellMessageBoxW(HMODULE hmod,
+                                      HWND    hwnd,
+                                      DWORD   idText,
+                                      DWORD   idTitle,
+                                      DWORD   uType,
+                                      LPCVOID arglist)
 {
   WCHAR   szText[100],
-         szTitle[100],
-         szTemp[256];
+          szTitle[100],
+          szTemp[256];
   LPWSTR pszText = &szText[0],
          pszTitle = &szTitle[0];
@@ -385,5 +398,8 @@
 
   if (! HIWORD (idText))
-    LoadStringW(hmod,idText,pszText,100);
+    LoadStringW(hmod,
+                idText,
+                pszText,
+                100);
   else
     pszText = (LPWSTR)idText;
@@ -421,10 +437,10 @@
  *****************************************************************************/
 
-DWORD WIN32API ShellMessageBoxA(HMODULE hmod,
-                                HWND    hwnd,
-                                DWORD   idText,
-                                DWORD   idTitle,
-                                DWORD   uType,
-                                LPCVOID arglist)
+DWORD CDECL ShellMessageBoxA(HMODULE hmod,
+                                      HWND    hwnd,
+                                      DWORD   idText,
+                                      DWORD   idTitle,
+                                      DWORD   uType,
+                                      LPCVOID arglist)
 {
   char   szText[100],
@@ -444,10 +460,16 @@
 
   if (!HIWORD (idTitle))
-    LoadStringA(hmod,idTitle,pszTitle,100);
+    LoadStringA(hmod,
+                idTitle,
+                pszTitle,
+                100);
   else
     pszTitle = (LPSTR)idTitle;
 
   if (! HIWORD (idText))
-    LoadStringA(hmod,idText,pszText,100);
+    LoadStringA(hmod,
+                idText,
+                pszText,
+                100);
   else
     pszText = (LPSTR)idText;
@@ -466,4 +488,2 @@
                      uType);
 }
-
-
Index: trunk/src/shell32/shell32.def
===================================================================
--- trunk/src/shell32/shell32.def	(revision 181)
+++ trunk/src/shell32/shell32.def	(revision 183)
@@ -1,6 +1,6 @@
-; $Id: shell32.def,v 1.8 1999-06-24 09:02:08 phaller Exp $
+; $Id: shell32.def,v 1.9 1999-06-24 19:27:49 phaller Exp $
 
 ;Created by BLAST for IBM's compiler
-;based on Windows NT4, SP3
+;based on Windows 95
 LIBRARY SHELL32 INITINSTANCE
 DATA MULTIPLE NONSHARED
@@ -8,150 +8,363 @@
 EXPORTS
 
-;   CheckEscapesA              = _CheckEscapesA@?                   @1
-                                 _SHELL32_2@24                      @2
-;   CheckEscapesW              = _CheckEscapesW@?                   @4
-                                 _SHELL32_4@4                       @4
-    CommandLineToArgvW         = _CommandLineToArgvW@8              @5
-;   Control_FillCache_RunDLL   = _Control_FillCache_RunDLL@?        @6
-;   Control_RunDLL             = _Control_RunDLL@?                  @10
-;   DllGetClassObject          = _DllGetClassObject@?               @12
-                                 _SHELL32_16@4                      @16
-                                 _SHELL32_18@4                      @18
-;   DoEnvironmentSubstA        = _DoEnvironmentSubstA@?             @20
-                                 _SHELL32_25@8                      @25
-                                 _SHELL32_29@4                      @29
-                                 _SHELL32_30@8                      @30
-                                 _SHELL32_31@4                      @31
-                                 _SHELL32_32@4                      @32
-                                 _SHELL32_33@4                      @33
-                                 _SHELL32_34@4                      @34
-                                 _SHELL32_35@4                      @35
-;   DoEnvironmentSubstW        = _DoEnvironmentSubstW@?             @36
-                                 _SHELL32_36@8                      @36
-                                 _SHELL32_37@12                     @37
-                                 _SHELL32_39@4                      @39
-    DragAcceptFiles            = _DragAcceptFiles@8                 ; conflict! @39
-    DragFinish                 = _DragFinish@4                      @40
-    DragQueryFile              = _DragQueryFileA@16                 @42
-                                 _SHELL32_43@4                      @43
-                                 _SHELL32_45@4                      @45
-    DragQueryFileA             = _DragQueryFileA@16                 @48
-    DragQueryFileAorW          = _DragQueryFileAorW@16              ; conflict! @51
-                                 _SHELL32_51@12                     @51
-    DragQueryFileW             = _DragQueryFileW@16                 ; conflict! @52
-                                 _SHELL32_52@4                      @52
-                                 _SHELL32_55@4                      @55
-                                 _SHELL32_56@4                      @56
-                                 _SHELL32_58@16                     @58
-                                 _SHELL32_59@0                      @59
-                                 _SHELL32_62@16                     @62
-                                 _SHELL32_63@28                     @63
-                                 _SHELL32_68@12                     @68
-                                 _SHELL32_71@8                      @71
-                                 _SHELL32_72@12                     @72
-    DragQueryPoint             = _DragQueryPoint@8                  @74
-                                 _SHELL32_75@8                      @75
-                                 _SHELL32_77@12                     @77
-;   DuplicateIcon              = _DuplicateIcon@?                   @78
-                                 _SHELL32_79@8                      @79
-    ExtractAssociatedIconA     = _ExtractAssociatedIconA@12         @80
-                                 _SHELL32_85@16                     @85
-                                 _SHELL32_89@12                     @89
-;   ExtractAssociatedIconExA   = _ExtractAssociatedIconExA@?        @99
-   SetAppStartingCursor        = _SetAppStartingCursor@8            @99
-                                 _SHELL32_100@4                     @100
-                                 _SHELL32_102@20                    @102
-                                 _SHELL32_119@4                     @119
-;   ExtractAssociatedIconExW   = _ExtractAssociatedIconExW@?        @122
-    ExtractAssociatedIconW     = _ExtractAssociatedIconW@12         @123
-    ExtractIconA               = _ExtractIconA@12                   @131
-    ExtractIconEx              = _ExtractIconExA@20                 @133
-    ExtractIconExA             = _ExtractIconExA@20                 @136
-    ExtractIconExW             = _ExtractIconExW@20                        ; NT4 doesn't use it!
-                                 _SHELL32_145@8                     @145
-;   ExtractIconResInfoA        = _ExtractIconResInfoA@?             @146
-;   ExtractIconResInfoW        = _ExtractIconResInfoW@?             @148
-                                 _SHELL32_152@4                     @152
-                                 _SHELL32_155@4                     @155
-                                 _SHELL32_158@12                    @158
-                                 _SHELL32_162@4                     @162
-                                 _SHELL32_165@8                     @165
-                                 _SHELL32_175@16                    @175
-    ExtractIconW               = _ExtractIconW@12                   @178
-;   ExtractVersionResource16W  = _ExtractVersionResource16W@?       @180
-                                 _SHELL32_181@8                     @181
-    FindExecutableA            = _FindExecutableA@12                @184
-    FindExecutableW            = _FindExecutableW@12                @185
-;   FreeIconList               = _FreeIconList@?                    @186
-;   InternalExtractIconListA   = _InternalExtractIconListA@?        @187
-;   InternalExtractIconListW   = _InternalExtractIconListW@?        @188
-;   OpenAs_RunDLL              = _OpenAs_RunDLL@?                   @189
-;   PrintersGetCommand_RunDLL  = _PrintersGetCommand_RunDLL@?       @190
-    RealShellExecuteA          = _RealShellExecuteA@24              @191
-    RealShellExecuteExA        = _RealShellExecuteExA@4             @192
-                                 _SHELL32_195@4                     @195
-                                 _SHELL32_196@4                     @196
-    RealShellExecuteExW        = _RealShellExecuteExW@4             @201
-    RealShellExecuteW          = _RealShellExecuteW@24              @202
-;   RegenerateUserEnvironment  = _RegenerateUserEnvironment@?       @203
-    SHAddToRecentDocs          = _SHAddToRecentDocs@8               @204
-;   SHAppBarMessage            = _SHAppBarMessage@?                 @205
-    SHBrowseForFolder          = _SHBrowseForFolder@4               @206
-    SHBrowseForFolderA         = _SHBrowseForFolder@4               @207
-    SHChangeNotify             = _SHChangeNotify@16                 @208
-    SHFileOperation            = _SHFileOperationA@4                @209
-    SHFileOperationA           = _SHFileOperationA@4                @210
-    SHFileOperationW           = _SHFileOperationW@4                       ; NT4 doesn't use it!
-;   SHFormatDrive              = _SHFormatDrive@?                   @211
-;   SHFreeNameMappings         = _SHFreeNameMappings@?              @212
-;   SHGetDataFromIDListA       = _SHGetDataFromIDListA@?            @213
-    SHGetDesktopFolder         = _SHGetDesktopFolder@4              @214
-    SHGetFileInfo              = _SHGetFileInfoA@20                 @215
-    SHGetFileInfoA             = _SHGetFileInfoA@20                 @216
-    SHGetFileInfoW             = _SHGetFileInfoW@20                        ; NT4 doesn't use it!
-;   SHGetInstanceExplorer      = _SHGetInstanceExplorer@?           @217
-    SHGetMalloc                = _SHGetMalloc@4                     @218
-    SHGetPathFromIDList        = _SHGetPathFromIDListA@8            @219
-    SHGetPathFromIDListA       = _SHGetPathFromIDListA@8            @220
-    SHGetSpecialFolderLocation = _SHGetSpecialFolderLocation@12     @221
-;   SHHelpShortcuts_RunDLL     = _SHHelpShortcuts_RunDLL@?          @222
-;   SHLoadInProc               = _SHLoadInProc@?                    @223
-;   SheChangeDirA              = _SheChangeDirA@?                   @224
-;   SheChangeDirExA            = _SheChangeDirExA@?                 @225
-;   SheChangeDirExW            = _SheChangeDirExW@?                 @226
-;   SheChangeDirW              = _SheChangeDirW@?                   @227
-;   SheConvertPathW            = _SheConvertPathW@?                 @228
-;   SheFullPathA               = _SheFullPathA@?                    @229
-;   SheFullPathW               = _SheFullPathW@?                    @230
-;   SheSetCurDrive             = _SheSetCurDrive@4                  @231
-;   SheGetDirA                 = _SheGetDirA@?                      @232
-;   SheGetDirExW               = _SheGetDirExW@?                    @233
-;   SheGetDirW                 = _SheGetDirW@?                      @234
-;   SheGetPathOffsetW          = _SheGetPathOffsetW@?               @235
-;   SheRemoveQuotesA           = _SheRemoveQuotesA@?                @236
-;   SheRemoveQuotesW           = _SheRemoveQuotesW@?                @237
-;   SheSetCurDrive             = _SheSetCurDrive@?                  @238
-;   SheShortenPathA            = _SheShortenPathA@?                 @239
-;   SheShortenPathW            = _SheShortenPathW@?                 @240
-    ShellAboutA                = _ShellAboutA@16                    @241
-    ShellAboutW                = _ShellAboutW@16                    @242
-    ShellExecuteA              = _ShellExecuteA@24                  @243
-    ShellExecuteEx             = _ShellExecuteExA@4                 @244
-    ShellExecuteExA            = _ShellExecuteExA@4                 @245
-    ShellExecuteExW            = _ShellExecuteExW@4                        ; NT4 doesn't use it!
-    ShellExecuteW              = _ShellExecuteW@24                  @246
-    ShellExecute               = _ShellExecuteA@24                         ; NT4 doesn't use it!
-    Shell_NotifyIcon           = _Shell_NotifyIconA@8               @247
-    Shell_NotifyIconA          = _Shell_NotifyIconA@8               @248
-    Shell_NotifyIconW          = _Shell_NotifyIconW@8                      ; NT4 doesn't use it!
-;   Shl1632_ThunkData32        = _Shl1632_ThunkData32@?             @249
-;   Shl3216_ThunkData32        = _Shl3216_ThunkData32@?             @250
-
-    SHLockShared               = _SHLockShared@8                    @521
-    SHUnlockShared             = _SHUnlockShared@4                  @522
-    SHFreeShared               = _SHFreeShared@8                    @523
-
-
-    ShellMessageBoxW         = _ShellMessageBoxW@24       @182
-    ShellMessageBoxA         = _ShellMessageBoxA@24       @183
-
+    SHChangeNotifyRegister            = _SHChangeNotifyRegister@24            @2
+;   CheckEscapesA                     = _CheckEscapesA@8                      @3
+    SHChangeNotifyDeregister          = _SHChangeNotifyDeregister@4           @4
+;   SHChangeNotifyUpdateEntryList     = _SHChangeNotifyUpdateEntryList@16     @5
+;   CheckEscapesW                     = _CheckEscapesW@8                      @6
+    CommandLineToArgvW                = _CommandLineToArgvW@8                 @7
+    Control_FillCache_RunDLL          = _Control_FillCache_RunDLL@16          @8
+;   PifMgr_OpenProperties             = _PifMgr_OpenProperties@16             @9
+;   PifMgr_GetProperties              = _PifMgr_GetProperties@20              @10
+;   PifMgr_SetProperties              = _PifMgr_SetProperties@20              @11
+;   Control_FillCache_RunDLLA         = _Control_FillCache_RunDLLA@16         @12
+;   PifMgr_CloseProperties            = _PifMgr_CloseProperties@8             @13
+;   Control_FillCache_RunDLLW         = _Control_FillCache_RunDLLW@16         @14
+;   ILGetDisplayName                  = _ILGetDisplayName@8                   @15
+    ILFindLastID                      = _ILFindLastID@4                       @16
+;   ILRemoveLastID                    = _ILRemoveLastID@4                     @17
+    ILClone                           = _ILClone@4                            @18
+;   ILCloneFirst                      = _ILCloneFirst@4                       @19
+;   ILGlobalClone                     = _ILGlobalClone@4                      @20
+;   ILIsEqual                         = _ILIsEqual@8                          @21
+;   Control_RunDLL                    = _Control_RunDLL@16                    @22
+;   ILIsParent                        = _ILIsParent@12                        @23
+;   ILFindChild                       = _ILFindChild@8                        @24
+    ILCombine                         = _ILCombine@8                          @25
+;   ILLoadFromStream                  = _ILLoadFromStream@8                   @26
+;   ILSaveToStream                    = _ILSaveToStream@8                     @27
+;   SHILCreateFromPath                = _SHILCreateFromPath@12                @28
+    PathIsRoot                        = _PathIsRootAW@4                       @29
+    PathBuildRoot                     = _PathBuildRootAW@8                    @30
+    PathFindExtension                 = _PathFindExtensionAW@4                @31
+    PathAddBackslash                  = _PathAddBackslashAW@4                 @32
+    PathRemoveBlanks                  = _PathRemoveBlanksAW@4                 @33
+    PathFindFilename                  = _PathFindFilenameAW@4                 @34
+    PathRemoveFileSpec                = _PathRemoveFileSpecA@4                @35
+    PathAppend                        = _PathAppendA@8                        @36
+    PathCombine                       = _PathCombineAW@12                     @37
+;   PathStripPath                     = _PathStripPathAW@?                    @38
+    PathIsUNC                         = _PathIsUNCAW@4                        @39
+    PathIsRelative                    = _PathIsRelativeAW@4                   @40
+;   Control_RunDLLA                   = _Control_RunDLLA@16                   @41
+;   Control_RunDLLW                   = _Control_RunDLLW@16                   @42
+    PathIsExe                         = _PathIsExeAW@4                        @43
+;   DoEnvironmentSubstA               = _DoEnvironmentSubstA@8                @44
+    PathFileExists                    = _PathFileExistsAW@4                   @45
+    PathMatchSpec                     = _PathMatchSpecAW@8                    @46
+;   PathMakeUniqueName                = _PathMakeUniqueNameAW@20              @47
+    PathSetDlgItemPath                = _PathSetDlgItemPathAW@12              @48
+    PathQualify                       = _PathQualifyAW@4                      @49
+;   PathStripToRoot                   = _PathStripToRootAW@4                  @50
+    PathResolve                       = _PathResolve@12                       @51
+    PathGetArgs                       = _PathGetArgsAW@4                      @52
+;   DoEnvironmentSubstW               = _DoEnvironmentSubstW@?                @53
+    DragAcceptFiles                   = _DragAcceptFiles@8                    @54
+    PathQuoteSpaces                   = _PathQuoteSpacesAW@4                  @55
+    PathUnquoteSpaces                 = _PathUnquoteSpacesAW@4                @56
+    PathGetDriveNumber                = _PathGetDriveNumber@4                 @57
+    ParseField                        = _ParseFieldA@16                       @58
+;   RestartDialog                     = _RestartDialog@12                     @59
+    ExitWindowsDialog                 = _ExitWindowsDialog@4                  @60
+    RunFileDlg                        = _RunFileDlg@24                        @61
+    PickIconDlg                       = _PickIconDlg@16                       @62
+    GetFileNameFromBrowse             = _GetFileNameFromBrowse@28             @63
+    DriveType                         = _DriveType@4                          @64
+;   InvalidateDriveType               = _InvalidateDriveType@?                @65
+;   IsNetDrive                        = _IsNetDrive@?                         @66
+;   Shell_MergeMenus                  = _Shell_MergeMenus@24                  @67
+    SHGetSettings                     = _SHGetSettings@12                     @68
+;   SHGetNetResource                  = _SHGetNetResource@?                   @69
+;   SHCreateDefClassObject            = _SHCreateDefClassObject@?             @70
+    Shell_GetImageList                = _Shell_GetImageList@8                 @71
+    Shell_GetCachedImageIndex         = _Shell_GetCachedImageIndex@12         @72
+    SHShellFolderView_Message         = _SHShellFolderView_Message@12         @73
+;   SHCreateStdEnumFmtEtc             = _SHCreateStdEnumFmtEtc@?              @74
+    PathYetAnotherMakeUniqueName      = _PathYetAnotherMakeUniqueNameA@8      @75
+;   DragQueryInfo                     = _DragQueryInfo@?                      @76
+    SHMapPIDLToSystemImageListIndex   = _SHMapPIDLToSystemImageListIndex@12   @77
+    OleStrToStrN                      = _OleStrToStrN@16                      @78
+    StrToOleStrN                      = _StrToOleStrN@16                      @79
+    DragFinish                        = _DragFinish@4                         @80
+    DragQueryFile                     = _DragQueryFileA@16                    @81
+    DragQueryFileA                    = _DragQueryFileA@16                    @82
+;   CIDLData_CreateFromIDArray        = _CIDLData_CreateFromIDArray@?         @83
+;   SHIsBadInterfacePtr               = _SHIsBadInterfacePtr@?                @84
+    OpenRegStream                     = _OpenRegStream@16                     @85
+    SHRegisterDragDrop                = _SHRegisterDragDrop@8                 @86
+    SHRevokeDragDrop                  = _SHRevokeDragDrop@4                   @87
+;   SHDoDragDrop                      = _SHDoDragDrop@?                       @88
+    SHCloneSpecialIDList              = _SHCloneSpecialIDList@12              @89
+;   SHFindFiles                       = _SHFindFiles@?                        @90
+;   SHFindComputer                    = _SHFindComputer@?                     @91
+;   PathGetShortPath                  = _PathGetShortPathAW@?                 @92
+;   Win32CreateDirectory              = _Win32CreateDirectory@?               @93
+;   Win32RemoveDirectory              = _Win32RemoveDirectory@?               @94
+;   SHLogILFromFSIL                   = _SHLogILFromFSIL@4                    @95
+    StrRetToStrN                      = _StrRetToStrN@16                      @96
+    SHWaitForFileToOpen               = _SHWaitForFileToOpen@12               @97
+;   SHGetRealIDL                      = _SHGetRealIDL@12                      @98
+    SetAppStartingCursor              = _SetAppStartingCursor@8               @99
+    SHRestricted                      = _SHRestricted@4                       @100
+    DragQueryFileAorW                 = _DragQueryFileAorW@16                 @101
+    SHCoCreateInstance                = _SHCoCreateInstance@20                @102
+    SignalFileOpen                    = _SignalFileOpen@4                     @103
+;   FileMenu_DeleteAllItems           = _FileMenu_DeleteAllItems@4            @104
+;   FileMenu_DrawItem                 = _FileMenu_DrawItem@8                  @105
+;   FileMenu_FindSubMenuByPidl        = _FileMenu_FindSubMenuByPidl@8         @106
+;   FileMenu_GetLastSelectedItemPidls = _FileMenu_GetLastSelectedItemPidls@12 @107
+;   FileMenu_HandleMenuChar           = _FileMenu_HandleMenuChar@8            @108
+;   FileMenu_InitMenuPopup            = _FileMenu_InitMenuPopup@4             @109
+;   FileMenu_InsertUsingPidl          = _FileMenu_InsertUsingPidl@24          @110
+;   FileMenu_Invalidate               = _FileMenu_Invalidate@4                @111
+;   FileMenu_MeasureItem              = _FileMenu_MeasureItem@8               @112
+;   FileMenu_ReplaceUsingPidl         = _FileMenu_ReplaceUsingPidl@20         @113
+;   FileMenu_Create                   = _FileMenu_Create@20                   @114
+;   FileMenu_AppendItem               = _FileMenu_AppendItem@24               @115
+;   FileMenu_TrackPopupMenuEx         = _FileMenu_TrackPopupMenuEx@24         @116
+;   FileMenu_DeleteItemByCmd          = _FileMenu_DeleteItemByCmd@8           @117
+;   FileMenu_Destroy                  = _FileMenu_Destroy@4                   @118
+    IsLFNDrive                        = _IsLFNDrive@4                         @119
+;   FileMenu_AbortInitMenu            = _FileMenu_AbortInitMenu@0             @120
+    SHFlushClipboard                  = _SHFlushClipboard@0                   @121
+    RunDLL_CallEntry16                = _RunDLL_CallEntry16@20                @122
+    SHFreeUnusedLibraries             = _SHFreeUnusedLibraries@0              @123
+;   FileMenu_AppendFilesForPidl       = _FileMenu_AppendFilesForPidl@12       @124
+;   FileMenu_AddFilesForPidl          = _FileMenu_AddFilesForPidl@28          @125
+    SHOutOfMemoryMessageBox           = _SHOutOfMemoryMessageBox@12           @126
+    SHWinHelp                         = _SHWinHelp@16                         @127
+;   DllGetClassObject                 = _DllGetClassObject@?                  @128
+;   DAD_AutoScroll                    = _DAD_AutoScroll@?                     @129
+;   DAD_DragEnter                     = _DAD_DragEnter@?                      @130
+;   DAD_DragEnterEx                   = _DAD_DragEnterEx@?                    @131
+;   DAD_DragLeave                     = _DAD_DragLeave@?                      @132
+    DragQueryFileW                    = _DragQueryFileW@16                    @133
+;   DAD_DragMove                      = _DAD_DragMove@?                       @134
+    DragQueryPoint                    = _DragQueryPoint@8                     @135
+;   DAD_SetDragImage                  = _DAD_SetDragImage@?                   @136
+    DAD_ShowDragImage                 = _DAD_ShowDragImage@4                  @137
+;   DuplicateIcon                     = _DuplicateIcon@?                      @138
+;   Desktop_UpdateBriefcaseOnEvent    = _Desktop_UpdateBriefcaseOnEvent@?     @139
+;   FileMenu_DeleteItemByIndex        = _FileMenu_DeleteItemByIndex@8         @140
+;   FileMenu_DeleteItemByFirstID      = _FileMenu_DeleteItemByFirstID@8       @141
+;   FileMenu_DeleteSeparator          = _FileMenu_DeleteSeparator@4           @142
+;   FileMenu_EnableItemByCmd          = _FileMenu_EnableItemByCmd@12          @143
+;   FileMenu_GetItemExtent            = _FileMenu_GetItemExtent@8             @144
+    PathFindOnPath                    = _PathFindOnPathAW@8                   @145
+    RLBuildListOfPaths                = _RLBuildListOfPaths@0                 @146
+;   SHCLSIDFromString                 = _SHCLSIDFromString@8                  @147
+    ExtractAssociatedIconA            = _ExtractAssociatedIconA@12            @148
+;   SHFind_InitMenuPopup              = _SHFind_InitMenuPopup@16              @149
+;   ExtractAssociatedIconExA          = _ExtractAssociatedIconExA@?           @150
+    SHLoadOLE                         = _SHLoadOLE@4                          @151
+    ILGetSize                         = _ILGetSize@4                          @152
+;   ILGetNext                         = _ILGetNext@4                          @153
+;   ILAppend                          = _ILAppend@12                          @154
+    ILFree                            = _ILFree@4                             @155
+;   ILGlobalGree                      = _ILGlobalFree@4                       @156
+;   ILCreateFromPath                  = _ILCreateFromPath@4                   @157
+    PathGetExtension                  = _PathGetExtensionAW@12                @158
+;   PathIsDirectory                   = _PathIsDirectoryAW@?                  @159
+;   SHNetConnectionDialog             = _SHNetConnectionDialog@?              @160
+    SHRunControlPanel                 = _SHRunControlPanel@8                  @161
+    SHSimpleIDListFromPath            = _SHSimpleIDListFromPathAW@4           @162
+    StrToOleStr                       = _StrToOleStr@8                        @163
+;   Win32DeleteFile                   = _Win32DeleteFile@?                    @164
+    SHCreateDirectory                 = _SHCreateDirectory@8                  @165
+;   CallCPLEntry16                    = _CallCPLEntry16@?                     @166
+;   SHAddFromPropSheetExtArray        = _SHAddFromPropSheetExtArray@?         @167
+;   SHCreatePropSheetExtArray         = _SHCreatePropSheetExtArray@?          @168
+;   SHDestroyPropSheetExtArray        = _SHDestroyPropSheetExtArray@?         @169
+;   SHReplaceFromPropSheetExtArray    = _SHReplaceFromPropSheetExtArray@?     @170
+;   PathCleanupSpec                   = _PathCleanupSpecAW@?                  @171
+;   SHCreateLinks                     = _SHCreateLinks@?                      @172
+    SHValidateUNC                     = _SHValidateUNC@12                     @173
+    SHCreateShellFolderViewEx         = _SHCreateShellFolderViewEx@8          @174
+    SHGetSpecialFolderPath            = _SHGetSpecialFolderPath@16            @175
+    SHSetInstanceExplorer             = _SHSetInstanceExplorer@4              @176
+;   DAD_SetDragImageFromListView      = _DAD_SetDragImageFromListView@?       @177
+;   SHObjectProperties                = _SHObjectProperties@?                 @178
+;   SHGetNewLinkInfoA                 = _SHGetNewLinkInfoA@?                  @179
+;   SHGetNewLinkInfoW                 = _SHGetNewLinkInfoW@?                  @180
+    RegisterShellHook                 = _RegisterShellHook@8                  @181
+    ShellMessageBoxW                  = _ShellMessageBoxW                     @182 ;cdecl
+    ShellMessageBoxA                  = _ShellMessageBoxA                     @183 ;cdecl
+    ArrangeWindows                    = _ArrangeWindows@20                    @184
+;   SHHandleDiskFull                  = _SHHandleDiskFull@?                   @185
+;   ExtractAssociatedIconExW          = _ExtractAssociatedIconExW@?           @186
+    ExtractAssociatedIconW            = _ExtractAssociatedIconW@12            @187
+    ExtractIconA                      = _ExtractIconA@12                      @188
+    ExtractIconEx                     = _ExtractIconExA@20                    @189
+    ExtractIconExA                    = _ExtractIconExA@20                    @190
+    ExtractIconExW                    = _ExtractIconExW@20                    @191
+;   ExtractIconResInfoA               = _ExtractIconResInfoA@?                @192
+;   ExtractIconResInfoW               = _ExtractIconResInfoW@?                @193
+    ExtractIconW                      = _ExtractIconW@12                      @194
+    SHFree                            = _SHFree@4                             @195
+    SHAlloc                           = _SHAlloc@4                            @196
+;   SHGlobalDefect                    = _SHGlobalDefect@?                     @197
+    SHAbortInvokeCommand              = _SHAbortInvokeCommand@0               @198
+;   SHGetFileIcon                     = _SHGetFileIcon@?                      @199
+;   SHLocalAlloc                      = _SHLocalAlloc@?                       @200
+;   SHLocalFree                       = _SHLocalFree@?                        @201
+;   SHLocalReAlloc                    = _SHLocalReAlloc@?                     @202
+;   AddCommasW                        = _AddCommasW@?                         @203
+;   ShortSizeFormatW                  = _ShortSizeFormatW@?                   @204
+;   Printer_LoadIconsW                = _Printer_LoadIconsW@?                 @205
+;   Link_AddExtraDataSection          = _Link_AddExtraDataSection@?           @206
+;   Link_ReadExtraDataSection         = _Link_ReadExtraDataSection@?          @207
+;   Link_RemoveExtraDataSection       = _Link_RemoveExtraDataSection@?        @208
+;   Int64ToString                     = _Int64ToString@?                      @209
+;   LargeIntegerToString              = _LargeIntegerToString@?               @210
+;   Printers_GetPidl                  = _Printers_GetPidl@?                   @211
+;   Printer_AddPrinterPropPages       = _Printer_AddPrinterPropPages@?        @212
+;   Printers_RegisterWindowW          = _Printers_RegisterWindowW@?           @213
+;   Printers_UnregisterWindow         = _Printers_UnregisterWindow@?          @214
+;   SHStartNetConnectionDialog        = _SHStartNetConnectionDialog@12        @215
+;   ExtractVersionResource16W         = _ExtractVersionResource16W@?          @216
+;   FindExeDlgProc                    = _FindExeDlgProc@?                     @217
+    FindExecutableA                   = _FindExecutableA@12                   @218
+    FindExecutableW                   = _FindExecutableW@12                   @219
+;   FreeIconList                      = _FreeIconList@4                       @220
+;   InternalExtractIconListA          = _InternalExtractIconListA@?           @221
+;   InternalExtractIconListW          = _InternalExtractIconListW@?           @222
+;   OpenAs_RunDLL                     = _OpenAs_RunDLL@?                      @223
+;   OpenAs_RunDLLA                    = _OpenAs_RunDLLA@?                     @224
+;   OpenAs_RunDLLW                    = _OpenAs_RunDLLW@?                     @225
+;   PrintersGetCommand_RunDLL         = _PrintersGetCommand_RunDLL@?          @226
+;   PrintersGetCommand_RunDLLA        = _PrintersGetCommand_RunDLLA@?         @227
+;   PrintersGetCommand_RunDLLW        = _PrintersGetCommand_RunDLLW@?         @228
+    RealShellExecuteA                 = _RealShellExecuteA@24                 @229
+    RealShellExecuteExA               = _RealShellExecuteExA@4                @230
+    RealShellExecuteExW               = _RealShellExecuteExW@4                @231
+    RealShellExecuteW                 = _RealShellExecuteW@24                 @232
+;   RegenerateUserEnvironment         = _RegenerateUserEnvironment@?          @233
+    SHAddToRecentDocs                 = _SHAddToRecentDocs@8                  @234
+;   SHAppBarMessage                   = _SHAppBarMessage@?                    @235
+    SHBrowseForFolder                 = _SHBrowseForFolder@4                  @236
+    SHBrowseForFolderA                = _SHBrowseForFolderA@4                 @237
+    SHBrowseForFolderW                = _SHBrowseForFolderW@4                 @238
+    SHChangeNotify                    = _SHChangeNotify@16                    @239
+;   SHEmptyRecycleBinA                = _SHEmptyRecycleBinA@12                @240
+;   SHEmptyRecycleBinW                = _SHEmptyRecycleBinW@12                @241
+    SHFileOperation                   = _SHFileOperationAW@4                  @242
+    SHFileOperationA                  = _SHFileOperationA@4                   @243
+    SHFileOperationW                  = _SHFileOperationW@4                   @244
+;   SHFormatDrive                     = _SHFormatDrive@?                      @245
+;   SHFreeNameMappings                = _SHFreeNameMappings@?                 @246
+;   SHGetDataFromIDListA              = _SHGetDataFromIDListA@?               @247
+;   SHGetDataFromIDListW              = _SHGetDataFromIDListW@?               @248
+;   PathParseIconLocation             = _PathParseIconLocationAW@4            @249
+;   PathRemoveExtension               = _PathRemoveExtensionAW@4              @250
+;   PathRemoveArgs                    = _PathRemoveArgsAW@4                   @251
+    SHGetDesktopFolder                = _SHGetDesktopFolder@4                 @252
+    SHGetFileInfo                     = _SHGetFileInfoA@20                    @253
+    SHGetFileInfoA                    = _SHGetFileInfoA@20                    @254
+    SHGetFileInfoW                    = _SHGetFileInfoW@20                    @255
+    SHGetInstanceExplorer             = _SHGetInstanceExplorer@4              @256
+    SHGetMalloc                       = _SHGetMalloc@4                        @257
+;   SHGetNewLinkInfo                  = _SHGetNewLinkInfo@20                  @258
+    SHGetPathFromIDList               = _SHGetPathFromIDListA@8               @259
+    SHGetPathFromIDListA              = _SHGetPathFromIDListA@8               @260
+    SHGetPathFromIDListW              = _SHGetPathFromIDListW@8               @261
+    SHGetSpecialFolderLocation        = _SHGetSpecialFolderLocation@12        @262
+;   SHHelpShortcuts_RunDLL            = _SHHelpShortcuts_RunDLL@16            @263
+;   SHHelpShortcuts_RunDLLA           = _SHHelpShortcuts_RunDLLA@16           @264
+;   SHHelpShortcuts_RunDLLW           = _SHHelpShortcuts_RunDLLW@16           @265
+;   SHLoadInProc                      = _SHLoadInProc@4                       @266
+;   SHQueryRecycleBinA                = _SHQueryRecycleBinA@8                 @267
+;   SHQueryRecycleBinW                = _SHQueryRecycleBinW@8                 @268
+;   SHUpdateRecycleBinIcon            = _SHUpdateRecycleBinIcon@0             @269
+;   SheChangeDirA                     = _SheChangeDirA@4                      @270
+;   SheChangeDirExA                   = _SheChangeDirExA@?                    @271
+;   SheChangeDirExW                   = _SheChangeDirExW@?                    @272
+    SheChangeDirW                     = _SheChangeDirW@4                      @273
+;   SheConvertPathW                   = _SheConvertPathW@?                    @274
+;   SheFullPathA                      = _SheFullPathA@?                       @275
+;   SheFullPathW                      = _SheFullPathW@?                       @276
+;   SheSetCurDrive                    = _SheSetCurDrive@4                     @277
+;   SheGetDirA                        = _SheGetDirA@?                         @278
+;   SheGetDirExW                      = _SheGetDirExW@?                       @279
+    SheGetDirW                        = _SheGetDirW@8                         @280
+;   SheGetPathOffsetW                 = _SheGetPathOffsetW@?                  @281
+;   SheRemoveQuotesA                  = _SheRemoveQuotesA@?                   @282
+;   SheRemoveQuotesW                  = _SheRemoveQuotesW@?                   @283
+;   SheSetCurDrive                    = _SheSetCurDrive@?                     @284
+;   SheShortenPathA                   = _SheShortenPathA@?                    @285
+;   SheShortenPathW                   = _SheShortenPathW@?                    @286
+    ShellAboutA                       = _ShellAboutA@16                       @287
+    ShellAboutW                       = _ShellAboutW@16                       @288
+    ShellExecuteA                     = _ShellExecuteA@24                     @289
+    ShellExecuteEx                    = _ShellExecuteExA@4                    @290
+    ShellExecuteExA                   = _ShellExecuteExA@4                    @291
+    ShellExecuteExW                   = _ShellExecuteExW@4                    @292
+    ShellExecuteW                     = _ShellExecuteW@24                     @293
+    ShellExecute                      = _ShellExecuteA@24                     @294
+;   ShellHookProc                     = _ShellHookProc@?                      @295
+    Shell_NotifyIcon                  = _Shell_NotifyIconA@8                  @296
+    Shell_NotifyIconA                 = _Shell_NotifyIconA@8                  @297
+    Shell_NotifyIconW                 = _Shell_NotifyIconW@8                  @298
+;   Shl1632_ThunkData32               = _Shl1632_ThunkData32@?                @299
+;   Shl3216_ThunkData32               = _Shl3216_ThunkData32@?                @300
+;   StrChrA                           = _StrChrA@?                            @301
+;   StrChrIA                          = _StrChrIA@?                           @302
+;   StrChrIW                          = _StrChrIW@?                           @303
+    StrChrW                           = _StrChrW@8                            @304
+;   StrCmpNA                          = _StrCmpNA@?                           @305
+;   StrCmpNIA                         = _StrCmpNIA@?                          @306
+    StrCmpNIW                         = _StrCmpNIW@12                         @307
+;   StrCmpNW                          = _StrCmpNW@?                           @308
+;   StrCpyNA                          = _StrCpyNA@?                           @309
+;   StrCpyNW                          = _StrCpyNW@?                           @310
+;   StrNCmpA                          = _StrNCmpA@?                           @311
+;   StrNCmpIA                         = _StrNCmpIA@?                          @312
+;   StrNCmpIW                         = _StrNCmpIW@?                          @313
+;   StrNCmpW                          = _StrNCmpW@?                           @314
+;   StrCpyA                           = _StrCpyA@?                            @315
+;   StrCpyW                           = _StrCpyW@?                            @316
+;   StrRChrA                          = _StrRChrA@?                           @317
+;   StrRChrIA                         = _StrRChrIA@?                          @318
+;   StrRChrIW                         = _StrRChrIW@?                          @319
+;   StrRChrW                          = _StrRChrW@?                           @320
+;   StrRStrA                          = _StrRStrA@?                           @321
+;   StrRStrIA                         = _StrRStrIA@?                          @322
+;   StrRStrIW                         = _StrRStrIW@?                          @323
+;   StrRStrW                          = _StrRStrW@?                           @324
+;   StrStrA                           = _StrStrA@?                            @325
+;   StrStrIA                          = _StrStrIA@?                           @326
+;   StrStrIW                          = _StrStrIW@?                           @327
+;   StrStrW                           = _StrStrW@?                            @328
+;   WOWShellExecute                   = _WOWShellExecute@?                    @329
+    SHRegCloseKey                     = _SHRegCloseKey@4                      @505
+    SHRegOpenKeyA                     = _SHRegOpenKeyA@12                     @506
+    SHRegOpenKeyW                     = _SHRegOpenKeyW@12                     @507
+    SHRegQueryValueA                  = _SHRegQueryValueA@16                  @508
+    SHRegQueryValueExA                = _SHRegQueryValueExA@24                @509
+    SHRegQueryValueExW                = _SHRegQueryValueExW@24                @510
+    SHRegQueryValueW                  = _SHRegQueryValueW@16                  @511
+;   SHRegDeleteKeyW                   = _SHRegDeleteKeyW@8                    @512
+    SHAllocShared                     = _SHAllocShared@12                     @520
+    SHLockShared                      = _SHLockShared@8                       @521
+    SHUnlockShared                    = _SHUnlockShared@4                     @522
+    SHFreeShared                      = _SHFreeShared@8                       @523
+;   RealDriveType                     = _RealDriveType@8                      @524
+;   RealDriveTypeFlags                = _RealDriveTypeFlags@8                 @525
+    NTSHChangeNotifyRegister          = _NTSHChangeNotifyRegister@24          @640
+    NTSHChangeNotifyDeregister        = _NTSHChangeNotifyDeregister@4         @641
+;   SHChangeNotifyReceive             = _SHChangeNotifyReceive@16             @643
+;   SHChangeNotification_Lock         = _SHChangeNotification_Lock@16         @644
+;   SHChangeNotification_Unlock       = _SHChangeNotification_Unlock@16       @645
+;   SHChangeRegistrationReceive       = _SHChangeRegistrationReceive@8        @646
+;   ReceiveAddToRecentDocs            = _ReceiveAddToRecentDocs@8             @647
+;   SHWaitOp_Operate                  = _SHWaitOp_Operate@8                   @648
+;   PathIsSameRoot                    = _PathIsSameRootAW@8                   @650
+    ReadCabinetState                  = _ReadCabinetState@8                   @651
+    WriteCabinetState                 = _WriteCabinetState@4                  @652
+    PathProcessCommand                = _PathProcessCommand@16                @653
+                                        _SHELL32_654@8                        @654
+    FileIconInit                      = _FileIconInit@4                       @660
+    IsUserAdmin                       = _IsUserAdmin@0                        @680
+
+;   FOOBAR1217                        = _FOOBAR1217@?                         @1217
+
+
Index: trunk/src/shell32/shell32.h
===================================================================
--- trunk/src/shell32/shell32.h	(revision 181)
+++ trunk/src/shell32/shell32.h	(revision 183)
@@ -1,3 +1,3 @@
-/* $Id: shell32.h,v 1.3 1999-06-10 16:56:09 phaller Exp $ */
+/* $Id: shell32.h,v 1.4 1999-06-24 19:27:49 phaller Exp $ */
 
 #ifndef __shell32_H__
@@ -69,4 +69,42 @@
 
 typedef void *LPSHELLFOLDER;
+
+
+/****************************************************************************
+*  STRRET (temporary, move it away)
+*/
+#define STRRET_WSTR    0x0000
+#define STRRET_OFFSETA 0x0001
+#define STRRET_CSTRA   0x0002
+#define STRRET_ASTR    0X0003
+#define STRRET_OFFSETW 0X0004
+#define STRRET_CSTRW   0X0005
+
+
+typedef struct _STRRET
+{ UINT uType;              /* STRRET_xxx */
+  union
+  {
+    LPWSTR pOleStr;        /* OLESTR that will be freed */
+    LPSTR  pStr;
+    UINT   uOffset;        /* OffsetINT32o SHITEMID (ANSI) */
+    char   cStr[MAX_PATH]; /* Buffer to fill in */
+    WCHAR  cStrW[MAX_PATH];
+  }u;
+} STRRET,*LPSTRRET;
+
+
+
+/****************************************************************************
+ * Prototypes                                                               *
+ ****************************************************************************/
+
+HANDLE  WIN32API SHFreeShared(HANDLE hmem, DWORD  procID);
+DWORD   WIN32API SHFree(LPVOID x);
+LPVOID  WIN32API SHAlloc(DWORD len);
+HRESULT WIN32API SHGetSpecialFolderLocation(HWND hwndOwner, int nFolder, LPITEMIDLIST *ppidl);
+BOOL    WIN32API SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath);
+BOOL    WIN32API SHGetPathFromIDListA(LPCITEMIDLIST pidl, LPSTR  pszPath);
+LPSTR   WIN32API PathCombineA(LPSTR szDest, LPCSTR lpszDir, LPCSTR lpszFile);
 
 
Index: trunk/src/shell32/unknown.cpp
===================================================================
--- trunk/src/shell32/unknown.cpp	(revision 181)
+++ trunk/src/shell32/unknown.cpp	(revision 183)
@@ -1,3 +1,3 @@
-/* $Id: unknown.cpp,v 1.2 1999-06-23 22:28:52 phaller Exp $ */
+/* $Id: unknown.cpp,v 1.3 1999-06-24 19:27:49 phaller Exp $ */
 
 /*
@@ -41,5 +41,5 @@
  * Variables :
  * Result    :
- * Remark    :
+ * Remark    : SHELL32.229
  * Status    : UNTESTED UNKNOWN
  *
@@ -77,5 +77,5 @@
  * Variables :
  * Result    :
- * Remark    :
+ * Remark    : SHELL32.232
  * Status    : UNTESTED UNKNOWN
  *
@@ -126,5 +126,5 @@
  * Variables :
  * Result    :
- * Remark    :
+ * Remark    : SHELL32.230
  * Status    : UNTESTED STUB UNKNOWN
  *
@@ -147,5 +147,5 @@
  * Variables :
  * Result    :
- * Remark    :
+ * Remark    : SHELL32.231
  * Status    : UNTESTED STUB UNKNOWN
  *
@@ -160,3 +160,2 @@
   return (0);
 }
-
