Index: trunk/src/shlwapi/makefile
===================================================================
--- trunk/src/shlwapi/makefile	(revision 3528)
+++ trunk/src/shlwapi/makefile	(revision 3539)
@@ -1,3 +1,3 @@
-# $Id: makefile,v 1.11 2000-04-25 01:59:34 phaller Exp $
+# $Id: makefile,v 1.12 2000-05-15 02:42:35 phaller Exp $
 
 #
@@ -25,5 +25,9 @@
 OBJS = \
 $(OBJDIR)\shlwapi.obj \
+$(OBJDIR)\mem.obj \
 $(OBJDIR)\url.obj \
+$(OBJDIR)\reg.obj \
+$(OBJDIR)\path.obj \
+$(OBJDIR)\string.obj \
 $(OBJDIR)\shlwapirsrc.obj \
 $(PDWIN32_LIB)/dllentry.obj
@@ -57,6 +61,6 @@
 $(OBJS)
 $(PDWIN32_LIB)/kernel32.lib
+$(PDWIN32_LIB)/user32.lib
 $(PDWIN32_LIB)/odincrt.lib
-$(PDWIN32_LIB)/shell32.lib
 OS2386.LIB
 $(RTLLIB_O)
Index: trunk/src/shlwapi/mem.cpp
===================================================================
--- trunk/src/shlwapi/mem.cpp	(revision 3539)
+++ trunk/src/shlwapi/mem.cpp	(revision 3539)
@@ -0,0 +1,192 @@
+/* $Id: mem.cpp,v 1.1 2000-05-15 02:43:16 phaller Exp $ */
+
+/*
+ * Win32 Lightweight SHELL32 for OS/2
+ *
+ * Copyright 1997 Marcus Meissner
+ * Copyright 1999 Patrick Haller (haller@zebra.fh-weingarten.de)
+ * Project Odin Software License can be found in LICENSE.TXT
+ *
+ * Path Functions
+ *
+ * Many of this functions are in SHLWAPI.DLL also
+ *
+ * Corel WINE 20000324 level (without CRTDLL_* calls)
+ */
+
+/*****************************************************************************
+ * Remark                                                                    *
+ *****************************************************************************
+
+ */
+
+
+/*****************************************************************************
+ * Includes                                                                  *
+ *****************************************************************************/
+
+#include <odin.h>
+#include <odinwrap.h>
+#include <os2sel.h>
+
+#include <string.h>
+#include <ctype.h>
+#include <wctype.h>
+#include <wcstr.h>
+#define HAVE_WCTYPE_H
+
+#include "debugtools.h"
+
+#include <winreg.h>
+
+#include <heapstring.h>
+#include <misc.h>
+#include <win\shell.h>
+#include <win\winerror.h>
+#include <winversion.h>
+#include <winuser.h>
+
+
+#define ICOM_CINTERFACE 1
+#define CINTERFACE 1
+
+#include "winerror.h"
+#include "winnls.h"
+#include "winversion.h"
+#include "heap.h"
+
+#include "shellapi.h"
+#include "shlobj.h"
+#include "wine/undocshell.h"
+
+#include "shlwapi.h"
+
+/*****************************************************************************
+ * Local Variables                                                           *
+ *****************************************************************************/
+
+ODINDEBUGCHANNEL(SHLWAPI-MEM)
+
+
+/*************************************************************************
+ * SHFree                                       [SHELL32.195]
+ *
+ * NOTES
+ *     free_ptr() - frees memory using IMalloc
+ *     exported by ordinal
+ */
+#define MEM_DEBUG 0
+DWORD WINAPI SHFree(LPVOID x)
+{
+#if MEM_DEBUG
+        WORD len = *(LPWORD)(x-2);
+
+        if ( *(LPWORD)(x+len) != 0x7384)
+          ERR("MAGIC2!\n");
+
+        if ( (*(LPWORD)(x-4)) != 0x8271)
+          ERR("MAGIC1!\n");
+        else
+          memset(x-4, 0xde, len+6);
+
+        TRACE("%p len=%u\n",x, len);
+
+        x -= 4;
+#else
+        TRACE("%p\n",x);
+#endif
+        return HeapFree(GetProcessHeap(), 0, x);
+}
+
+/*************************************************************************
+ * SHAlloc                                      [SHELL32.196]
+ *
+ * NOTES
+ *     void *task_alloc(DWORD len), uses SHMalloc allocator
+ *     exported by ordinal
+ */
+LPVOID WINAPI SHAlloc(DWORD len)
+{
+        LPBYTE ret;
+
+#if MEM_DEBUG
+        ret = (LPBYTE) HeapAlloc(GetProcessHeap(),0,len+6);
+#else
+        ret = (LPBYTE) HeapAlloc(GetProcessHeap(),0,len);
+#endif
+
+#if MEM_DEBUG
+        *(LPWORD)(ret) = 0x8271;
+        *(LPWORD)(ret+2) = (WORD)len;
+        *(LPWORD)(ret+4+len) = 0x7384;
+        ret += 4;
+        memset(ret, 0xdf, len);
+#endif
+        TRACE("%lu bytes at %p\n",len, ret);
+        return (LPVOID)ret;
+}
+
+/*************************************************************************
+ * SHAllocShared                                [SHELL32.520]
+ *
+ * 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 WINAPI SHAllocShared(LPVOID psrc, DWORD size, DWORD procID)
+{       HGLOBAL hmem;
+        LPVOID pmem;
+
+        TRACE("ptr=%p size=0x%04lx procID=0x%04lx\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;
+}
+/*************************************************************************
+ * SHLockShared                                 [SHELL32.521]
+ *
+ * NOTES
+ *  parameter1 is return value from SHAllocShared
+ *  parameter2 is return value from GetCurrentProcessId
+ *  the receiver of (WM_USER+2) trys to lock the HANDLE (?)
+ *  the returnvalue seems to be a memoryadress
+ */
+LPVOID WINAPI SHLockShared(HANDLE hmem, DWORD procID)
+{       TRACE("handle=0x%04x procID=0x%04lx\n",hmem,procID);
+        return GlobalLock(hmem);
+}
+/*************************************************************************
+ * SHUnlockShared                               [SHELL32.522]
+ *
+ * NOTES
+ *  parameter1 is return value from SHLockShared
+ */
+BOOL WINAPI SHUnlockShared(HANDLE pmem)
+{       TRACE("handle=0x%04x\n",pmem);
+        return GlobalUnlock(pmem);
+}
+/*************************************************************************
+ * SHFreeShared                                 [SHELL32.523]
+ *
+ * NOTES
+ *  parameter1 is return value from SHAllocShared
+ *  parameter2 is return value from GetCurrentProcessId
+ */
+HANDLE WINAPI SHFreeShared(HANDLE hmem, DWORD procID)
+{       TRACE("handle=0x%04x 0x%04lx\n",hmem,procID);
+        return GlobalFree(hmem);
+}
Index: trunk/src/shlwapi/path.cpp
===================================================================
--- trunk/src/shlwapi/path.cpp	(revision 3539)
+++ trunk/src/shlwapi/path.cpp	(revision 3539)
@@ -0,0 +1,1239 @@
+/* $Id: path.cpp,v 1.1 2000-05-15 02:43:16 phaller Exp $ */
+
+/*
+ * Win32 SHELL32 for OS/2
+ *
+ * Copyright 1997 Marcus Meissner
+ * Copyright 1999 Patrick Haller (haller@zebra.fh-weingarten.de)
+ * Project Odin Software License can be found in LICENSE.TXT
+ *
+ * Path Functions
+ *
+ * Many of this functions are in SHLWAPI.DLL also
+ *
+ * Corel WINE 20000324 level (without CRTDLL_* calls)
+ */
+
+/*****************************************************************************
+ * Remark                                                                    *
+ *****************************************************************************
+
+ */
+
+
+/*****************************************************************************
+ * Includes                                                                  *
+ *****************************************************************************/
+
+#include <odin.h>
+#include <odinwrap.h>
+#include <os2sel.h>
+
+#include <string.h>
+#include <ctype.h>
+#include <wctype.h>
+#include <wcstr.h>
+#define HAVE_WCTYPE_H
+
+#include "debugtools.h"
+
+#include <winreg.h>
+
+#include <heapstring.h>
+#include <misc.h>
+#include <win\shell.h>
+#include <win\winerror.h>
+#include <winversion.h>
+#include <winuser.h>
+
+#include "shlwapi.h"
+
+
+ODINDEBUGCHANNEL(SHLWAPI-SHELLPATH)
+
+
+/* Supported protocols for PathIsURL */
+LPSTR SupportedProtocol[] = {"http","https","ftp","gopher","file","mailto",""};
+
+/*************************************************************************
+ * PathIsRoot [SHELL32.29]
+ */
+ODINFUNCTION1(BOOL, PathIsRootA,
+              LPCSTR, x)
+{  TRACE("%s\n",x);
+   if (*(x+1)==':' && *(x+2)=='\\')         /* "X:\" */
+     return 1;
+   if (*x=='\\' || *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;
+}
+ODINFUNCTION1(BOOL, PathIsRootW,
+              LPCWSTR, x)
+{  TRACE("%s\n",debugstr_w(x));
+   if (*(x+1)==':' && *(x+2)=='\\')         /* "X:\" */
+     return 1;
+   if (*x == (WCHAR) '\\' || *x == (WCHAR) '/')                  /* "\" */
+     return 1;
+   if (x[0]==(WCHAR)'\\' && x[1]==(WCHAR)'\\') /* UNC "\\<xx>\" */
+   { int foundbackslash = 0;
+     x=x+2;
+     while (*x)
+     { if (*x++==(WCHAR)'\\')
+         foundbackslash++;
+     }
+     if (foundbackslash<=1)              /* max 1 \ more ... */
+       return 1;
+   }
+   return 0;
+}
+ODINFUNCTION1(BOOL, PathIsRootAW,
+              LPCVOID, x)
+{  if (VERSION_OsIsUnicode())
+     return PathIsRootW((LPWSTR)x);
+   return PathIsRootA((LPSTR)x);
+
+}
+/*************************************************************************
+ * PathBuildRoot [SHELL32.30]
+ */
+LPSTR WINAPI PathBuildRootA(LPSTR root, BYTE drive)
+{
+  TRACE("%p %i\n",root, drive);
+   strcpy(root,"A:\\");
+   root[0]+=drive;
+   return root;
+}
+
+/*************************************************************************
+ */
+LPWSTR WINAPI PathBuildRootW(LPWSTR root, BYTE drive)
+{
+   lstrcpyW(root, (LPWSTR)L"A:\\");
+   root[0]+=drive;
+   return root;
+}
+
+/*************************************************************************
+ * PathFindExtension [SHELL32.31]
+ *
+ * NOTES
+ *     returns pointer to last . in last pathcomponent or at \0.
+ */
+ODINFUNCTION1(LPCSTR, PathFindExtensionA,
+              LPCSTR, path)
+{  LPCSTR   lastpoint = NULL;
+   TRACE("%p %s\n",path,path);
+   while (*path)
+   { if (*path=='\\'||*path==' ')
+       lastpoint=NULL;
+     if (*path=='.')
+       lastpoint=path;
+     path++;
+   }
+   return lastpoint?lastpoint:path;
+}
+ODINFUNCTION1(LPCWSTR, PathFindExtensionW,
+              LPCWSTR, path)
+{  LPCWSTR   lastpoint = NULL;
+   TRACE("%p L%s\n",path,debugstr_w(path));
+   while (*path)
+   { if (*path==(WCHAR)'\\'||*path==(WCHAR)' ')
+       lastpoint=NULL;
+     if (*path==(WCHAR)'.')
+       lastpoint=path;
+     path++;
+   }
+   return lastpoint?lastpoint:path;
+}
+ODINFUNCTION1(LPCVOID, PathFindExtensionAW,
+              LPCVOID, path)
+{  if (VERSION_OsIsUnicode())
+     return PathFindExtensionW((LPWSTR)path);
+   return PathFindExtensionA((LPSTR)path);
+
+}
+
+/*************************************************************************
+ * PathAddBackslash [SHELL32.32]
+ *
+ * NOTES
+ *     append \ if there is none
+ */
+ODINFUNCTION1(LPSTR, PathAddBackslashA,
+              LPSTR, path)
+{  int len;
+   TRACE("%p->%s\n",path,path);
+
+   len = strlen(path);
+   if (len && path[len-1]!='\\')
+   { path[len]  = '\\';
+     path[len+1]= 0x00;
+     return path+len+1;
+   }
+   return path+len;
+}
+ODINFUNCTION1(LPWSTR, PathAddBackslashW,
+              LPWSTR, path)
+{  int len;
+   TRACE("%p->%s\n",path,debugstr_w(path));
+
+   len = lstrlenW(path);
+   if (len && path[len-1]!=(WCHAR)'\\')
+   { path[len]  = (WCHAR)'\\';
+     path[len+1]= 0x00;
+     return path+len+1;
+   }
+   return path+len;
+}
+ODINFUNCTION1(LPVOID, PathAddBackslashAW,
+              LPVOID, path)
+{  if(VERSION_OsIsUnicode())
+     return PathAddBackslashW((LPWSTR)path);
+   return PathAddBackslashA((LPSTR)path);
+}
+
+/*************************************************************************
+ * PathRemoveBlanks [SHELL32.33]
+ *
+ * NOTES
+ *     remove spaces from beginning and end of passed string
+ */
+ODINFUNCTION1(LPSTR, PathRemoveBlanksA,
+              LPSTR, str)
+{  LPSTR x = str;
+   TRACE("%s\n",str);
+   while (*x==' ') x++;
+   if (x!=str)
+     strcpy(str,x);
+   if (!*str)
+     return str;
+   x=str+strlen(str)-1;
+   while (*x==' ')
+     x--;
+   if (*x==' ')
+     *x='\0';
+   return x;
+}
+ODINFUNCTION1(LPWSTR, PathRemoveBlanksW,
+              LPWSTR, str)
+{  LPWSTR x = str;
+   TRACE("%s\n",debugstr_w(str));
+   while (*x==' ') x++;
+   if (x!=str)
+     lstrcpyW(str,x);
+   if (!*str)
+     return str;
+   x=str+lstrlenW(str)-1;
+   while (*x==' ')
+     x--;
+   if (*x==' ')
+     *x='\0';
+   return x;
+}
+ODINFUNCTION1(LPVOID, PathRemoveBlanksAW,
+              LPVOID, str)
+{  if(VERSION_OsIsUnicode())
+     return PathRemoveBlanksW((LPWSTR)str);
+   return PathRemoveBlanksA((LPSTR)str);
+}
+
+
+
+/*************************************************************************
+ * PathFindFilename [SHELL32.34]
+ *
+ * NOTES
+ *     basename(char *fn);
+ */
+ODINFUNCTION1(LPCSTR, PathFindFilenameA,
+              LPCSTR, aptr)
+{
+  int iLength = strlen(aptr);
+  LPSTR strSlash = (LPSTR)aptr + iLength - 1;
+  
+  while (iLength--)
+  {
+    if ( (*strSlash == '/' ) ||
+         (*strSlash == '\\') )
+      return strSlash + 1;
+  }
+  
+  // no slash found, look for ":"
+  if (aptr[1] == ':')
+    return aptr+2;
+  
+  return aptr; // no slash and no drive found
+}
+
+ODINFUNCTION1(LPCWSTR, PathFindFilenameW,
+              LPCWSTR, wptr)
+{  LPCWSTR wslash;
+   wslash = wptr;
+
+   TRACE("L%s\n",debugstr_w(wslash));
+   while (wptr[0])
+   { if (((wptr[0]=='\\') || (wptr[0]==':')) && wptr[1] && wptr[1]!='\\')
+       wslash = wptr+1;
+     wptr++;
+   }
+   return wslash;
+}
+ODINFUNCTION1(LPCVOID, PathFindFilenameAW,
+              LPCVOID, fn)
+{
+   if(VERSION_OsIsUnicode())
+     return PathFindFilenameW((LPWSTR)fn);
+   return PathFindFilenameA((LPSTR)fn);
+}
+
+/*************************************************************************
+ * PathRemoveFileSpec [SHELL32.35]
+ *
+ * NOTES
+ *     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:\"
+ */
+ODINFUNCTION1(DWORD, PathRemoveFileSpecA,
+              LPSTR, fn)
+{
+   LPSTR x,cutplace;
+  TRACE("%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;
+}
+
+/*************************************************************************
+ * PathAppend [SHELL32.36]
+ *
+ * NOTES
+ *     concat_paths(char*target,const char*add);
+ *     concats "target\\add" and writes them to target
+ */
+LPSTR WINAPI PathAppendA(LPSTR x1, LPSTR x2)
+{
+  TRACE("%s %s\n",x1,x2);
+  while (x2[0]=='\\') x2++;
+  return PathCombineA(x1,x1,x2);
+}
+
+/*************************************************************************
+ * PathAppend [SHELL32.36]
+ *
+ * NOTES
+ *     concat_paths(char*target,const char*add);
+ *     concats "target\\add" and writes them to target
+ */
+LPWSTR WINAPI PathAppendW(LPWSTR x1, LPWSTR x2)
+{
+  while (x2[0] == (WCHAR)'\\') x2++;
+  return PathCombineW(x1,x1,x2);
+}
+
+/*************************************************************************
+ * PathCombine [SHELL32.37]
+ *
+ * NOTES
+ *  if lpszFile='.' skip it
+ *  szDest can be equal to lpszFile. Thats why we use sTemp
+ */
+ODINFUNCTION3(LPSTR, PathCombineA,
+              LPSTR, szDest,
+              LPCSTR, lpszDir,
+              LPCSTR, lpszFile)
+{  char sTemp[MAX_PATH];
+   TRACE("%p %p->%s %p->%s\n",szDest, lpszDir, lpszDir, lpszFile, lpszFile);
+
+
+   if (!lpszFile || !lpszFile[0] || (lpszFile[0]=='.' && !lpszFile[1]) )
+   { strcpy(szDest,lpszDir);
+     return szDest;
+   }
+
+   /*  if lpszFile is a complete path don't care about lpszDir */
+   if (PathIsRootA(lpszFile))
+   { strcpy(szDest,lpszFile);
+   }
+   else
+   { strcpy(sTemp,lpszDir);
+     PathAddBackslashA(sTemp);
+     strcat(sTemp,lpszFile);
+     strcpy(szDest,sTemp);
+   }
+   return szDest;
+}
+ODINFUNCTION3(LPWSTR, PathCombineW,
+              LPWSTR, szDest,
+              LPCWSTR, lpszDir,
+              LPCWSTR, lpszFile)
+{  WCHAR sTemp[MAX_PATH];
+   TRACE("%p %p->%s %p->%s\n",szDest, lpszDir, debugstr_w(lpszDir),
+          lpszFile, debugstr_w(lpszFile));
+
+
+   if (!lpszFile || !lpszFile[0] || (lpszFile[0]==(WCHAR)'.' && !lpszFile[1]) )
+   { lstrcpyW(szDest,lpszDir);
+     return szDest;
+   }
+
+   /*  if lpszFile is a complete path don't care about lpszDir */
+   if (PathIsRootW(lpszFile))
+   { lstrcpyW(szDest,lpszFile);
+   }
+   else
+   { lstrcpyW(sTemp,lpszDir);
+     PathAddBackslashW(sTemp);
+     lstrcatW(sTemp,lpszFile);
+     lstrcpyW(szDest,sTemp);
+   }
+   return szDest;
+}
+ODINFUNCTION3(LPVOID, PathCombineAW,
+              LPVOID, szDest,
+              LPCVOID, lpszDir,
+              LPCVOID, lpszFile)
+{  if (VERSION_OsIsUnicode())
+     return PathCombineW( (LPWSTR)szDest, (LPWSTR)lpszDir, (LPWSTR)lpszFile );
+   return PathCombineA( (LPSTR)szDest, (LPSTR)lpszDir, (LPSTR)lpszFile );
+}
+
+/*************************************************************************
+ * PathIsUNC [SHELL32.39]
+ *
+ * NOTES
+ *     PathIsUNC(char*path);
+ */
+ODINFUNCTION1(BOOL, PathIsUNCA,
+              LPCSTR, path)
+{  TRACE("%s\n",path);
+
+   if ((path[0]=='\\') && (path[1]=='\\'))
+     return TRUE;
+   return FALSE;
+}
+ODINFUNCTION1(BOOL, PathIsUNCW,
+              LPCWSTR, path)
+{  TRACE("%s\n",debugstr_w(path));
+
+   if ((path[0]=='\\') && (path[1]=='\\'))
+     return TRUE;
+   return FALSE;
+}
+ODINFUNCTION1(BOOL, PathIsUNCAW,
+              LPCVOID, path)
+{  if (VERSION_OsIsUnicode())
+     return PathIsUNCW( (LPWSTR)path );
+   return PathIsUNCA( (LPSTR)path );
+}
+/*************************************************************************
+ *  PathIsRelativ [SHELL32.40]
+ *
+ */
+ODINFUNCTION1(BOOL, PathIsRelativeA,
+              LPCSTR, path)
+{  TRACE("path=%s\n",path);
+
+   if (path && (path[0]!='\\' && path[1]==':'))
+     return TRUE;
+   return FALSE;
+}
+ODINFUNCTION1(BOOL, PathIsRelativeW,
+              LPCWSTR, path)
+{  TRACE("path=%s\n",debugstr_w(path));
+
+   if (path && (path[0]!='\\' && path[1]==':'))
+     return TRUE;
+   return FALSE;
+}
+ODINFUNCTION1(BOOL, PathIsRelativeAW,
+              LPCVOID, path)
+{  if (VERSION_OsIsUnicode())
+     return PathIsRelativeW( (LPWSTR)path );
+   return PathIsRelativeA( (LPSTR)path );
+}
+/*************************************************************************
+ *  PathIsExe [SHELL32.43]
+ *
+ */
+ODINFUNCTION1(BOOL, PathIsExeA,
+              LPCSTR, path)
+{  FIXME("path=%s\n",path);
+   return FALSE;
+}
+ODINFUNCTION1(BOOL, PathIsExeW,
+              LPCWSTR, path)
+{  FIXME("path=%s\n",debugstr_w(path));
+   return FALSE;
+}
+ODINFUNCTION1(BOOL, PathIsExeAW,
+              LPCVOID, path)
+{  if (VERSION_OsIsUnicode())
+     return PathIsExeW ((LPWSTR)path);
+   return PathIsExeA((LPSTR)path);
+}
+
+/*************************************************************************
+ * PathFileExists [SHELL32.45]
+ *
+ * NOTES
+ *     file_exists(char *fn);
+ */
+ODINFUNCTION1(BOOL, PathFileExistsA,
+              LPSTR, fn)
+{
+  TRACE("%s\n",fn);
+   if (GetFileAttributesA(fn)==-1)
+      return FALSE;
+    else
+      return TRUE;
+}
+/*************************************************************************
+ * PathFileExists [SHELL32.45]
+ *
+ * NOTES
+ *     file_exists(char *fn);
+ */
+ODINFUNCTION1(BOOL, PathFileExistsW,
+              LPWSTR, fn)
+{
+   if (GetFileAttributesW(fn)==-1)
+      return FALSE;
+    else
+      return TRUE;
+}
+/*************************************************************************
+ * PathMatchSingleMask
+ *
+ * NOTES
+ *     internal (used by PathMatchSpec)
+ */
+static BOOL PathMatchSingleMaskA(LPCSTR name, LPCSTR mask)
+{
+  while (*name && *mask && *mask!=';') {
+    if (*mask=='*') {
+      do {
+   if (PathMatchSingleMaskA(name,mask+1)) return 1;  /* try substrings */
+      } while (*name++);
+      return 0;
+    }
+    if (toupper(*mask)!=toupper(*name) && *mask!='?') return 0;
+    name++;
+    mask++;
+  }
+  if (!*name) {
+    while (*mask=='*') mask++;
+    if (!*mask || *mask==';') return 1;
+  }
+  return 0;
+}
+
+static BOOL PathMatchSingleMaskW(LPCWSTR name, LPCWSTR mask)
+{
+  while (*name && *mask && (*mask != ';'))
+  {
+    if (*mask == '*')
+    {
+      do
+      {
+        if (PathMatchSingleMaskW(name,mask+1)) return 1;  /* try substrings */
+      } while (*name++);
+      return FALSE;
+    }
+    if ((towupper(*mask) != towupper(*name)) && (*mask != '?')) return 0;
+    name++;
+    mask++;
+  }
+  if (!*name)
+  {
+    while (*mask == '*') mask++;
+    if (!*mask || (*mask == ';')) return TRUE;
+  }
+
+  return FALSE;
+}
+/*************************************************************************
+ * PathMatchSpec [SHELL32.46]
+ *
+ * NOTES
+ *     used from COMDLG32
+ */
+ODINFUNCTION2(BOOL, PathMatchSpecA,
+              LPCSTR, name,
+              LPCSTR, mask)
+{
+  TRACE("%s %s\n",name,mask);
+
+  if (!lstrcmpA( mask, "*.*" )) return TRUE;   /* we don't require a period */
+
+  while (*mask)
+  {
+    if (PathMatchSingleMaskA(name,mask)) return TRUE;    /* helper function */
+    while (*mask && *mask!=';') mask++;
+    if (*mask==';')
+    {
+      mask++;
+      while (*mask==' ') mask++;      /*  masks may be separated by "; " */
+    }
+  }
+
+  return FALSE;
+}
+
+ODINFUNCTION2(BOOL, PathMatchSpecW,
+              LPCWSTR, name,
+              LPCWSTR, mask)
+{
+  TRACE("%ls %ls\n",name,mask);
+
+  if (!lstrcmpW( mask, (WCHAR*)L"*.*" )) return TRUE;   /* we don't require a period */
+
+  while (*mask)
+  {
+    if (PathMatchSingleMaskW(name,mask)) return TRUE;    /* helper function */
+    while (*mask && (*mask != ';')) mask++;
+    if (*mask == ';')
+    {
+      mask++;
+      while (*mask==' ') mask++;       /* masks may be separated by "; " */
+    }
+  }
+
+  return FALSE;
+}
+ODINFUNCTION2(BOOL, PathMatchSpecAW,
+              LPVOID, name,
+              LPVOID, mask)
+{
+   if (VERSION_OsIsUnicode())
+     return PathMatchSpecW( (LPWSTR)name, (LPWSTR)mask );
+   return PathMatchSpecA( (LPSTR)name, (LPSTR)mask );
+}
+/*************************************************************************
+ * PathSetDlgItemPathAW [SHELL32.48]
+ * NOTES
+ *  use PathCompactPath to make sure, the path fits into the control
+ */
+
+ODINFUNCTION3(BOOL, PathSetDlgItemPathA,
+              HWND, hDlg,
+              int, id,
+              LPCSTR, pszPath)
+{  TRACE("%x %x %s\n",hDlg, id, pszPath);
+   return SetDlgItemTextA(hDlg, id, pszPath);
+}
+ODINFUNCTION3(BOOL, PathSetDlgItemPathW,
+              HWND, hDlg,
+              int, id,
+              LPCWSTR, pszPath)
+{  TRACE("%x %x %s\n",hDlg, id, debugstr_w(pszPath));
+   return SetDlgItemTextW(hDlg, id, pszPath);
+}
+ODINFUNCTION3(BOOL, PathSetDlgItemPathAW,
+              HWND, hDlg,
+              int, id,
+              LPCVOID, pszPath)
+{  if (VERSION_OsIsUnicode())
+     return PathSetDlgItemPathW(hDlg, id, (LPWSTR)pszPath);
+   return PathSetDlgItemPathA(hDlg, id, (LPSTR)pszPath);
+}
+
+/*************************************************************************
+ * PathQualifyAW [SHELL32.49]
+ */
+
+ODINFUNCTION1(BOOL, PathQualifyA,
+              LPCSTR, pszPath)
+{  FIXME("%s\n",pszPath);
+   return 0;
+}
+ODINFUNCTION1(BOOL, PathQualifyW,
+              LPCWSTR, pszPath)
+{  FIXME("%s\n",debugstr_w(pszPath));
+   return 0;
+}
+ODINFUNCTION1(BOOL, PathQualifyAW,
+              LPCVOID, pszPath)
+{  if (VERSION_OsIsUnicode())
+     return PathQualifyW((LPWSTR)pszPath);
+   return PathQualifyA((LPSTR)pszPath);
+}
+
+/*************************************************************************
+ * PathResolve [SHELL32.51]
+ */
+ODINFUNCTION3(DWORD, PathResolve,
+              LPCSTR, s,
+              DWORD, x2,
+              DWORD, x3)
+{
+   FIXME("(%s,0x%08lx,0x%08lx),stub!\n",s,x2,x3);
+   return 0;
+}
+
+/*************************************************************************
+ * PathGetArgs [SHELL32.52]
+ *
+ * NOTES
+ *     look for next arg in string. handle "quoted" strings
+ *     returns pointer to argument *AFTER* the space. Or to the \0.
+ */
+ODINFUNCTION1(LPCSTR, PathGetArgsA,
+              LPCSTR, cmdline)
+{  BOOL  qflag = FALSE;
+
+   TRACE("%s\n",cmdline);
+
+   while (*cmdline)
+   { if ((*cmdline==' ') && !qflag)
+       return cmdline+1;
+     if (*cmdline=='"')
+       qflag=!qflag;
+     cmdline++;
+   }
+   return cmdline;
+
+}
+ODINFUNCTION1(LPCWSTR, PathGetArgsW,
+              LPCWSTR, cmdline)
+{  BOOL  qflag = FALSE;
+
+   TRACE("%sL\n",debugstr_w(cmdline));
+
+   while (*cmdline)
+   { if ((*cmdline==' ') && !qflag)
+       return cmdline+1;
+     if (*cmdline=='"')
+       qflag=!qflag;
+     cmdline++;
+   }
+   return cmdline;
+}
+ODINFUNCTION1(LPCVOID, PathGetArgsAW,
+              LPVOID, cmdline)
+{  if (VERSION_OsIsUnicode())
+     return PathGetArgsW((LPWSTR)cmdline);
+   return PathGetArgsA((LPSTR)cmdline);
+}
+/*************************************************************************
+ * PathQuoteSpaces [SHELL32.55]
+ *
+ * NOTES
+ *     basename(char *fn);
+ */
+ODINFUNCTION1(LPSTR, PathQuoteSpacesA,
+              LPCSTR, aptr)
+{  FIXME("%s\n",aptr);
+   return 0;
+
+}
+ODINFUNCTION1(LPWSTR, PathQuoteSpacesW,
+              LPCWSTR, wptr)
+{  FIXME("L%s\n",debugstr_w(wptr));
+   return 0;
+}
+ODINFUNCTION1(LPVOID, PathQuoteSpacesAW,
+              LPCVOID, fn)
+{  if(VERSION_OsIsUnicode())
+     return PathQuoteSpacesW((LPWSTR)fn);
+   return PathQuoteSpacesA((LPSTR)fn);
+}
+
+
+/*************************************************************************
+ * PathUnquoteSpaces [SHELL32.56]
+ *
+ * NOTES
+ *     unquote string (remove ")
+ */
+ODINPROCEDURE1(PathUnquoteSpacesA,
+               LPSTR, str)
+{  DWORD      len = lstrlenA(str);
+   TRACE("%s\n",str);
+   if (*str!='"')
+     return;
+   if (str[len-1]!='"')
+     return;
+   str[len-1]='\0';
+   lstrcpyA(str,str+1);
+   return;
+}
+ODINPROCEDURE1(PathUnquoteSpacesW,
+               LPWSTR, str)
+{  DWORD len = lstrlenW(str);
+
+   TRACE("%s\n",debugstr_w(str));
+
+   if (*str!='"')
+     return;
+   if (str[len-1]!='"')
+     return;
+   str[len-1]='\0';
+   lstrcpyW(str,str+1);
+   return;
+}
+ODINPROCEDURE1(PathUnquoteSpacesAW,
+               LPVOID, str)
+{  if(VERSION_OsIsUnicode())
+     PathUnquoteSpacesW((LPWSTR)str);
+   PathUnquoteSpacesA((LPSTR)str);
+}
+
+
+/*************************************************************************
+ * PathGetDriveNumber32 [SHELL32.57]
+ *
+ */
+ODINFUNCTION1(HRESULT, PathGetDriveNumberAW,
+              LPSTR, u)
+{  FIXME("%s stub\n",debugstr_a(u));
+   return 0;
+}
+
+/*************************************************************************
+ * PathGetDriveNumber32 [SHELL32.57]
+ *
+ */
+ODINFUNCTION1(HRESULT, PathGetDriveNumberA,
+              LPSTR, u)
+{  FIXME("%s stub\n",debugstr_a(u));
+   return 0;
+}
+
+/*************************************************************************
+ * PathGetDriveNumber32 [SHELL32.57]
+ *
+ */
+ODINFUNCTION1(HRESULT, PathGetDriveNumberW,
+              LPWSTR, u)
+{  FIXME("%s stub\n",debugstr_a(u));
+   return 0;
+}
+
+/*************************************************************************
+ * PathYetAnotherMakeUniqueName [SHELL32.75]
+ *
+ * NOTES
+ *     exported by ordinal
+ */
+ODINFUNCTION2(BOOL, PathYetAnotherMakeUniqueNameA,
+              LPDWORD, x,
+              LPDWORD, y)
+{
+    FIXME("(%p,%p):stub.\n",x,y);
+    return TRUE;
+}
+
+/*************************************************************************
+ * IsLFNDrive [SHELL32.119]
+ *
+ * NOTES
+ *     exported by ordinal Name
+ */
+ODINFUNCTION1(BOOL, IsLFNDriveA,
+              LPCSTR, path)
+{
+    DWORD   fnlen;
+
+    if (!GetVolumeInformationA(path,NULL,0,NULL,&fnlen,NULL,NULL,0))
+   return FALSE;
+    return fnlen>12;
+}
+/*************************************************************************
+ * PathFindOnPath [SHELL32.145]
+ */
+ODINFUNCTION2(BOOL, PathFindOnPathA,
+              LPSTR, sFile,
+              LPCSTR, sOtherDirs)
+{  FIXME("%s %s\n",sFile, sOtherDirs);
+   return FALSE;
+}
+ODINFUNCTION2(BOOL, PathFindOnPathW,
+              LPWSTR, sFile,
+              LPCWSTR, sOtherDirs)
+{  FIXME("%s %s\n",debugstr_w(sFile), debugstr_w(sOtherDirs));
+   return FALSE;
+}
+ODINFUNCTION2(BOOL, PathFindOnPathAW,
+              LPVOID, sFile,
+              LPCVOID, sOtherDirs)
+{  if (VERSION_OsIsUnicode())
+     return PathFindOnPathW((LPWSTR)sFile, (LPWSTR)sOtherDirs);
+   return PathFindOnPathA((LPSTR)sFile, (LPSTR)sOtherDirs);
+}
+
+/*************************************************************************
+ * PathGetExtension [SHELL32.158]
+ *
+ * NOTES
+ *     exported by ordinal
+ */
+ODINFUNCTION3(LPCSTR, PathGetExtensionA,
+              LPCSTR, path,
+              DWORD, y,
+              DWORD, z)
+{  TRACE("(%s,%08lx,%08lx)\n",path,y,z);
+   path = PathFindExtensionA(path);
+   return *path?(path+1):path;
+}
+ODINFUNCTION3(LPCWSTR, PathGetExtensionW,
+              LPCWSTR, path,
+              DWORD, y,
+              DWORD, z)
+{  TRACE("(L%s,%08lx,%08lx)\n",debugstr_w(path),y,z);
+   path = PathFindExtensionW(path);
+   return *path?(path+1):path;
+}
+ODINFUNCTION3(LPCVOID, PathGetExtensionAW,
+              LPCVOID, path,
+              DWORD, y,
+              DWORD, z)
+{  if (VERSION_OsIsUnicode())
+     return PathGetExtensionW((LPWSTR)path,y,z);
+   return PathGetExtensionA((LPSTR)path,y,z);
+}
+
+/*************************************************************************
+ * PathCleanupSpec                                [SHELL32.171]
+ *
+ */
+ODINFUNCTION2(DWORD, PathCleanupSpecA,
+              LPSTR, x,
+              LPSTR, y)
+{
+   FIXME("%p(%s) %p(%s) stub\n",x,x,y,y);
+   return TRUE;
+}
+
+ODINFUNCTION2(DWORD, PathCleanupSpecW,
+              LPWSTR, x,
+              LPWSTR, y)
+{
+   FIXME("%p(%s) %p(%s) stub\n",x,debugstr_w(x),y,debugstr_w(y));
+   return TRUE;
+}
+
+ODINFUNCTION2(DWORD, PathCleanupSpecAW,
+              LPVOID, x,
+              LPVOID, y)
+{
+   if (VERSION_OsIsUnicode())
+     return PathCleanupSpecW((LPWSTR)x,(LPWSTR)y);
+   return PathCleanupSpecA((LPSTR)x,(LPSTR)y);
+}
+
+
+/*************************************************************************
+*  PathProcessCommand                    [SHELL32.653]
+*/
+ODINFUNCTION4(HRESULT, PathProcessCommandA,
+              LPSTR, lpCommand,
+              LPSTR, v,
+              DWORD, w,
+              DWORD, x)
+{
+   FIXME("%p(%s) %p 0x%04lx 0x%04lx stub\n",
+   lpCommand, lpCommand, v, w,x );
+   lstrcpyA(v,lpCommand);
+   return 0;
+}
+
+ODINFUNCTION4(HRESULT, PathProcessCommandW,
+              LPWSTR, lpCommand,
+              LPSTR, v,
+              DWORD, w,
+              DWORD, x)
+{
+   FIXME("%p(%s) %p 0x%04lx 0x%04lx stub\n",
+   lpCommand, debugstr_w(lpCommand), v, w,x );
+   return 0;
+}
+
+ODINFUNCTION4(HRESULT, PathProcessCommandAW,
+              LPVOID, lpCommand,
+              LPSTR, v,
+              DWORD, w,
+              DWORD, x)
+{
+   if (VERSION_OsIsUnicode())
+     return PathProcessCommandW((LPWSTR)lpCommand, v, w, x);
+   return PathProcessCommandA((LPSTR)lpCommand, v, w, x);
+}
+
+
+/* PathRemoveBackslash
+ *
+ * If the path ends in a backslash it is replaced by a NULL
+ * and the address of the NULL is returned
+ * Otherwise
+ * the address of the last character is returned.
+ *
+ */
+LPSTR WINAPI PathRemoveBackslashA(LPSTR lpPath)
+{
+        LPSTR temp = lpPath;
+        LPSTR prev = lpPath;
+
+        while (*temp)
+        {
+                prev = temp++;
+        }
+        if ( *prev == (CHAR)'\\')
+        {
+                *prev = (CHAR)'\0';
+        }
+
+        return prev;
+}
+
+LPWSTR WINAPI PathRemoveBackslashW(LPWSTR lpPath)
+{
+        LPWSTR temp = lpPath;
+        LPWSTR prev = lpPath;
+
+        while (*temp)
+        {
+                prev = temp++;
+        }
+        if ( *prev == (WCHAR)'\\')
+        {
+                *prev = (WCHAR)'\0';
+        }
+
+        return prev;
+}
+
+/*
+   shlwapi functions that have found their way in because most of
+   shlwapi is unimplemented and doesn't have a home.
+
+   FIXME: move to a more appropriate file( when one exists )
+*/
+
+ /* SHGetValue: Gets a value from the registry */
+
+
+BOOL WINAPI PathIsURLA(LPCSTR lpstrPath)
+{
+  LPSTR lpstrRes;
+  char lpstrFileType[10] = "";
+  int iSize;
+  int i = 0;
+  /* sanity check */
+  if(!lpstrPath)
+    return FALSE;
+
+  /* get protocol        */
+  /* protocol://location */
+  if(!(lpstrRes = strchr(lpstrPath,':')))
+  {
+    return FALSE;
+  }
+  iSize = lpstrRes - lpstrPath;
+  if(iSize > sizeof(lpstrFileType))
+    return FALSE;
+
+  strncpy(lpstrFileType,lpstrPath,iSize);
+
+  while(strlen(SupportedProtocol[i]))
+  {
+    if(!stricmp(lpstrFileType,SupportedProtocol[i++]))
+      return TRUE;
+  }
+
+  return FALSE;
+}
+
+
+/*****************************************************************************
+ * Name      : LPSTR PathGetShortPathA
+ * Purpose   : unknown
+ * Parameters: LPSTR lpszPath
+ * Variables :
+ * Result    : unknown
+ * Remark    : SHLWAPI.??
+ * Status    : UNTESTED
+ *
+ * Author    : Patrick Haller [Sun, 2000/05/14 01:02]
+ *****************************************************************************/
+
+ODINFUNCTION1(LPSTR,   PathGetShortPathA,
+              LPSTR,   lpszPath)
+{
+  dprintf(("stub: lpszPath=[%s]", lpszPath));
+  return NULL;
+}
+
+
+/*****************************************************************************
+ * Name      : LPWSTR PathGetShortPathW
+ * Purpose   : unknown
+ * Parameters: LPWSTR lpszPath
+ * Variables :
+ * Result    : unknown
+ * Remark    : SHLWAPI.??
+ * Status    : UNTESTED
+ *
+ * Author    : Patrick Haller [Sun, 2000/05/14 01:02]
+ *****************************************************************************/
+
+ODINFUNCTION1(LPWSTR,   PathGetShortPathW,
+              LPWSTR,   lpszPath)
+{
+  dprintf(("stub: lpszPath=[%08xh]", lpszPath));
+  return NULL;
+}
+
+
+/*****************************************************************************
+ * Name      : LPVOID PathGetShortPathAW
+ * Purpose   : unknown
+ * Parameters: LPVOID lpszPath
+ * Variables :
+ * Result    : unknown
+ * Remark    : SHLWAPI.92
+ * Status    : UNTESTED
+ *
+ * Author    : Patrick Haller [Sun, 2000/05/14 01:02]
+ *****************************************************************************/
+
+ODINFUNCTION1(LPVOID,   PathGetShortPathAW,
+              LPVOID,   lpszPath)
+{
+  if (VERSION_OsIsUnicode())
+    return PathGetShortPathW((LPWSTR)lpszPath);
+  else
+    return PathGetShortPathA((LPSTR)lpszPath);
+}
+
+
+/*****************************************************************************
+ * Name      : PathStripToRootA
+ * Purpose   : return root (used by explorer.exe)
+ * Parameters: Unknown (wrong)
+ * Variables :
+ * Result    : Unknown
+ * Remark    :
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
+ *****************************************************************************/
+
+ODINFUNCTION1(LPSTR,PathStripToRootA,LPSTR,pszPath)
+{
+  dprintf(("not implemented"));
+
+  return NULL;
+}
+
+/*****************************************************************************
+ * Name      : PathStripToRootW
+ * Purpose   : return root (used by explorer.exe)
+ * Parameters: Unknown (wrong)
+ * Variables :
+ * Result    : Unknown
+ * Remark    :
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
+ *****************************************************************************/
+
+ODINFUNCTION1(LPSTR,PathStripToRootW,LPSTR,pszPath)
+{
+  dprintf(("not implemented"));
+
+  return NULL;
+}
+
+/*****************************************************************************
+ * Name      : LPSTR PathSkipRootA
+ * Purpose   : Parses a path, ignoring the drive letter or UNC server/share path parts.
+ * Parameters: LPCSTR pszPath
+ * Variables :
+ * Result    : unknown
+ * Remark    : SHLWAPI.PathSkipRootA
+ * Status    : UNTESTED
+ *
+ * Author    : Patrick Haller [Mon, 2000/01/31 23:02]
+ *****************************************************************************/
+
+ODINFUNCTION1(LPSTR, PathSkipRootA, LPCSTR, pszPath)
+{
+  // check if "driveletter:\"
+  if (pszPath[1] == ':')
+    return (LPSTR)(pszPath + 2);
+
+  // check if UNC-style path
+  if ( (pszPath[0] == '\\') &&
+      (pszPath[1] == '\\') )
+  {
+    LPSTR pszTemp = strchr(pszPath + 2, '\\');
+    if (NULL != pszTemp)
+      // return root part, skip server/share
+      return (LPSTR)pszTemp++;
+    else
+      // UNC syntax validation, return pszPath
+      return (LPSTR)pszTemp;
+  }
+
+  // else ...
+  return (LPSTR)pszPath;
+}
+
+
+/*****************************************************************************
+ * Name      : LPWSTR PathSkipRootW
+ * Purpose   : Parses a path, ignoring the drive letter or UNC server/share path parts.
+ * Parameters: LPCWSTR pszPath
+ * Variables :
+ * Result    : unknown
+ * Remark    : SHLWAPI.PathSkipRootW
+ * Status    : UNTESTED
+ *
+ * Author    : Patrick Haller [Mon, 2000/01/31 23:02]
+ *****************************************************************************/
+
+ODINFUNCTION1(LPWSTR, PathSkipRootW, LPCWSTR, pszPath)
+{
+  dprintf(("not implemented"));
+
+  return (LPWSTR)pszPath;
+}
Index: trunk/src/shlwapi/reg.cpp
===================================================================
--- trunk/src/shlwapi/reg.cpp	(revision 3539)
+++ trunk/src/shlwapi/reg.cpp	(revision 3539)
@@ -0,0 +1,161 @@
+/* $Id: reg.cpp,v 1.1 2000-05-15 02:43:16 phaller Exp $ */
+
+/*
+ * Win32 URL-handling APIs for OS/2
+ *
+ * Copyright 1999      Patrick Haller <phaller@gmx.net>
+ *
+ * Project Odin Software License can be found in LICENSE.TXT
+ *
+ * Copyright 1996,1998 Marcus Meissner
+ * Copyright 1996 Jukka Iivonen
+ * Copyright 1997 Uwe Bonnes
+ * Copyright 1999 Jens Wiessner
+ */
+
+
+#include <odin.h>
+#include <odinwrap.h>
+#include <os2sel.h>
+
+#include <string.h>
+#include <ctype.h>
+#include <wctype.h>
+#define HAVE_WCTYPE_H
+#include <odin.h>
+
+#include "debugtools.h"
+#include "winnls.h"
+#include "winversion.h"
+#include "winreg.h"
+
+#include <heapstring.h>
+#include <misc.h>
+#include <win\winerror.h>
+#include "shlwapi.h"
+
+
+ODINDEBUGCHANNEL(SHLWAPI-REG)
+
+
+
+/*
+   shlwapi functions that have found their way in because most of
+   shlwapi is unimplemented and doesn't have a home.
+
+   FIXME: move to a more appropriate file( when one exists )
+*/
+
+ /* SHGetValue: Gets a value from the registry */
+
+ODINFUNCTION6(DWORD,SHGetValueA,HKEY,     hkey,
+                                LPCSTR,   pSubKey,
+                                LPCSTR,   pValue,
+                                LPDWORD,  pwType,
+                                LPVOID,   pvData,
+                                LPDWORD,  pbData)
+{
+    dprintf(("(%p),stub!\n", pSubKey));
+
+        return ERROR_SUCCESS;  /* return success */
+}
+
+ODINFUNCTION6(DWORD,SHGetValueW,HKEY,     hkey,
+                                LPCWSTR,  pSubKey,
+                                LPCWSTR,  pValue,
+                                LPDWORD,  pwType,
+                                LPVOID,   pvData,
+                                LPDWORD,  pbData)
+{
+    dprintf(("(%p),stub!\n", pSubKey));
+
+        return ERROR_SUCCESS;  /* return success */
+}
+
+/* gets a user-specific registry value. */
+
+ODINFUNCTION8(LONG,SHRegGetUSValueA,LPCSTR,   pSubKey,
+                                    LPCSTR,   pValue,
+                                    LPDWORD,  pwType,
+                                    LPVOID,   pvData,
+                                    LPDWORD,  pbData,
+                                    BOOL,     fIgnoreHKCU,
+                                    LPVOID,   pDefaultData,
+                                    DWORD,    wDefaultDataSize)
+{
+    FIXME("(%p),stub!\n", pSubKey);
+
+        return ERROR_SUCCESS;  /* return success */
+}
+
+ODINFUNCTION8(LONG,SHRegGetUSValueW,LPCWSTR, pSubKey,
+                                    LPCWSTR, pValue,
+                                    LPDWORD, pwType,
+                                    LPVOID,  pvData,
+                                    LPDWORD, pbData,
+                                    BOOL,    flagIgnoreHKCU,
+                                    LPVOID,  pDefaultData,
+                                    DWORD,   wDefaultDataSize)
+{
+    dprintf(("(%p),stub!\n", pSubKey));
+
+        return ERROR_SUCCESS;  /* return success */
+}
+
+
+/*****************************************************************************
+ * Name      : DWORD SHRegGetBoolUSValueA
+ * Purpose   : unknown
+ * Parameters: unknown
+ * Variables :
+ * Result    : unknown
+ * Remark    : SHLWAPI.SHRegGetBoolUSValueA
+ * Status    : UNTESTED
+ *
+ * Author    : Patrick Haller [Wed, 1999/12/29 23:02]
+ *****************************************************************************/
+
+ODINFUNCTION5(LONG,    SHRegGetBoolUSValueA,
+              LPCSTR,  pSubKey,
+              DWORD,   arg2,
+              DWORD,   arg3,
+              DWORD,   arg4,
+              DWORD,   arg5)
+{
+  char  szBuffer[264];
+  int   iLength;
+
+  dprintf(("(%p),stub!\n", pSubKey));
+
+  return ERROR_SUCCESS;  /* return success */
+}
+
+
+/*****************************************************************************
+ * Name      : DWORD SHRegGetBoolUSValueW
+ * Purpose   : unknown
+ * Parameters: unknown
+ * Variables :
+ * Result    : unknown
+ * Remark    : SHLWAPI.SHRegGetBoolUSValueW
+ * Status    : UNTESTED
+ *
+ * Author    : Patrick Haller [Wed, 1999/12/29 23:02]
+ *****************************************************************************/
+
+ODINFUNCTION5(LONG,    SHRegGetBoolUSValueW,
+              LPCWSTR, pSubKey,
+              DWORD,   arg2,
+              DWORD,   arg3,
+              DWORD,   arg4,
+              DWORD,   arg5)
+{
+  char  szBuffer[264];
+  int   iLength;
+
+  dprintf(("(%p),stub!\n", pSubKey));
+
+  return ERROR_SUCCESS;  /* return success */
+}
+
+
Index: trunk/src/shlwapi/shlwapi.cpp
===================================================================
--- trunk/src/shlwapi/shlwapi.cpp	(revision 3528)
+++ trunk/src/shlwapi/shlwapi.cpp	(revision 3539)
@@ -1,3 +1,3 @@
-/* $Id: shlwapi.cpp,v 1.5 2000-03-30 15:40:43 cbratschi Exp $ */
+/* $Id: shlwapi.cpp,v 1.6 2000-05-15 02:42:35 phaller Exp $ */
 
 /*
@@ -39,182 +39,95 @@
 #include <win\winerror.h>
 
+
 ODINDEBUGCHANNEL(SHLWAPI)
 
-
-
-/*
-   shlwapi functions that have found their way in because most of
-   shlwapi is unimplemented and doesn't have a home.
-
-   FIXME: move to a more appropriate file( when one exists )
-*/
-
- /* SHGetValue: Gets a value from the registry */
-
-ODINFUNCTION6(DWORD,SHGetValueA,HKEY,     hkey,
-                                LPCSTR,   pSubKey,
-                                LPCSTR,   pValue,
-                                LPDWORD,  pwType,
-                                LPVOID,   pvData,
-                                LPDWORD,  pbData)
-{
-    dprintf(("(%p),stub!\n", pSubKey));
-
-        return ERROR_SUCCESS;  /* return success */
-}
-
-ODINFUNCTION6(DWORD,SHGetValueW,HKEY,     hkey,
-                                LPCWSTR,  pSubKey,
-                                LPCWSTR,  pValue,
-                                LPDWORD,  pwType,
-                                LPVOID,   pvData,
-                                LPDWORD,  pbData)
-{
-    dprintf(("(%p),stub!\n", pSubKey));
-
-        return ERROR_SUCCESS;  /* return success */
-}
-
-/* gets a user-specific registry value. */
-
-ODINFUNCTION8(LONG,SHRegGetUSValueA,LPCSTR,   pSubKey,
-                                    LPCSTR,   pValue,
-                                    LPDWORD,  pwType,
-                                    LPVOID,   pvData,
-                                    LPDWORD,  pbData,
-                                    BOOL,     fIgnoreHKCU,
-                                    LPVOID,   pDefaultData,
-                                    DWORD,    wDefaultDataSize)
-{
-    FIXME("(%p),stub!\n", pSubKey);
-
-        return ERROR_SUCCESS;  /* return success */
-}
-
-ODINFUNCTION8(LONG,SHRegGetUSValueW,LPCWSTR, pSubKey,
-                                    LPCWSTR, pValue,
-                                    LPDWORD, pwType,
-                                    LPVOID,  pvData,
-                                    LPDWORD, pbData,
-                                    BOOL,    flagIgnoreHKCU,
-                                    LPVOID,  pDefaultData,
-                                    DWORD,   wDefaultDataSize)
-{
-    dprintf(("(%p),stub!\n", pSubKey));
-
-        return ERROR_SUCCESS;  /* return success */
-}
-
-
-/*****************************************************************************
- * Name      : DWORD SHRegGetBoolUSValueA
- * Purpose   : unknown
- * Parameters: unknown
- * Variables :
- * Result    : unknown
- * Remark    : SHLWAPI.SHRegGetBoolUSValueA
- * Status    : UNTESTED
- *
- * Author    : Patrick Haller [Wed, 1999/12/29 23:02]
- *****************************************************************************/
-
-ODINFUNCTION5(LONG,    SHRegGetBoolUSValueA,
-              LPCSTR,  pSubKey,
-              DWORD,   arg2,
-              DWORD,   arg3,
-              DWORD,   arg4,
-              DWORD,   arg5)
-{
-  char  szBuffer[264];
-  int   iLength;
-
-  dprintf(("(%p),stub!\n", pSubKey));
-
-  return ERROR_SUCCESS;  /* return success */
-}
-
-
-/*****************************************************************************
- * Name      : DWORD SHRegGetBoolUSValueW
- * Purpose   : unknown
- * Parameters: unknown
- * Variables :
- * Result    : unknown
- * Remark    : SHLWAPI.SHRegGetBoolUSValueW
- * Status    : UNTESTED
- *
- * Author    : Patrick Haller [Wed, 1999/12/29 23:02]
- *****************************************************************************/
-
-ODINFUNCTION5(LONG,    SHRegGetBoolUSValueW,
-              LPCWSTR, pSubKey,
-              DWORD,   arg2,
-              DWORD,   arg3,
-              DWORD,   arg4,
-              DWORD,   arg5)
-{
-  char  szBuffer[264];
-  int   iLength;
-
-  dprintf(("(%p),stub!\n", pSubKey));
-
-  return ERROR_SUCCESS;  /* return success */
-}
-
-
-/*****************************************************************************
- * Name      : LPSTR PathSkipRootA
- * Purpose   : Parses a path, ignoring the drive letter or UNC server/share path parts.
- * Parameters: LPCSTR pszPath
- * Variables :
- * Result    : unknown
- * Remark    : SHLWAPI.PathSkipRootA
- * Status    : UNTESTED
- *
- * Author    : Patrick Haller [Mon, 2000/01/31 23:02]
- *****************************************************************************/
-
-ODINFUNCTION1(LPSTR, PathSkipRootA, LPCSTR, pszPath)
-{
-  // check if "driveletter:\"
-  if (pszPath[1] == ':')
-    return (LPSTR)(pszPath + 2);
-
-  // check if UNC-style path
-  if ( (pszPath[0] == '\\') &&
-      (pszPath[1] == '\\') )
-  {
-    LPSTR pszTemp = strchr(pszPath + 2, '\\');
-    if (NULL != pszTemp)
-      // return root part, skip server/share
-      return (LPSTR)pszTemp++;
-    else
-      // UNC syntax validation, return pszPath
-      return (LPSTR)pszTemp;
-  }
-
-  // else ...
-  return (LPSTR)pszPath;
-}
-
-
-/*****************************************************************************
- * Name      : LPWSTR PathSkipRootW
- * Purpose   : Parses a path, ignoring the drive letter or UNC server/share path parts.
- * Parameters: LPCWSTR pszPath
- * Variables :
- * Result    : unknown
- * Remark    : SHLWAPI.PathSkipRootW
- * Status    : UNTESTED
- *
- * Author    : Patrick Haller [Mon, 2000/01/31 23:02]
- *****************************************************************************/
-
-ODINFUNCTION1(LPWSTR, PathSkipRootW, LPCWSTR, pszPath)
-{
-  dprintf(("not implemented"));
-
-  return (LPWSTR)pszPath;
-}
+#include "shlwapi.h"
+
+BOOL VERSION_OsIsUnicode(VOID)
+{
+  return FALSE;
+}
+
+
+
+/*****************************************************************************
+ * Name      : ???
+ * Purpose   : Unknown (used by explorer.exe)
+ * Parameters: Unknown (wrong)
+ * Variables :
+ * Result    : Unknown
+ * Remark    :
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
+ *****************************************************************************/
+
+ODINFUNCTION1(DWORD,SHLWAPI_1,DWORD,x)
+{
+  dprintf(("not implemented"));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : ???
+ * Purpose   : Unknown (used by explorer.exe)
+ * Parameters: Unknown (wrong)
+ * Variables :
+ * Result    : Unknown
+ * Remark    :
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
+ *****************************************************************************/
+
+ODINFUNCTION1(DWORD,SHLWAPI_2,DWORD,x)
+{
+  dprintf(("not implemented"));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : ???
+ * Purpose   : Unknown (used by explorer.exe)
+ * Parameters: Unknown (wrong)
+ * Variables :
+ * Result    : Unknown
+ * Remark    :
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
+ *****************************************************************************/
+
+ODINFUNCTION1(DWORD,SHLWAPI_5,DWORD,x)
+{
+  dprintf(("not implemented"));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : ???
+ * Purpose   : Unknown (used by explorer.exe)
+ * Parameters: Unknown (wrong)
+ * Variables :
+ * Result    : Unknown
+ * Remark    :
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
+ *****************************************************************************/
+
+ODINFUNCTION1(DWORD,SHLWAPI_7,DWORD,x)
+{
+  dprintf(("not implemented"));
+
+  return 0;
+}
+
 
 /*****************************************************************************
@@ -275,4 +188,64 @@
 }
 
+
+/*****************************************************************************
+ * Name      : ???
+ * Purpose   : Unknown (used by explorer.exe)
+ * Parameters: Unknown (wrong)
+ * Variables :
+ * Result    : Unknown
+ * Remark    :
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
+ *****************************************************************************/
+
+ODINFUNCTION1(DWORD,SHLWAPI_12,DWORD,x)
+{
+  dprintf(("not implemented, explorer.exe will trap now"));
+
+  return 0;
+}
+
+/*****************************************************************************
+ * Name      : ???
+ * Purpose   : Unknown (used by explorer.exe)
+ * Parameters: Unknown (wrong)
+ * Variables :
+ * Result    : Unknown
+ * Remark    :
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
+ *****************************************************************************/
+
+ODINFUNCTION1(DWORD,SHLWAPI_13,DWORD,x)
+{
+  dprintf(("not implemented, explorer.exe will trap now"));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      : ???
+ * Purpose   : Unknown (used by explorer.exe)
+ * Parameters: Unknown (wrong)
+ * Variables :
+ * Result    : Unknown
+ * Remark    :
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
+ *****************************************************************************/
+
+ODINFUNCTION1(DWORD,SHLWAPI_14,DWORD,x)
+{
+  dprintf(("not implemented, explorer.exe will trap now"));
+
+  return 0;
+}
+
+
 /*****************************************************************************
  * Name      : ???
@@ -294,90 +267,2 @@
 }
 
-/*****************************************************************************
- * Name      : PathStripToRootA
- * Purpose   : return root (used by explorer.exe)
- * Parameters: Unknown (wrong)
- * Variables :
- * Result    : Unknown
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
- *****************************************************************************/
-
-ODINFUNCTION1(LPSTR,PathStripToRootA,LPSTR,pszPath)
-{
-  dprintf(("not implemented"));
-
-  return NULL;
-}
-
-/*****************************************************************************
- * Name      : PathStripToRootW
- * Purpose   : return root (used by explorer.exe)
- * Parameters: Unknown (wrong)
- * Variables :
- * Result    : Unknown
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
- *****************************************************************************/
-
-ODINFUNCTION1(LPSTR,PathStripToRootW,LPSTR,pszPath)
-{
-  dprintf(("not implemented"));
-
-  return NULL;
-}
-
-/*****************************************************************************
- * Name      : StrToIntA
- * Purpose   : convert string to integer (used by explorer.exe)
- * Parameters: Unknown (wrong)
- * Variables :
- * Result    : Unknown
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
- *****************************************************************************/
-
-ODINFUNCTION1(INT,StrToIntA,LPSTR,pszPath)
-{
-  dprintf(("not implemented"));
-
-  return NULL;
-}
-
-/*************************************************************************
- * PathFindExtension [SHELL32.31]
- *
- * NOTES
- *     returns pointer to last . in last pathcomponent or at \0.
- */
-LPCSTR WINAPI PathFindExtensionA(LPCSTR path)
-{       LPCSTR   lastpoint = NULL;
-        TRACE("%p %s\n",path,path);
-        while (*path)
-        { if (*path=='\\'||*path==' ')
-            lastpoint=NULL;
-          if (*path=='.')
-            lastpoint=path;
-          path++;
-        }
-        return lastpoint?lastpoint:path;
-}
-LPCWSTR WINAPI PathFindExtensionW(LPCWSTR path)
-{       LPCWSTR   lastpoint = NULL;
-        TRACE("(%p %s)\n",path,debugstr_w(path));
-        while (*path)
-        { if (*path==(WCHAR)'\\'||*path==(WCHAR)' ')
-            lastpoint=NULL;
-          if (*path==(WCHAR)'.')
-            lastpoint=path;
-          path++;
-        }
-        return lastpoint?lastpoint:path;
-}
-
Index: trunk/src/shlwapi/shlwapi.def
===================================================================
--- trunk/src/shlwapi/shlwapi.def	(revision 3528)
+++ trunk/src/shlwapi/shlwapi.def	(revision 3539)
@@ -1,507 +1,308 @@
-; $Id: shlwapi.def,v 1.10 2000-04-25 01:59:35 phaller Exp $
+; $Id: shlwapi.def,v 1.11 2000-05-15 02:42:35 phaller Exp $
+
+; updated export ordinals to NT4 version of SHLWAPI.DLL
+; Note: W95/W98 has DIFFERENT export ordinals
 
 LIBRARY SHLWAPI INITINSTANCE TERMINSTANCE
 DATA MULTIPLE NONSHARED
 
-IMPORTS
-
-    ; 1      stub    stub_01
-    ; 2      stub    stub_02
-    ; 3      stub    stub_03
-    ; 4      stub    stub_04
-    ; 5      stub    stub_05
-    ; 6      stub    stub_06
-    ; 7      stub    stub_07
-    ; 8      stub    stub_08
-    ; 9      stub    stub_09
-    ; 10     stub    stub_10
-    ; 11     stub    stub_11
-    ; 12     stub    stub_12
-    ; 13     stub    stub_13
-    ; 14     stub    stub_14
-    ; 15     stub    stub_15
-    ; 16     stub    stub_16
-    ; 17     stub    stub_17
-    ; 18     stub    stub_18
-    ; 19     stub    stub_19
-    ; 20     stub    stub_20
-    ; 21     stub    stub_21
-    ; 22     stub    stub_22
-    ; 23     stub    stub_23
-    ; 24     stub    stub_24
-    ; 25     stub    stub_25
-    ; 26     stub    stub_26
-    ; 27     stub    stub_27
-    ; 28     stub    stub_28
-    ; 29     stub    stub_29
-    ; 30     stub    stub_30
-    ; 31     stub    stub_31
-    ; 32     stub    stub_32
-    ; 33     stub    stub_33
-    ; 34     stub    stub_34
-    ; 35     stub    stub_35
-    ; 36     stub    stub_36
-    ; 37     stub    stub_37
-    ; 38     stub    stub_38
-    ; 39     stub    stub_39
-    ; 40     stub    stub_40
-    ; 41     stub    stub_41
-    ; 42     stub    stub_42
-    ; 43     stub    stub_43
-    ; 44     stub    stub_44
-    ; 45     stub    stub_45
-    ; 46     stub    stub_46
-    ; 47     stub    stub_47
-    ; 48     stub    stub_48
-    ; 49     stub    stub_49
-    ; 50     stub    stub_50
-    ; 51     stub    stub_51
-    ; 52     stub    stub_52
-    ; 53     stub    stub_53
-    ; 54     stub    stub_54
-    ; 55     stub    stub_55
-    ; 56     stub    stub_56
-    ; 57     stub    stub_57
-    ; 58     stub    stub_58
-    ; 59     stub    stub_59
-    ; 60     stub    stub_60
-    ; 61     stub    stub_61
-    ; 62     stub    stub_62
-    ; 63     stub    stub_63
-    ; 64     stub    stub_64
-    ; 65     stub    stub_65
-    ; 66     stub    stub_66
-    ; 67     stub    stub_67
-    ; 68     stub    stub_68
-    ; 69     stub    stub_69
-    ; 70     stub    stub_70
-    ; 71     stub    stub_71
-    ; 72     stub    stub_72
-    ; 73     stub    stub_73
-    ; 74     stub    stub_74
-    ; 75     stub    stub_75
-    ; 76     stub    stub_76
-    ; 77     stub    stub_77
-    ; 78     stub    stub_78
-    ; 79     stub    stub_79
-    ; 80     stub    stub_80
-    ; 81     stub    stub_81
-    ; 82     stub    stub_82
-    ; 83     stub    stub_83
-    ; 84     stub    stub_84
-    ; 85     stub    stub_85
-    ; 86     stub    stub_86
-    ; 87     stub    stub_87
-    ; 88     stub    stub_88
-    ; 89     stub    stub_89
-    ; 90     stub    stub_90
-    ; 91     stub    stub_91
-    ; 92     stub    stub_92
-    ; 93     stub    stub_93
-    ; 94     stub    stub_94
-    ; 95     stub    stub_95
-    ; 96     stub    stub_96
-    ; 97     stub    stub_97
-    ; 98     stub    stub_98
-    ; 99     stub    stub_99
-    ; 100    stub    stub_100
-    ; 101    stub    stub_101
-    ; 102    stub    stub_102
-    ; 103    stub    stub_103
-    ; 104    stub    stub_104
-    ; 105    stub    stub_105
-    ; 106    stub    stub_106
-    ; 107    stub    stub_107
-    ; 108    stub    stub_108
-    ; 109    stub    stub_109
-    ; 110    stub    stub_110
-    ; 111    stub    stub_111
-    ; 112    stub    stub_112
-    ; 113    stub    stub_113
-    ; 114    stub    stub_114
-    ; 115    stub    stub_115
-    ; 116    stub    stub_116
-    ; 117    stub    stub_117
-    ; 118    stub    stub_118
-    ; 119    stub    stub_119
-    ; 120    stub    stub_120
-    ; 121    stub    stub_121
-    ; 122    stub    stub_122
-    ; 123    stub    stub_123
-    ; 124    stub    stub_124
-    ; 125    stub    stub_125
-    ; 126    stub    stub_126
-    ; 127    stub    stub_127
-    ; 128    stub    stub_128
-    ; 129    stub    stub_129
-    ; 130    stub    stub_130
-    ; 131    stub    stub_131
-    ; 132    stub    stub_132
-    ; 133    stub    stub_133
-    ; 134    stub    stub_134
-    ; 135    stub    stub_135
-    ; 136    stub    stub_136
-    ; 137    stub    stub_137
-    ; 138    stub    stub_138
-    ; 139    stub    stub_139
-    ; 140    stub    stub_140
-    ; 141    stub    stub_141
-    ; 142    stub    stub_142
-    ; 143    stub    stub_143
-    ; 144    stub    stub_144
-    ; 145    stub    stub_145
-    ; 146    stub    stub_146
-    ; 147    stub    stub_147
-    ; 148    stub    stub_148
-    ; 149    stub    stub_149
-    ; 150    stub    stub_150
-    ; 151    stub    stub_151
-    ; 152    stub    stub_152
-    ; 153    stub    stub_153
-    ; 154    stub    stub_154
-    ; 155    stub    stub_155
-    ; 156    stub    stub_156
-    ; 157    stub    stub_157
-    ; 158    stub    stub_158
-    ; 159    stub    stub_159
-    ; 160    stub    stub_160
-    ; 161    stub    stub_161
-;  _ChrCmpIA                          = SHELL32.ChrCmpIA
-;  _ChrCmpIW                          = SHELL32.ChrCmpIW
-    ; 162    stub    ChrCmpIA
-    ; 163    stub    ChrCmpIW
-    ; 164    stub    DllGetVersion
-    ; 165    stub    GetMenuPosFromID
-    ; 166    stub    HashData
-    ; 167    stub    IntlStrEqWorkerA
-    ; 168    stub    IntlStrEqWorkerW
-
-;    PathAddBackslashA                          = SHELL32.PathAddBackslashA
-;    PathAddBackslashW                          = SHELL32.PathAddBackslashW
-
-    ; 171    stub    PathAddExtensionA
-    ; 172    stub    PathAddExtensionW
-    ; 173    stdcall PathAppendA (str str) PathAppendA
-    ; 174    stub    PathAppendW
-    ; 175    stdcall PathBuildRootA (ptr long) PathBuildRootA
-    ; 176    stub    PathBuildRootW
-    ; 177    stub    PathCanonicalizeA
-    ; 178    stub    PathCanonicalizeW
-    ; 179    stdcall PathCombineA (ptr ptr ptr) PathCombineA
-    ; 180    stdcall PathCombineW (ptr ptr ptr) PathCombineW
-    ; 181    stub    PathCommonPrefixA
-    ; 182    stub    PathCommonPrefixW
-    ; 183    stub    PathCompactPathA
-    ; 184    stub    PathCompactPathExA
-    ; 185    stub    PathCompactPathExW
-    ; 186    stub    PathCompactPathW
-    ; 187    stub    PathCreateFromUrlA
-    ; 188    stub    PathCreateFromUrlW
-    ; 189    stdcall PathFileExistsA (str) PathFileExistsA
-    ; 190    stub    PathFileExistsW
-    ; 191    stdcall PathFindExtensionA (ptr) PathFindExtensionA
-    ; 192    stdcall PathFindExtensionW (ptr) PathFindExtensionW
-;    PathFindFileNameA                          = SHELL32.PathFindFilenameA
-;    PathFindFileNameW                          = SHELL32.PathFindFilenameW
-    ; 195    stub    PathFindNextComponentA
-    ; 196    stub    PathFindNextComponentW
-    ; 197    stdcall PathFindOnPathA (ptr ptr) PathFindOnPathA
-    ; 198    stdcall PathFindOnPathW (ptr ptr) PathFindOnPathW
-    ; 199    stdcall PathGetArgsA (str) PathGetArgsA
-    ; 200    stdcall PathGetArgsW (str) PathGetArgsW
-    ; 201    stub    PathGetCharTypeA
-    ; 202    stub    PathGetCharTypeW
-    ; 203    stdcall PathGetDriveNumberA (str) PathGetDriveNumber
-    ; 204    stub    PathGetDriveNumberW #(str) PathGetDriveNumber
-    ; 205    stub    PathIsContentTypeA
-    ; 206    stub    PathIsContentTypeW
-    ; 207    stub    PathIsDirectoryA
-    ; 208    stub    PathIsDirectoryW
-    ; 209    stub    PathIsFileSpecA
-    ; 210    stub    PathIsFileSpecW
-    ; 211    stub    PathIsPrefixA
-    ; 212    stub    PathIsPrefixW
-    ; 213    stdcall PathIsRelativeA (ptr) PathIsRelativeA
-    ; 214    stdcall PathIsRelativeW (ptr) PathIsRelativeW
-
-;    PathIsRootA                                = SHELL32.PathIsRootA
-;    PathIsRootW                                = SHELL32.PathIsRootW
-
-    ; 217    stub    PathIsSameRootA
-    ; 218    stub    PathIsSameRootW
-    ; 219    stub    PathIsSystemFolderA
-    ; 220    stub    PathIsSystemFolderW
-    ; 221    stdcall PathIsUNCA (ptr) PathIsUNCA
-    ; 222    stub    PathIsUNCServerA
-    ; 223    stub    PathIsUNCServerShareA
-    ; 224    stub    PathIsUNCServerShareW
-    ; 225    stub    PathIsUNCServerW
-    ; 226    stdcall PathIsUNCW (ptr) PathIsUNCW
-    ; 227    stub    PathIsURLA
-    ; 228    stub    PathIsURLW
-    ; 229    stub    PathMakePrettyA
-    ; 230    stub    PathMakePrettyW
-    ; 231    stub    PathMakeSystemFolderA
-    ; 232    stub    PathMakeSystemFolderW
-
-;    PathMatchSpecA                    = SHELL32.PathMatchSpecA
-;    PathMatchSpecW                    = SHELL32.PathMatchSpecW
-
-    ; 235    stub    PathParseIconLocationA
-    ; 236    stub    PathParseIconLocationW
-    ; 237    stdcall PathQuoteSpacesA (ptr) PathQuoteSpacesW
-    ; 238    stdcall PathQuoteSpacesW (ptr) PathQuoteSpacesW
-    ; 239    stub    PathRelativePathToA
-    ; 240    stub    PathRelativePathToW
-    ; 241    stub    PathRemoveArgsA
-    ; 242    stub    PathRemoveArgsW
-
-;    PathRemoveBackslashA               = SHELL32.PathRemoveBackslashA
-;    PathRemoveBackslashW               = SHELL32.PathRemoveBackslashW
-
-    ; 245    stdcall PathRemoveBlanksA(str) PathRemoveBlanksA
-    ; 246    stdcall PathRemoveBlanksW(wstr) PathRemoveBlanksW
-    ; 247    stub    PathRemoveExtensionA
-    ; 248    stub    PathRemoveExtensionW
-
-;    PathRemoveFileSpecA                        = SHELL32.PathRemoveFileSpec
-
-    ; 250    stub    PathRemoveFileSpecW
-    ; 251    stub    PathRenameExtensionA
-    ; 252    stub    PathRenameExtensionW
-    ; 253    stub    PathSearchAndQualifyA
-    ; 254    stub    PathSearchAndQualifyW
-    ; 255    stdcall PathSetDlgItemPathA (long long ptr) PathSetDlgItemPathA
-    ; 256    stdcall PathSetDlgItemPathW (long long ptr) PathSetDlgItemPathW
-    ; 257    stub    PathSkipRootA
-    ; 258    stub    PathSkipRootW
-    ; 259    stub    PathStripPathA
-    ; 260    stub    PathStripPathW
-    ; 261    stub    PathStripToRootA
-    ; 262    stub    PathStripToRootW
-    ; 263    stub    PathUnmakeSystemFolderA
-    ; 264    stub    PathUnmakeSystemFolderW
-    ; 265    stdcall PathUnquoteSpacesA (str) PathUnquoteSpacesA
-    ; 266    stdcall PathUnquoteSpacesW (str) PathUnquoteSpacesW
-    ; 267    stub    SHCreateShellPalette
-    ; 268    stub    SHDeleteEmptyKeyA
-    ; 269    stub    SHDeleteEmptyKeyW
-    ; 270    stub    SHDeleteKeyA
-    ; 271    stub    SHDeleteKeyW
-    ; 272    stub    SHDeleteOrphanKeyA
-    ; 273    stub    SHDeleteOrphanKeyW
-    ; 274    stub    SHDeleteValueA
-    ; 275    stub    SHDeleteValueW
-    ; 276    stub    SHEnumKeyExA
-    ; 277    stub    SHEnumKeyExW
-    ; 278    stub    SHEnumValueA
-    ; 279    stub    SHEnumValueW
-    ; 280    stub    SHGetInverseCMAP
-    ; 281    stdcall SHGetValueA ( long ptr ptr ptr ptr ptr ) SHGetValueA
-    ; 282    stdcall SHGetValueW ( long ptr ptr ptr ptr ptr ) SHGetValueW
-    ; 283    stub    SHIsLowMemoryMachine
-    ; 284    stub    SHOpenRegStreamA
-    ; 285    stub    SHOpenRegStreamW
-    ; 286    stub    SHQueryInfoKeyA
-    ; 287    stub    SHQueryInfoKeyW
-    ; 288    stub    SHQueryValueExA
-    ; 289    stub    SHQueryValueExW
-    ; 290    stub    SHRegCloseUSKey
-    ; 291    stub    SHRegCreateUSKeyA
-    ; 292    stub    SHRegCreateUSKeyW
-    ; 293    stub    SHRegDeleteEmptyUSKeyA
-    ; 294    stub    SHRegDeleteEmptyUSKeyW
-    ; 295    stub    SHRegDeleteUSValueA
-    ; 296    stub    SHRegDeleteUSValueW
-    ; 297    stub    SHRegEnumUSKeyA
-    ; 298    stub    SHRegEnumUSKeyW
-    ; 299    stub    SHRegEnumUSValueA
-    ; 300    stub    SHRegEnumUSValueW
-    ; 301    stub    SHRegGetBoolUSValueA
-    ; 302    stub    SHRegGetBoolUSValueW
-    ; 303    stdcall SHRegGetUSValueA ( ptr ptr ptr ptr ptr long ptr long ) SHRegGetUSValueA
-    ; 304    stdcall SHRegGetUSValueW ( ptr ptr ptr ptr ptr long ptr long ) SHRegGetUSValueW
-    ; 305    stub    SHRegOpenUSKeyA
-    ; 306    stub    SHRegOpenUSKeyW
-    ; 307    stub    SHRegQueryInfoUSKeyA
-    ; 308    stub    SHRegQueryInfoUSKeyW
-    ; 309    stub    SHRegQueryUSValueA
-    ; 310    stub    SHRegQueryUSValueW
-    ; 311    stub    SHRegSetUSValueA
-    ; 312    stub    SHRegSetUSValueW
-    ; 313    stub    SHRegWriteUSValueA
-    ; 314    stub    SHRegWriteUSValueW
-    ; 315    stub    SHSetValueA
-    ; 316    stub    SHSetValueW
-    ; 317    stub    StrCSpnA
-    ; 318    stub    StrCSpnIA
-    ; 319    stub    StrCSpnIW
-    ; 320    stub    StrCSpnW
-    ; 321    stub    StrCatW
-    ; 322    stub    StrChrA
-    ; 323    stub    StrChrIA
-    ; 324    stub    StrChrIW
-    ; 325    stdcall StrChrW (ptr ptr) StrChrW
-    ; 326    stub    StrCmpIW
-    ; 327    stub    StrCmpNA
-    ; 328    stub    StrCmpNIA
-    ; 329    stdcall StrCmpNIW (wstr wstr long) StrCmpNIW
-    ; 330    stub    StrCmpNW
-    ; 331    stub    StrCmpW
-    ; 332    stub    StrCpyNW
-    ; 333    stub    StrCpyW
-    ; 334    stub    StrDupA
-    ; 335    stub    StrDupW
-    ; 336    stdcall StrFormatByteSizeA(long str long) StrFormatByteSizeA
-    ; 337    stdcall StrFormatByteSizeW(long wstr long) StrFormatByteSizeW
-    ; 338    stub    StrFromTimeIntervalA
-    ; 339    stub    StrFromTimeIntervalW
-    ; 340    stub    StrIsIntlEqualA
-    ; 341    stub    StrIsIntlEqualW
-    ; 342    stub    StrNCatA
-    ; 343    stub    StrNCatW
-    ; 344    stub    StrPBrkA
-    ; 345    stub    StrPBrkW
-    ; 346    stdcall StrRChrA (str str long) StrRChrA
-    ; 347    stub    StrRChrIA
-    ; 348    stub    StrRChrIW
-    ; 349    stdcall StrRChrW (wstr wstr long) StrRChrW
-    ; 350    stub    StrRStrIA
-    ; 351    stub    StrRStrIW
-    ; 352    stub    StrSpnA
-    ; 353    stub    StrSpnW
-    ; 354    stub    StrStrA
-    ; 355    stub    StrStrIA
-    ; 356    stub    StrStrIW
-    ; 357    stub    StrStrW
-    ; 358    stub    StrToIntA
-    ; 359    stub    StrToIntExA
-    ; 360    stub    StrToIntExW
-    ; 361    stub    StrToIntW
-    ; 362    stub    StrTrimA
-    ; 363    stub    StrTrimW
-    ;
-    ; # exported in later versions
-    ; 400 stdcall StrRetToBufA (ptr ptr ptr long) StrRetToBufA
-    ; 401 stdcall StrRetToBufW (ptr ptr ptr long) StrRetToBufW
-    ; #402 stdcall StrRetToStrA (ptr ptr ptr) StrRetToStrA
-    ; #403 stdcall StrRetToStrW (ptr ptr ptr) StrRetToStrW
-    ;
-    ;
 
 EXPORTS
-    SHLWAPI_8           = _SHLWAPI_8@4                         @8
-    SHLWAPI_9           = _SHLWAPI_9@4                         @9
-    SHLWAPI_10          = _SHLWAPI_10@4                        @10
-    SHLWAPI_16          = _SHLWAPI_16@4                        @16
-
-    PathAddBackslashA = _PathAddBackslashA@4                    @169
-    PathAddBackslashW = _PathAddBackslashW@4                    @170
-
-    PathAppendA       = _PathAppendA@8                          @173
-    PathAppendW       = _PathAppendW@8                          @174
-    PathBuildRootA    = _PathBuildRootA@8                       @175
-    PathBuildRootW    = _PathBuildRootW@8                       @176
-
-    PathCombineA      = _PathCombineA@12                        @179
-    PathCombineW      = _PathCombineW@12                        @180
-
-    PathFileExistsA   = _PathFileExistsA@4                      @189
-    PathFileExistsW   = _PathFileExistsW@4                      @190
-    PathFindExtensionA   = _PathFindExtensionA@4                @191
-    PathFindExtensionW   = _PathFindExtensionW@4                @192
-    PathFindFileNameA = _PathFindFilenameA@4                    @193
-    PathFindFileNameW = _PathFindFilenameW@4                    @194
-
-    PathFindOnPathA   = _PathFindOnPathA@8                      @197
-    PathFindOnPathW   = _PathFindOnPathW@8                      @198
-    PathGetArgsA      = _PathGetArgsA@4                         @199
-    PathGetArgsW      = _PathGetArgsW@4                         @200
-
-    PathGetDriveNumberA = _PathGetDriveNumberA@4                @203
-    PathGetDriveNumberW = _PathGetDriveNumberW@4                @204
-    PathIsRelativeA   = _PathIsRelativeA@4                      @213
-    PathIsRelativeW   = _PathIsRelativeW@4                      @214
-    PathIsRootA       = _PathIsRootA@4                          @215
-    PathIsRootW       = _PathIsRootW@4                          @216
-
-    PathIsUNCA        = _PathIsUNCA@4                           @221
-    PathIsUNCW        = _PathIsUNCW@4                           @226
-
-    PathMatchSpecA    = _PathMatchSpecA@8                       @233
-    PathMatchSpecW    = _PathMatchSpecW@8                       @234
-    PathQuoteSpacesA  = _PathQuoteSpacesA@4                     @237
-    PathQuoteSpacesW  = _PathQuoteSpacesW@4                     @238
-
-    PathRemoveBackslashA = _PathRemoveBackslashA@4              @243
-    PathRemoveBackslashW = _PathRemoveBackslashW@4              @244
-    PathRemoveBlanksA    = _PathRemoveBlanksA@4                 @245
-    PathRemoveBlanksW    = _PathRemoveBlanksW@4                 @246
-    PathRemoveFileSpecA  = _PathRemoveFileSpecA@4               @249
-
-    PathSetDlgItemPathA  = _PathSetDlgItemPathA@12              @255
-    PathSetDlgItemPathW  = _PathSetDlgItemPathW@12              @256
-    PathSkipRootA        = _PathSkipRootA@4                     @257
-    PathSkipRootW        = _PathSkipRootW@4                     @258
-
-    PathStripToRootA     = _PathStripToRootA@4                  @261
-    PathStripToRootW     = _PathStripToRootW@4                  @262
-
-    PathUnquoteSpacesA   = _PathUnquoteSpacesA@4                @265
-    PathUnquoteSpacesW   = _PathUnquoteSpacesW@4                @266
-
-    SHGetValueA          = _SHGetValueA@24                      @281
-    SHGetValueW          = _SHGetValueW@24                      @282
-
-    SHRegGetBoolUSValueA = _SHRegGetBoolUSValueA@20             @301
-    SHRegGetBoolUSValueW = _SHRegGetBoolUSValueW@20             @302
-    SHRegGetUSValueA     = _SHRegGetUSValueA@32                 @303
-    SHRegGetUSValueW     = _SHRegGetUSValueW@32                 @304
-    StrChrA              = _StrChrA@8                           @322
-    StrChrIA             = _StrChrIA@8                          @323
-    StrChrIW             = _StrChrIW@8                          @324
-    StrChrW              = _StrChrW@8                           @325
-
-    StrCmpNIA            = _StrCmpNIA@12                        @328
-    StrCmpNIW            = _StrCmpNIW@12                        @329
-
-    StrFormatByteSizeA   = _StrFormatByteSizeA@12               @336
-    StrFormatByteSizeW   = _StrFormatByteSizeW@12               @337
-    StrRChrA             = _StrRChrA@12                         @346
-    StrRChrW             = _StrRChrW@12                         @349
-
-    StrStrIA             = _StrStrIA@8                          @355
-    StrStrIW             = _StrStrIW@8                          @356
-
-    StrToIntA            = _StrToIntA@4                         @358
-
-    ; --- URL handling ---
-    UrlApplySchemeA      = _UrlApplySchemeA@16                  @364
-    UrlApplySchemeW      = _UrlApplySchemeW@16                  @365
-    UrlCanonicalizeA     = _UrlCanonicalizeA@16                 @366
-    UrlCanonicalizeW     = _UrlCanonicalizeW@16                 @367
-    UrlCombineA          = _UrlCombineA@20                      @368
-    UrlCombineW          = _UrlCombineW@20                      @369
-    UrlCompareA          = _UrlCompareA@12                      @370
-    UrlCompareW          = _UrlCompareW@12                      @371
-    UrlCreateFromPathA   = _UrlCreateFromPathA@16               @372
-    UrlCreateFromPathW   = _UrlCreateFromPathW@16               @373
-    UrlEscapeA           = _UrlEscapeA@16                       @374
-    UrlEscapeW           = _UrlEscapeW@16                       @375
-    UrlGetLocationA      = _UrlGetLocationA@4                   @376
-    UrlGetLocationW      = _UrlGetLocationW@4                   @377
-    UrlGetPartA          = _UrlGetPartA@20                      @378
-    UrlGetPartW          = _UrlGetPartW@20                      @379
-    UrlHashA             = _UrlHashA@12                         @380
-    UrlHashW             = _UrlHashW@12                         @381
-    UrlIsA               = _UrlIsA@8                            @382
-    UrlIsNoHistoryA      = _UrlIsNoHistoryA@4                   @383
-    UrlIsNoHistoryW      = _UrlIsNoHistoryW@4                   @384
-    UrlIsOpaqueA         = _UrlIsOpaqueA@4                      @385
-    UrlIsOpaqueW         = _UrlIsOpaqueW@4                      @386
-    UrlIsW               = _UrlIsW@8                            @387
-    UrlUnescapeA         = _UrlUnescapeA@16                     @388
-    UrlUnescapeW         = _UrlUnescapeW@16                     @389
-
-    StrRetToBufA         = _StrRetToBufA@16                     @400
-    StrRetToBufW         = _StrRetToBufW@16                     @401
+  ; AssocCreate            = _AssocCreate@?                       @252  ; NT4
+  ; AssocQueryKeyA         = _AssocQueryKeyA@?                    @253  ; NT4
+  ; AssocQueryKeyW         = _AssocQueryKeyW@?                    @254  ; NT4
+  ; AssocQueryStringA      = _AssocQueryStringA@?                 @380  ; NT4
+  ; AssocQueryStringByKeyA = _AssocQueryStringByKeyA@?            @381  ; NT4
+  ; AssocQueryStringByKeyW = _AssocQueryStringByKeyW@?            @382  ; NT4
+  ; AssocQueryStringW      = _AssocQueryStringW@?                 @383  ; NT4
+  ; ChrCmpIA               = _ChrCmpIA@?                          @384
+  ; ChrCmpIW               = _ChrCmpIW@?                          @385
+  ; ColorAdjustLuma        = _ColorAdjustLuma@?                   @386  ; NT4
+  ; ColorHLSToRGB          = _ColorHLSToRGB@?                     @403  ; NT4
+  ; ColorRGBToHLS          = _ColorRGBToHLS@?                     @444  ; NT4
+  ; DllGetVersion          = _DllGetVersion@?                     @445
+  ; GetMenuPosFromID       = _GetMenuPosFromID@?                  @446
+  ; HashData               = _HashData@?                          @447
+  ; IntlStrEqWorkerA       = _IntlStrEqWorkerA@?                  @448
+  ; IntlStrEqWorkerW       = _IntlStrEqWorkerW@?                  @449
+    PathAddBackslashA      = _PathAddBackslashA@4                 @450
+  ;*PathAddBackslashAW     = _PathAddBackslashAW@4
+    PathAddBackslashW      = _PathAddBackslashW@4                 @451
+  ; PathAddExtensionA      = _PathAddExtensionA@?                 @452
+  ; PathAddExtensionW      = _PathAddExtensionW@?                 @453
+    PathAppendA            = _PathAppendA@8                       @454
+    PathAppendW            = _PathAppendW@8                       @455
+    PathBuildRootA         = _PathBuildRootA@8                    @456
+    PathBuildRootW         = _PathBuildRootW@8                    @457
+  ; PathCanonicalizeA      = _PathCanonicalizeA@?                 @458
+  ; PathCanonicalizeW      = _PathCanonicalizeW@?                 @459
+    PathCombineA           = _PathCombineA@12                     @460
+  ;*PathCombineAW          = _PathCombineAW@12
+    PathCombineW           = _PathCombineW@12                     @461
+  ; PathCommonPrefixA      = _PathCommonPrefixA@?                 @462
+  ; PathCommonPrefixW      = _PathCommonPrefixW@?                 @463
+  ; PathCompactPathA       = _PathCompactPathA@?                  @464
+  ; PathCompactPathExA     = _PathCompactPathExA@?                @465
+  ; PathCompactPathExW     = _PathCompactPathExW@?                @466
+  ; PathCompactPathW       = _PathCompactPathW@?                  @467
+  ; PathCreateFromUrlA     = _PathCreateFromUrlA@?                @468
+  ; PathCreateFromUrlW     = _PathCreateFromUrlW@?                @469
+    PathFileExistsA        = _PathFileExistsA@4                   @470
+    PathFileExistsW        = _PathFileExistsW@4                   @471
+    PathFindExtensionA     = _PathFindExtensionA@4                @472
+  ;*PathFindExtensionAW    = _PathFindExtensionAW@4
+    PathFindExtensionW     = _PathFindExtensionW@4                @473
+    PathFindFilenameA      = _PathFindFilenameA@4                 @474
+  ;*PathFindFilenameAW     = _PathFindFilenameAW@4
+    PathFindFilenameW      = _PathFindFilenameW@4                 @475
+  ; PathFindNextComponentA = _PathFindNextComponentA@?            @476
+  ; PathFindNextComponentW = _PathFindNextComponentW@?            @477
+    PathFindOnPathA        = _PathFindOnPathA@8                   @478
+  ;*PathFindOnPathAW       = _PathFindOnPathAW@8
+    PathFindOnPathW        = _PathFindOnPathW@8                   @479
+  ; PathFindSuffixArrayA   = _PathFindSuffixArrayA@?              @480  ; NT4
+  ; PathFindSuffixArrayW   = _PathFindSuffixArrayW@?              @481  ; NT4
+    PathGetArgsA           = _PathGetArgsA@4                      @482
+  ;*PathGetArgsAW          = _PathGetArgsAW@4
+    PathGetArgsW           = _PathGetArgsW@4                      @483
+  ; PathGetCharTypeA       = _PathGetCharTypeA@?                  @484
+  ; PathGetCharTypeW       = _PathGetCharTypeW@?                  @485
+    PathGetDriveNumberA    = _PathGetDriveNumberA@4               @486
+  ;*PathGetDriveNumberAW   = _PathGetDriveNumberAW@4
+    PathGetDriveNumberW    = _PathGetDriveNumberW@4               @487
+  ; PathIsContentTypeA     = _PathIsContentTypeA@?                @488
+  ; PathIsContentTypeW     = _PathIsContentTypeW@?                @489
+  ; PathIsDirectoryA       = _PathIsDirectoryA@?                  @490
+  ; PathIsDirectoryEmptyA  = _PathIsDirectoryEmptyA@?             @491  ; NT4
+  ; PathIsDirectoryEmptyW  = _PathIsDirectoryEmptyW@?             @492  ; NT4
+  ; PathIsDirectoryW       = _PathIsDirectoryW@?                  @493
+  ; PathIsFileSpecA        = _PathIsFileSpecA@?                   @494
+  ; PathIsFileSpecW        = _PathIsFileSpecW@?                   @495
+  ; PathIsLFNFileSpecA     = _PathIsLFNFileSpecA@?                @496  ; NT4
+  ; PathIsLFNFileSpecW     = _PathIsLFNFileSpecW@?                @497  ; NT4
+  ; PathIsNetworkPathA     = _PathIsNetworkPathA@?                @498  ; NT4
+  ; PathIsNetworkPathW     = _PathIsNetworkPathW@?                @499  ; NT4
+  ; PathIsPrefixA          = _PathIsPrefixA@?                     @500
+  ; PathIsPrefixW          = _PathIsPrefixW@?                     @501
+    PathIsRelativeA        = _PathIsRelativeA@4                   @502
+  ;*PathIsRelativeAW       = _PathIsRelativeAW@4
+    PathIsRelativeW        = _PathIsRelativeW@4                   @503
+    PathIsRootA            = _PathIsRootA@4                       @504
+  ;*PathIsRootAW           = _PathIsRootAW@4
+    PathIsRootW            = _PathIsRootW@4                       @505
+  ; PathIsSameRootA        = _PathIsSameRootA@?                   @506
+  ; PathIsSameRootW        = _PathIsSameRootW@?                   @507
+  ; PathIsSystemFolderA    = _PathIsSystemFolderA@?               @508
+  ; PathIsSystemFolderW    = _PathIsSystemFolderW@?               @509
+    PathIsUNCA             = _PathIsUNCA@4                        @510
+  ; PathIsUNCServerA       = _PathIsUNCServerA@?                  @511
+  ; PathIsUNCServerShareA  = _PathIsUNCServerShareA@?             @512
+  ; PathIsUNCServerShareW  = _PathIsUNCServerShareW@?             @513
+  ; PathIsUNCServerW       = _PathIsUNCServerW@?                  @514
+  ;*PathIsUNCAW            = _PathIsUNCAW@4
+    PathIsUNCW             = _PathIsUNCW@4                        @515
+    PathIsURLA             = _PathIsURLA@4                        @516
+  ; PathIsURLW             = _PathIsURLW@4                        @517
+  ; PathMakePrettyA        = _PathMakePrettyA@?                   @518
+  ; PathMakePrettyW        = _PathMakePrettyW@?                   @519
+  ; PathMakeSystemFolderA  = _PathMakeSystemFolderA@?             @520
+  ; PathMakeSystemFolderW  = _PathMakeSystemFolderW@?             @521
+    PathMatchSpecA         = _PathMatchSpecA@8                    @522
+  ;*PathMatchSpecAW        = _PathMatchSpecAW@8
+    PathMatchSpecW         = _PathMatchSpecW@8                    @523
+  ; PathParseIconLocationA = _PathParseIconLocationA@?            @524
+  ; PathParseIconLocationW = _PathParseIconLocationW@?            @525
+    PathQuoteSpacesA       = _PathQuoteSpacesA@4                  @526
+  ;*PathQuoteSpacesAW      = _PathQuoteSpacesAW@4
+    PathQuoteSpacesW       = _PathQuoteSpacesW@4                  @527
+  ; PathRelativePathToA    = _PathRelativePathToA@?               @528
+  ; PathRelativePathToW    = _PathRelativePathToW@?               @529
+  ; PathRemoveArgsA        = _PathRemoveArgsA@?                   @530
+  ; PathRemoveArgsW        = _PathRemoveArgsW@?                   @531
+    PathRemoveBackslashA   = _PathRemoveBackslashA@4              @532
+    PathRemoveBackslashW   = _PathRemoveBackslashW@4              @533
+    PathRemoveBlanksA      = _PathRemoveBlanksA@4                 @534
+  ;*PathRemoveBlanksAW     = _PathRemoveBlanksAW@4
+    PathRemoveBlanksW      = _PathRemoveBlanksW@4                 @535
+  ; PathRemoveExtensionA   = _PathRemoveExtensionA@?              @536
+  ; PathRemoveExtensionW   = _PathRemoveExtensionW@?              @537
+    PathRemoveFileSpecA    = _PathRemoveFileSpecA@4               @538
+  ; PathRemoveFileSpecA    = _PathRemoveFileSpecW@4               @539
+  ; PathRenameExtensionA   = _PathRenameExtensionA@?              @540
+  ; PathRenameExtensionW   = _PathRenameExtensionW@?              @541
+  ; PathSearchAndQualifyA  = _PathSearchAndQualifyA@?             @542
+  ; PathSearchAndQualifyW  = _PathSearchAndQualifyW@?             @543
+    PathSetDlgItemPathA    = _PathSetDlgItemPathA@12              @544
+  ;*PathSetDlgItemPathAW   = _PathSetDlgItemPathAW@12
+    PathSetDlgItemPathW    = _PathSetDlgItemPathW@12              @545
+    PathSkipRootA          = _PathSkipRootA@4                     @546
+    PathSkipRootW          = _PathSkipRootW@4                     @547
+  ; PathStripPathA         = _PathStripPathA@?                    @548
+  ; PathStripPathW         = _PathStripPathW@?                    @549
+    PathStripToRootA       = _PathStripToRootA@4                  @550
+    PathStripToRootW       = _PathStripToRootW@4                  @551
+  ; PathUndecorateA        = _PathUndecorateA@?                   @552  ; NT4
+  ; PathUndecorateW        = _PathUndecorateW@?                   @553  ; NT4
+  ; PathUnmakeSystemFolderA= _PathUnmakeSystemFolderA@?           @554
+  ; PathUnmakeSystemFolderW= _PathUnmakeSystemFolderW@?           @555
+    PathUnquoteSpacesA     = _PathUnquoteSpacesA@4                @556
+  ;*PathUnquoteSpacesAW    = _PathUnquoteSpacesAW@4
+    PathUnquoteSpacesW     = _PathUnquoteSpacesW@4                @557
+  ; SHAutoComplete         = _SHAutoComplete@?                    @558  ; NT4
+  ; SHCopyKeyA             = _SHCopyKeyA@?                        @559  ; NT4
+  ; SHCopyKeyW             = _SHCopyKeyW@?                        @560  ; NT4
+  ; SHCreateShellPalette   = _SHCreateShellPalette@?              @561
+  ; SHCreateStreamOnFileA  = _SHCreateStreamOnFileA@?             @562  ; NT4
+  ; SHCreateStreamOnFileAOld = _SHCreateStreamOnFileAOld@?        @315  ; NT4
+  ; SHCreateStreamOnFileW  = _SHCreateStreamOnFileW@?             @563  ; NT4
+  ; SHCreateStreamOnFileWOld = _SHCreateStreamOnFileWOld@?        @316  ; NT4
+  ; SHCreateStreamWrapper  = _SHCreateStreamWrapper@?             @564  ; NT4
+  ; SHCreateThread         = _SHCreateThread@?                    @565  ; NT4
+  ; SHDeleteEmptyKeyA      = _SHDeleteEmptyKeyA@?                 @566
+  ; SHDeleteEmptyKeyW      = _SHDeleteEmptyKeyW@?                 @567
+  ; SHDeleteKeyA           = _SHDeleteKeyA@?                      @568
+  ; SHDeleteKeyW           = _SHDeleteKeyW@?                      @569
+  ; SHDeleteOrphanKeyA     = _SHDeleteOrphanKeyA@?                @570
+  ; SHDeleteOrphanKeyW     = _SHDeleteOrphanKeyW@?                @571
+  ; SHDeleteValueA         = _SHDeleteValueA@?                    @572
+  ; SHDeleteValueW         = _SHDeleteValueW@?                    @573
+  ; SHEnumKeyExA           = _SHEnumKeyExA@?                      @574
+  ; SHEnumKeyExW           = _SHEnumKeyExW@?                      @575
+  ; SHEnumValueA           = _SHEnumValueA@?                      @576
+  ; SHEnumValueW           = _SHEnumValueW@?                      @577
+  ; SHGetInverseCMAP       = _SHGetInverseCMAP@?                  @579
+  ; SHGetThreadRef         = _SHGetThreadRef@?                    @580
+    SHGetValueA            = _SHGetValueA@24                      @581
+    SHGetValueW            = _SHGetValueW@24                      @582
+  ; SHIsLowMemoryMachine   = _SHIsLowMemoryMachine@?              @583
+  ; SHOpenRegStream2A      = _SHOpenRegStream2A@?                 @584
+  ; SHOpenRegStream2W      = _SHOpenRegStream2W@?                 @585
+  ; SHOpenRegStreamA       = _SHOpenRegStreamA@?                  @586
+  ; SHOpenRegStreamW       = _SHOpenRegStreamW@?                  @587
+  ; SHQueryInfoKeyA        = _SHQueryInfoKeyA@?                   @588
+  ; SHQueryInfoKeyW        = _SHQueryInfoKeyW@?                   @589
+  ; SHQueryValueExA        = _SHQueryValueExA@?                   @590
+  ; SHQueryValueExW        = _SHQueryValueExW@?                   @591
+  ; SHRegCloseUSKey        = _SHRegCloseUSKey@?                   @592
+  ; SHRegCreateUSKeyA      = _SHRegCreateUSKeyA@?                 @593
+  ; SHRegCreateUSKeyW      = _SHRegCreateUSKeyW@?                 @594
+  ; SHRegDeleteEmptyUSKeyA = _SHRegDeleteEmptyUSKeyA@?            @595
+  ; SHRegDeleteEmptyUSKeyW = _SHRegDeleteEmptyUSKeyW@?            @596
+  ; SHRegDeleteUSKeyA      = _SHRegDeleteUSKeyA@?                 @597
+  ; SHRegDeleteUSKeyW      = _SHRegDeleteUSKeyW@?                 @598
+  ; SHRegDuplicateHKey     = _SHRegDuplicateHKey@?                @599
+  ; SHRegEnumUSKeyA        = _SHRegEnumUSKeyA@?                   @600
+  ; SHRegEnumUSKeyW        = _SHRegEnumUSKeyW@?                   @601
+  ; SHRegEnumUSValueA      = _SHRegEnumUSValueA@?                 @602
+  ; SHRegEnumUSValueA      = _SHRegEnumUSValueW@?                 @603
+    SHRegGetBoolUSValueA   = _SHRegGetBoolUSValueA@20             @604
+    SHRegGetBoolUSValueW   = _SHRegGetBoolUSValueW@20             @605
+    SHRegGetUSValueA       = _SHRegGetUSValueA@32                 @606
+    SHRegGetUSValueW       = _SHRegGetUSValueW@32                 @607
+  ; SHRegOpenUSKeyA        = _SHRegOpenUSKeyA@?                   @608
+  ; SHRegOpenUSKeyW        = _SHRegOpenUSKeyW@?                   @609
+  ; SHRegQueryInfoKeyA     = _SHRegQueryInfoKeyA@?                @610
+  ; SHRegQueryInfoKeyW     = _SHRegQueryInfoKeyW@?                @611
+  ; SHRegQueryUSValueA     = _SHRegQueryUSValueA@?                @612
+  ; SHRegQueryUSValueW     = _SHRegQueryUSValueW@?                @613
+  ; SHRegSetUSValueA       = _SHRegSetUSValueA@?                  @614
+  ; SHRegSetUSValueW       = _SHRegSetUSValueW@?                  @615
+  ; SHRegWriteUSValueA     = _SHRegWriteUSValueA@?                @616
+  ; SHRegWriteUSValueW     = _SHRegWriteUSValueW@?                @617
+  ; SHSetThreadRef         = _SHSetThreadRef@?                    @618  ; NT4
+  ; SHSetValueA            = _SHSetValueA@?                       @619  ; NT4
+  ; SHSetValueW            = _SHSetValueW@?                       @620  ; NT4
+  ; SHSkipJunction         = _SHSkipJunction@?                    @621  ; NT4
+  ; SHStrDupA              = _SHStrDupA@?                         @622  ; NT4
+  ; SHStrDupW              = _SHStrDupW@?                         @623  ; NT4
+
+  ; StrCSpnA               = _StrCSpnA@?                          @624
+  ; StrCSpnIA              = _StrCSpnIA@?                         @625
+  ; StrCSpnIW              = _StrCSpnIW@?                         @626
+  ; StrCSpnW               = _StrCSpnW@?                          @627
+  ; StrCatBuffA            = _StrCatBuffA@?                       @628
+  ; StrCatBuffW            = _StrCatBuffW@?                       @629
+  ; StrCatA ?
+  ; StrCatW                = _StrCatW@?                           @630
+    StrChrA                = _StrChrA@8                           @631
+    StrChrIA               = _StrChrIA@8                          @632
+    StrChrIW               = _StrChrIW@8                          @633
+    StrChrW                = _StrChrW@8                           @634
+  ; StrCmpIA ?
+  ; StrCmpIW               = _StrCmpIW@?                          @635
+  ; StrCmpNA               = _StrCmpNA@12                         @636
+    StrCmpNIA              = _StrCmpNIA@12                        @637
+    StrCmpNIW              = _StrCmpNIW@12                        @638
+  ; StrCmpNW               = _StrCmpNW@12                         @639
+  ; StrCmpA ?
+  ; StrCmpW                = _StrCmpW@?                           @640
+  ; StrCpyNW               = _StrCpyNW@?                          @641
+  ; StrCpyW                = _StrCpyW@?                           @642
+  ; StrDupA                = _StrDupA@?                           @643
+  ; StrDupW                = _StrDupW@?                           @644
+  ; StrFormatByteSize64A   = _StrFormatByteSize64A@?              @645  ; NT4
+    StrFormatByteSizeA     = _StrFormatByteSizeA@12               @646
+    StrFormatByteSizeW     = _StrFormatByteSizeW@12               @647
+  ; StrFormatKBSizeA       = _StrFormatKBSizeA@?                  @648  ; NT4
+  ; StrFormatKBSizeW       = _StrFormatKBSizeW@?                  @649  ; NT4
+  ; StrFromTimeIntervalA   = _StrFromTimeIntervalA@?              @650
+  ; StrFromTimeIntervalW   = _StrFromTimeIntervalW@?              @651
+  ; StrIsIntlEqualA        = _StrIsIntlEqualA@?                   @652
+  ; StrIsIntlEqualW        = _StrIsIntlEqualW@?                   @653
+  ; StrNCatA               = _StrNCatA@?                          @654
+  ; StrNCatW               = _StrNCatW@?                          @655
+  ; StrPBrkA               = _StrPBrkA@?                          @656
+  ; StrPBrkW               = _StrPBrkW@?                          @657
+    StrRChrA               = _StrRChrA@12                         @658
+  ; StrRChrIA              = _StrRChrIA@12                        @659
+  ; StrRChrIW              = _StrRChrIW@12                        @660
+    StrRChrW               = _StrRChrW@12                         @661
+  ; StrRStrIA              = _StrRStrIA@?                         @662
+  ; StrRStrIW              = _StrRStrIW@?                         @663
+    StrRetToBufA           = _StrRetToBufA@16                     @664
+    StrRetToBufW           = _StrRetToBufW@16                     @665
+  ; StrRetToStrA           = _StrRetToStrA@16                     @666
+  ; StrRetToStrW           = _StrRetToStrW@16                     @667
+  ; StrSpnA                = _StrSpnA@?                           @668
+  ; StrSpnW                = _StrSpnW@?                           @669
+  ; StrStrA                = _StrStrA@8                           @670
+    StrStrIA               = _StrStrIA@8                          @671
+    StrStrIW               = _StrStrIW@8                          @672
+  ; StrStrW                = _StrStrW@8                           @673
+    StrToIntA              = _StrToIntA@4                         @674
+  ; StrToIntExA            = _StrToIntExA@?                       @675
+  ; StrToIntExW            = _StrToIntExW@?                       @676
+  ; StrToIntW              = _StrToIntW@4                         @677
+  ; StrTrimA               = _StrTrimA@?                          @678
+  ; StrTrimW               = _StrTrimW@?                          @679
+    UrlApplySchemeA        = _UrlApplySchemeA@16                  @680
+    UrlApplySchemeW        = _UrlApplySchemeW@16                  @681
+    UrlCanonicalizeA       = _UrlCanonicalizeA@16                 @682
+    UrlCanonicalizeW       = _UrlCanonicalizeW@16                 @683
+    UrlCombineA            = _UrlCombineA@20                      @684
+    UrlCombineW            = _UrlCombineW@20                      @685
+    UrlCompareA            = _UrlCompareA@12                      @686
+    UrlCompareW            = _UrlCompareW@12                      @687
+    UrlCreateFromPathA     = _UrlCreateFromPathA@16               @688
+    UrlCreateFromPathW     = _UrlCreateFromPathW@16               @689
+    UrlEscapeA             = _UrlEscapeA@16                       @690
+    UrlEscapeW             = _UrlEscapeW@16                       @691
+    UrlGetLocationA        = _UrlGetLocationA@4                   @692
+    UrlGetLocationW        = _UrlGetLocationW@4                   @693
+    UrlGetPartA            = _UrlGetPartA@20                      @694
+    UrlGetPartW            = _UrlGetPartW@20                      @695
+    UrlHashA               = _UrlHashA@12                         @696
+    UrlHashW               = _UrlHashW@12                         @697
+    UrlIsA                 = _UrlIsA@8                            @698
+    UrlIsNoHistoryA        = _UrlIsNoHistoryA@4                   @699
+    UrlIsNoHistoryW        = _UrlIsNoHistoryW@4                   @700
+    UrlIsOpaqueA           = _UrlIsOpaqueA@4                      @701
+    UrlIsOpaqueW           = _UrlIsOpaqueW@4                      @702
+    UrlIsW                 = _UrlIsW@8                            @703
+    UrlUnescapeA           = _UrlUnescapeA@16                     @704
+    UrlUnescapeW           = _UrlUnescapeW@16                     @705
+  ; _SHGetInstanceExplorer@4 = __SHGetInstanceExplorer@4@?        @578  ; NT4
+  ; wnsprintfA             = _wnsprintfA@?                        @706  ; NT4
+  ; wnsprintfW             = _wnsprintfW@?                        @707  ; NT4
+  ; wvnsprintfA            = _wvnsprintfA@?                       @708  ; NT4
+  ; wvnsprintfW            = _wvnsprintfW@?                       @709  ; NT4
Index: trunk/src/shlwapi/shlwapi.h
===================================================================
--- trunk/src/shlwapi/shlwapi.h	(revision 3539)
+++ trunk/src/shlwapi/shlwapi.h	(revision 3539)
@@ -0,0 +1,36 @@
+/* $Id: shlwapi.h,v 1.1 2000-05-15 02:43:17 phaller Exp $ */
+
+/*
+ * Win32 Lightweight SHELL32 for OS/2
+ *
+ * Copyright 2000 Patrick Haller
+ * Project Odin Software License can be found in LICENSE.TXT
+ *
+ */
+
+/*
+ *      internal Shell32 Library definitions
+ */
+
+#ifndef _SHLWAPI_H_
+#define _SHLWAPI_H_
+
+
+/*****************************************************************************
+ * Includes                                                                  *
+ *****************************************************************************/
+
+
+#ifdef __cplusplus
+  extern "C" {
+#endif /* defined(__cplusplus) */
+
+    
+
+#ifdef __cplusplus
+  }
+#endif /* defined(__cplusplus) */
+
+
+
+#endif
Index: trunk/src/shlwapi/string.cpp
===================================================================
--- trunk/src/shlwapi/string.cpp	(revision 3539)
+++ trunk/src/shlwapi/string.cpp	(revision 3539)
@@ -0,0 +1,557 @@
+/* $Id: string.cpp,v 1.1 2000-05-15 02:43:17 phaller Exp $ */
+
+/*
+ * Win32 Lightweight SHELL32 for OS/2
+ *
+ * Copyright 1997 Marcus Meissner
+ * Copyright 1999 Patrick Haller (haller@zebra.fh-weingarten.de)
+ * Project Odin Software License can be found in LICENSE.TXT
+ *
+ * Path Functions
+ *
+ * Many of this functions are in SHLWAPI.DLL also
+ *
+ * Corel WINE 20000324 level (without CRTDLL_* calls)
+ */
+
+/*****************************************************************************
+ * Remark                                                                    *
+ *****************************************************************************
+
+ */
+
+
+/*****************************************************************************
+ * Includes                                                                  *
+ *****************************************************************************/
+
+#include <odin.h>
+#include <odinwrap.h>
+#include <os2sel.h>
+
+#include <string.h>
+#include <ctype.h>
+#include <wctype.h>
+#include <wcstr.h>
+#define HAVE_WCTYPE_H
+
+#include "debugtools.h"
+
+#include <winreg.h>
+
+#include <heapstring.h>
+#include <misc.h>
+#include <win\shell.h>
+#include <win\winerror.h>
+#include <winversion.h>
+#include <winuser.h>
+
+
+#define ICOM_CINTERFACE 1
+#define CINTERFACE 1
+
+#include "winerror.h"
+#include "winnls.h"
+#include "winversion.h"
+#include "heap.h"
+
+#include "shellapi.h"
+#include "shlobj.h"
+#include "wine/undocshell.h"
+
+#include "shlwapi.h"
+
+/*****************************************************************************
+ * Local Variables                                                           *
+ *****************************************************************************/
+
+ODINDEBUGCHANNEL(SHLWAPI-STRING)
+
+
+
+/*************************************************************************
+ * OleStrToStrN                                 [SHELL32.78]
+ */
+BOOL WINAPI OleStrToStrNA (LPSTR lpStr, INT nStr, LPCWSTR lpOle, INT nOle)
+{
+        TRACE("%p %x %s %x\n", lpStr, nStr, debugstr_w(lpOle), nOle);
+        return WideCharToMultiByte (0, 0, lpOle, nOle, lpStr, nStr, NULL, NULL);
+}
+
+BOOL WINAPI OleStrToStrNW (LPWSTR lpwStr, INT nwStr, LPCWSTR lpOle, INT nOle)
+{
+        TRACE("%p %x %s %x\n", lpwStr, nwStr, debugstr_w(lpOle), nOle);
+
+        if (lstrcpynW ( lpwStr, lpOle, nwStr))
+        { return lstrlenW (lpwStr);
+        }
+        return 0;
+}
+
+BOOL WINAPI OleStrToStrNAW (LPVOID lpOut, INT nOut, LPCVOID lpIn, INT nIn)
+{
+        if (VERSION_OsIsUnicode())
+          return OleStrToStrNW ((LPWSTR)lpOut, nOut, (LPCWSTR)lpIn, nIn);
+        return OleStrToStrNA ((LPSTR)lpOut, nOut, (LPCWSTR)lpIn, nIn);
+}
+
+/*************************************************************************
+ * StrToOleStrN                                 [SHELL32.79]
+ *  lpMulti, nMulti, nWide [IN]
+ *  lpWide [OUT]
+ */
+BOOL WINAPI StrToOleStrNA (LPWSTR lpWide, INT nWide, LPCSTR lpStrA, INT nStr)
+{
+        TRACE("%p %x %s %x\n", lpWide, nWide, lpStrA, nStr);
+        return MultiByteToWideChar (0, 0, lpStrA, nStr, lpWide, nWide);
+}
+BOOL WINAPI StrToOleStrNW (LPWSTR lpWide, INT nWide, LPCWSTR lpStrW, INT nStr)
+{
+        TRACE("%p %x %s %x\n", lpWide, nWide, debugstr_w(lpStrW), nStr);
+
+        if (lstrcpynW (lpWide, lpStrW, nWide))
+        { return lstrlenW (lpWide);
+        }
+        return 0;
+}
+
+BOOL WINAPI StrToOleStrNAW (LPWSTR lpWide, INT nWide, LPCVOID lpStr, INT nStr)
+{
+        if (VERSION_OsIsUnicode())
+          return StrToOleStrNW (lpWide, nWide, (LPWSTR)lpStr, nStr);
+        return StrToOleStrNA (lpWide, nWide, (LPSTR)lpStr, nStr);
+}
+
+
+/*************************************************************************
+ * StrRetToStrN                                 [SHELL32.96]
+ *
+ * converts a STRRET to a normal string
+ *
+ * NOTES
+ *  the pidl is for STRRET OFFSET
+ */
+HRESULT WINAPI StrRetToBufA (LPSTRRET src, LPITEMIDLIST pidl, LPSTR dest, DWORD len)
+{
+        return StrRetToStrNA(dest, len, src, pidl);
+}
+
+HRESULT WINAPI StrRetToStrNA (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl)
+{
+        TRACE("dest=0x%p len=0x%lx strret=0x%p pidl=%p stub\n",dest,len,src,pidl);
+
+        switch (src->uType)
+        {
+          case STRRET_WSTR:
+            WideCharToMultiByte(CP_ACP, 0, src->u.pOleStr, -1, (LPSTR)dest, len, NULL, NULL);
+            SHFree(src->u.pOleStr);
+            break;
+
+          case STRRET_CSTRA:
+            lstrcpynA((LPSTR)dest, src->u.cStr, len);
+            break;
+
+          case STRRET_OFFSETA:
+            lstrcpynA((LPSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len);
+            break;
+
+          default:
+            FIXME("unknown type!\n");
+            if (len)
+            {
+              *(LPSTR)dest = '\0';
+            }
+            return(FALSE);
+        }
+        return S_OK;
+}
+
+HRESULT WINAPI StrRetToBufW (LPSTRRET src, LPITEMIDLIST pidl, LPWSTR dest, DWORD len)
+{
+        return StrRetToStrNW(dest, len, src, pidl);
+}
+
+HRESULT WINAPI StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl)
+{
+        TRACE("dest=0x%p len=0x%lx strret=0x%p pidl=%p stub\n",dest,len,src,pidl);
+
+        switch (src->uType)
+        {
+          case STRRET_WSTR:
+            lstrcpynW((LPWSTR)dest, src->u.pOleStr, len);
+            SHFree(src->u.pOleStr);
+            break;
+
+          case STRRET_CSTRA:
+            lstrcpynAtoW((LPWSTR)dest, src->u.cStr, len);
+            break;
+
+          case STRRET_OFFSETA:
+            if (pidl)
+            {
+              lstrcpynAtoW((LPWSTR)dest, ((LPSTR)&pidl->mkid)+src->u.uOffset, len);
+            }
+            break;
+
+          default:
+            FIXME("unknown type!\n");
+            if (len)
+            { *(LPSTR)dest = '\0';
+            }
+            return(FALSE);
+        }
+        return S_OK;
+}
+HRESULT WINAPI StrRetToStrNAW (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl)
+{
+        if(VERSION_OsIsUnicode())
+          return StrRetToStrNW (dest, len, src, pidl);
+        return StrRetToStrNA (dest, len, src, pidl);
+}
+
+/*************************************************************************
+ * StrChrA                                      [NT 4.0:SHELL32.651]
+ *
+ */
+LPSTR WINAPI StrChrA (LPSTR str, CHAR x )
+{       LPSTR ptr=str;
+
+        do
+        {  if (*ptr==x)
+           { return ptr;
+           }
+           ptr++;
+        } while (*ptr);
+        return NULL;
+}
+
+/*************************************************************************
+ * StrChrW                                      [NT 4.0:SHELL32.651]
+ *
+ */
+LPWSTR WINAPI StrChrW (LPWSTR str, WCHAR x )
+{       LPWSTR ptr=str;
+
+        TRACE("%s 0x%04x\n",debugstr_w(str),x);
+        do
+        {  if (*ptr==x)
+           { return ptr;
+           }
+           ptr++;
+        } while (*ptr);
+        return NULL;
+}
+
+/*************************************************************************
+ * StrCmpNIW                                    [NT 4.0:SHELL32.*]
+ *
+ */
+INT WINAPI StrCmpNIW ( LPWSTR wstr1, LPWSTR wstr2, INT len)
+{       FIXME("%s %s %i stub\n", debugstr_w(wstr1),debugstr_w(wstr2),len);
+        return 0;
+}
+
+/*************************************************************************
+ * StrCmpNIA                                    [NT 4.0:SHELL32.*]
+ *
+ */
+INT WINAPI StrCmpNIA ( LPSTR wstr1, LPSTR wstr2, INT len)
+{       FIXME("%s %s %i stub\n", wstr1,wstr2,len);
+        return 0;
+}
+
+
+/*************************************************************************
+ * StrRChrA                                     [SHELL32.346]
+ *
+ */
+LPSTR WINAPI StrRChrA(LPCSTR lpStart, LPCSTR lpEnd, DWORD wMatch)
+{
+        if (!lpStart)
+            return NULL;
+
+        /* if the end not given, search*/
+        if (!lpEnd)
+        { lpEnd=lpStart;
+          while (*lpEnd)
+            lpEnd++;
+        }
+
+        for (--lpEnd;lpStart <= lpEnd; lpEnd--)
+            if (*lpEnd==(char)wMatch)
+                return (LPSTR)lpEnd;
+
+        return NULL;
+}
+/*************************************************************************
+ * StrRChrW                                     [SHELL32.320]
+ *
+ */
+LPWSTR WINAPI StrRChrW(LPWSTR lpStart, LPWSTR lpEnd, DWORD wMatch)
+{       LPWSTR wptr=NULL;
+        TRACE("%s %s 0x%04x\n",debugstr_w(lpStart),debugstr_w(lpEnd), (WCHAR)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;
+}
+
+/*************************************************************************
+* StrFormatByteSize                             [SHLWAPI]
+*/
+LPSTR WINAPI StrFormatByteSizeA ( DWORD dw, LPSTR pszBuf, UINT cchBuf )
+{       char buf[64];
+        TRACE("%lx %p %i\n", dw, pszBuf, cchBuf);
+        if ( dw<1024L )
+        { sprintf (buf,"%3.0f bytes", (FLOAT)dw);
+        }
+        else if ( dw<1048576L)
+        { sprintf (buf,"%3.2f KB", (FLOAT)dw/1024);
+        }
+        else if ( dw < 1073741824L)
+        { sprintf (buf,"%3.2f MB", (FLOAT)dw/1048576L);
+        }
+        else
+        { sprintf (buf,"%3.2f GB", (FLOAT)dw/1073741824L);
+        }
+        lstrcpynA (pszBuf, buf, cchBuf);
+        return pszBuf;
+}
+LPWSTR WINAPI StrFormatByteSizeW ( DWORD dw, LPWSTR pszBuf, UINT cchBuf )
+{       char buf[64];
+        TRACE("%lx %p %i\n", dw, pszBuf, cchBuf);
+        if ( dw<1024L )
+        { sprintf (buf,"%3.0f bytes", (FLOAT)dw);
+        }
+        else if ( dw<1048576L)
+        { sprintf (buf,"%3.2f KB", (FLOAT)dw/1024);
+        }
+        else if ( dw < 1073741824L)
+        { sprintf (buf,"%3.2f MB", (FLOAT)dw/1048576L);
+        }
+        else
+        { sprintf (buf,"%3.2f GB", (FLOAT)dw/1073741824L);
+        }
+        lstrcpynAtoW (pszBuf, buf, cchBuf);
+        return pszBuf;
+}
+
+
+/************************************************************************
+ *      StrToOleStr                     [SHELL32.163]
+ *
+ */
+int WINAPI StrToOleStrA (LPWSTR lpWideCharStr, LPCSTR lpMultiByteString)
+{
+        TRACE("%p %p(%s)\n",
+        lpWideCharStr, lpMultiByteString, lpMultiByteString);
+
+        return MultiByteToWideChar(0, 0, lpMultiByteString, -1, lpWideCharStr, MAX_PATH);
+
+}
+int WINAPI StrToOleStrW (LPWSTR lpWideCharStr, LPCWSTR lpWString)
+{
+        TRACE("%p %p(%s)\n",
+        lpWideCharStr, lpWString, debugstr_w(lpWString));
+
+        if (lstrcpyW (lpWideCharStr, lpWString ))
+        { return lstrlenW (lpWideCharStr);
+        }
+        return 0;
+}
+
+BOOL WINAPI StrToOleStrAW (LPWSTR lpWideCharStr, LPCVOID lpString)
+{
+        if (VERSION_OsIsUnicode())
+          return StrToOleStrW (lpWideCharStr, (LPCWSTR)lpString);
+        return StrToOleStrA (lpWideCharStr, (LPCSTR)lpString);
+}
+
+
+
+/*****************************************************************************
+ * Name      : StrChrIA
+ * Purpose   : Searches a string for the first occurrence of a character that
+ *             matches the specified character. The comparison is not case sensitive.
+ * Parameters: LPCSTR lpStart Address of the string to be searched.
+ *             TCHAR  wMatch  Character to be used for comparison.
+ * Variables :
+ * Result    : Returns the address of the first occurrence of the character in
+ *             the string if successful, or NULL otherwise.
+ * Remark    : SHELL32.
+ * Status    : UNTESTED UNKNOWN
+ *
+ * Author    : Patrick Haller [Wed, 1999/12/29 09:00]
+ *****************************************************************************/
+
+ODINFUNCTION2(LPSTR,  StrChrIA,
+              LPCSTR, lpStart,
+              CHAR,   wMatch)
+{
+  LPSTR lpRes;
+
+  wMatch = tolower(wMatch);
+  lpRes = strchr(lpStart, wMatch);    // lower case comparsion
+  if (NULL == lpRes)
+  {
+    wMatch = toupper(wMatch);
+    lpRes = strchr(lpStart, wMatch);  // upper case comparsion
+  }
+
+  return lpRes;
+}
+
+
+/*****************************************************************************
+ * Name      : StrChrIW
+ * Purpose   : Searches a string for the first occurrence of a character that
+ *             matches the specified character. The comparison is not case sensitive.
+ * Parameters: LPCSTR lpStart Address of the string to be searched.
+ *             TCHAR  wMatch  Character to be used for comparison.
+ * Variables :
+ * Result    : Returns the address of the first occurrence of the character in
+ *             the string if successful, or NULL otherwise.
+ * Remark    : SHELL32.
+ * Status    : UNTESTED UNKNOWN
+ *
+ * Author    : Patrick Haller [Wed, 1999/12/29 09:00]
+ *****************************************************************************/
+
+ODINFUNCTION2(LPWSTR,   StrChrIW,
+              LPCWSTR, lpStart,
+              WCHAR,    wMatch)
+{
+  LPWSTR lpRes;
+
+  wMatch = towlower(wMatch);
+  lpRes = (WCHAR*)wcschr((const wchar_t*)lpStart, wMatch);    // lower case comparsion
+  if (NULL == lpRes)
+  {
+    wMatch = towupper(wMatch);
+    lpRes = (WCHAR*)wcschr((const wchar_t*)lpStart, wMatch);  // upper case comparsion
+  }
+
+  return lpRes;
+}
+
+
+/*****************************************************************************
+ * Name      : StrStrIA
+ * Purpose   : Finds the first occurrence of a substring within a string. The
+ *             comparison is not case sensitive.
+ * Parameters: LPCSTR lpFirst
+ *             LPCSTR lpSrch
+ * Variables :
+ * Result    : Returns the address of the first occurrence of the matching
+ *             substring if successful, or NULL otherwise.
+ * Remark    : SHELL32.
+ * Status    : UNTESTED UNKNOWN
+ *
+ * Author    : Patrick Haller [Wed, 1999/12/29 09:00]
+ *****************************************************************************/
+
+ODINFUNCTION2(LPSTR,  StrStrIA,
+              LPCSTR, lpFirst,
+              LPCSTR, lpSrch)
+{
+  char  ch = lpSrch[0];          // look for 1st character
+  LONG  lLen = lstrlenA(lpSrch); // length of search string
+  int   iRes;                    // comparsion result
+
+  do
+  {
+    lpFirst = StrChrIA(lpFirst, // find first matching character
+                       ch);
+    if (NULL == lpFirst)        // not found
+      return NULL;
+
+    iRes   = StrCmpNIA((LPSTR)lpFirst, // compare search string
+                       (LPSTR)lpSrch,
+                       lLen);
+
+    if (0 == iRes)              // Found!
+      return (LPSTR)lpFirst;
+
+    lpFirst = CharNextA(lpFirst); // skip to next character
+  }
+  while (*lpFirst != 0);        // safe termination
+
+  return NULL;                  // default result
+}
+
+
+
+/*****************************************************************************
+ * Name      : StrStrIW
+ * Purpose   : Finds the first occurrence of a substring within a string. The
+ *             comparison is not case sensitive.
+ * Parameters: LPCWSTR lpFirst
+ *             LPCWSTR lpSrch
+ * Variables :
+ * Result    : Returns the address of the first occurrence of the matching
+ *             substring if successful, or NULL otherwise.
+ * Remark    : SHELL32.
+ * Status    : UNTESTED UNKNOWN
+ *
+ * Author    : Patrick Haller [Wed, 1999/12/29 09:00]
+ *****************************************************************************/
+
+ODINFUNCTION2(LPWSTR,  StrStrIW,
+              LPCWSTR, lpFirst,
+              LPCWSTR, lpSrch)
+{
+  WCHAR  ch = lpSrch[0];          // look for 1st character
+  LONG   lLen = lstrlenW(lpSrch); // length of search string
+  int   iRes;                    // comparsion result
+
+  do
+  {
+    lpFirst = StrChrIW(lpFirst, // find first matching character
+                       ch);
+    if (NULL == lpFirst)        // not found
+      return NULL;
+
+    iRes   = StrCmpNIW((LPWSTR)lpFirst, // compare search string
+                       (LPWSTR)lpSrch,
+                       lLen);
+
+    if (0 == iRes)              // Found!
+      return (LPWSTR)lpFirst;
+
+    lpFirst = CharNextW(lpFirst); // skip to next character
+  }
+  while (*lpFirst != 0);        // safe termination
+
+  return NULL;                  // default result
+}
+
+
+
+/*****************************************************************************
+ * Name      : StrToIntA
+ * Purpose   : convert string to integer (used by explorer.exe)
+ * Parameters: Unknown (wrong)
+ * Variables :
+ * Result    : Unknown
+ * Remark    :
+ * Status    : UNTESTED STUB
+ *
+ * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
+ *****************************************************************************/
+
+ODINFUNCTION1(INT,StrToIntA,LPSTR,pszPath)
+{
+  dprintf(("not implemented"));
+
+  return NULL;
+}
Index: trunk/src/shlwapi/url.cpp
===================================================================
--- trunk/src/shlwapi/url.cpp	(revision 3528)
+++ trunk/src/shlwapi/url.cpp	(revision 3539)
@@ -1,3 +1,3 @@
-/* $Id: url.cpp,v 1.1 2000-04-25 01:59:36 phaller Exp $ */
+/* $Id: url.cpp,v 1.2 2000-05-15 02:42:35 phaller Exp $ */
 
 /*
@@ -38,5 +38,5 @@
 #include <win\winerror.h>
 
-
+#include "shlwapi.h"
 
 ODINDEBUGCHANNEL(SHLWAPI-URL)
