Changeset 4081 for trunk/src


Ignore:
Timestamp:
Aug 24, 2000, 11:33:33 AM (25 years ago)
Author:
sandervl
Message:

resync with Wine 20000801

Location:
trunk/src/shlwapi
Files:
6 added
3 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shlwapi/makefile

    r3864 r4081  
    1 # $Id: makefile,v 1.17 2000-07-19 19:05:22 sandervl Exp $
     1# $Id: makefile,v 1.18 2000-08-24 09:32:42 sandervl Exp $
    22
    33#
     
    2727$(OBJDIR)\shlstub.obj \
    2828$(OBJDIR)\url.obj \
     29$(OBJDIR)\reg_odin.obj \
    2930$(OBJDIR)\reg.obj \
     31$(OBJDIR)\regstream.obj \
    3032$(OBJDIR)\pathcpp.obj \
    3133$(OBJDIR)\path.obj \
     34$(OBJDIR)\string_odin.obj \
    3235$(OBJDIR)\string.obj \
    3336$(OBJDIR)\shlwapirsrc.obj \
  • trunk/src/shlwapi/ordinal.cpp

    r3942 r4081  
    1 /* $Id: ordinal.cpp,v 1.4 2000-08-02 20:18:23 bird Exp $ */
     1/* $Id: ordinal.cpp,v 1.5 2000-08-24 09:32:42 sandervl Exp $ */
    22
    33/*
     
    5858
    5959#include "shlwapi.h"
     60#include "shlwapi_odin.h"
    6061
    6162
     
    16341635  return flagIsLowMemoryMachine;
    16351636}
     1637
     1638/*************************************************************************
     1639 *      SHCreateShellPalette    [SHLWAPI.@]
     1640 */
     1641HPALETTE WINAPI SHCreateShellPalette(HDC hdc)
     1642{
     1643        FIXME("stub\n");
     1644        return CreateHalftonePalette(hdc);
     1645}
  • trunk/src/shlwapi/path.c

    r4064 r4081  
    1 /* $Id: path.c,v 1.8 2000-08-21 18:33:53 sandervl Exp $ */
    2 
    31/*
    42 * Path Functions
    53 *
    6  * Project Odin Software License can be found in LICENSE.TXT
    7  *
    8  *
    9  * NOTE: SHGetSpecialFolderPathA: StartMenu changed in 'Start Menu'
    10  *
    11  *
    12  * Copyright 1997 Marcus Meissner
    13  *
    14  * WINE 20000430 level
    15  */
    16 
    17 /*****************************************************************************
    18  * Remark                                                                    *
    19  *****************************************************************************
    20 
    21  */
    22 
    23 
    24 /*****************************************************************************
    25  * Includes                                                                  *
    26  *****************************************************************************/
    27 
     4 * Note: Odin changes marked by #ifdef __WIN32OS2__
     5 */
     6
     7#ifdef __WIN32OS2__
    288#include <odin.h>
    299#include <odinwrap.h>
     
    3111
    3212#include <string.h>
    33 #include <ctype.h>
    3413#include <wctype.h>
    3514#include <wcstr.h>
    3615#define HAVE_WCTYPE_H
    37 
     16#include <win\shlwapi.h>
     17
     18#include <heapstring.h>
     19#endif
     20
     21#include <ctype.h>
     22#include <string.h>
     23
     24#include "winerror.h"
     25#include "wine/unicode.h"
     26#include "wine/undocshell.h"
     27#include "shlwapi.h"
    3828#include "debugtools.h"
    3929
    40 #include <winreg.h>
    41 
    42 #include <heapstring.h>
    43 #include <misc.h>
    44 #include <win\shell.h>
    45 #include <win\winerror.h>
    46 #include <win\crtdll.h>
    47 #include <win\winversion.h>
    48 #include <winuser.h>
    49 
    50 #include <win\shlwapi.h>
    51 #include <win\shlobj.h>
    52 #include <win\wine\undocshell.h>
    53 
    54 #define strncasecmp     lstrncmpA
    55 #define strcasecmp      lstrcmpA
    56 
    57 
    58 ODINDEBUGCHANNEL(SHLWAPI-PATH)
    59 
     30DEFAULT_DEBUG_CHANNEL(shell);
     31
     32#define isSlash(x) ((x)=='\\' || (x)=='/')
     33/*
     34        ########## Combining and Constructing paths ##########
     35*/
    6036
    6137/*************************************************************************
     
    6844 *  the resulting path is also canonicalized
    6945 */
    70 LPSTR WINAPI PathAppendA(
     46BOOL WINAPI PathAppendA(
    7147        LPSTR lpszPath1,
    7248        LPCSTR lpszPath2)
     
    7450        TRACE("%s %s\n",lpszPath1, lpszPath2);
    7551        while (lpszPath2[0]=='\\') lpszPath2++;
    76         return PathCombineA(lpszPath1,lpszPath1,lpszPath2);
     52        PathCombineA(lpszPath1,lpszPath1,lpszPath2);
     53        return TRUE;
    7754}
    7855
     
    8057 * PathAppendW          [SHLWAPI.@]
    8158 */
    82 LPSTR WINAPI PathAppendW(
     59BOOL WINAPI PathAppendW(
    8360        LPWSTR lpszPath1,
    8461        LPCWSTR lpszPath2)
    8562{
    86         FIXME("%s %s\n",debugstr_w(lpszPath1), debugstr_w(lpszPath2));
    87         return NULL;
    88 }
    89 
    90 /*************************************************************************
    91  * PathAppendAW         [SHELL32.36]
    92  */
    93 LPVOID WINAPI PathAppendAW(
    94         LPVOID lpszPath1,
    95         LPCVOID lpszPath2)
    96 {
    97         if (VERSION_OsIsUnicode())
    98           return PathAppendW(lpszPath1, lpszPath2);
    99         return PathAppendA(lpszPath1, lpszPath2);
     63        TRACE("%s %s\n",debugstr_w(lpszPath1), debugstr_w(lpszPath2));
     64        while (lpszPath2[0]=='\\') lpszPath2++;
     65        PathCombineW(lpszPath1,lpszPath1,lpszPath2);
     66        return TRUE;
    10067}
    10168
     
    10976 * FIXME
    11077 *  the resulting path is also canonicalized
    111  *  If lpszSrcPath2 starts with a backslash it is appended
    112  *  to the root of lpszSrcPath1.
    11378 */
    11479LPSTR WINAPI PathCombineA(
     
    12893
    12994        /*  if lpszFile is a complete path don't care about lpszDir */
    130         if (PathIsRootA(lpszFile))
     95        if (PathGetDriveNumberA(lpszFile) != -1)
    13196        {
    13297          strcpy(szDest,lpszFile);
     98        }
     99        else if (lpszFile[0] == '\\' )
     100        {
     101          strcpy(sTemp,lpszDir);
     102          PathStripToRootA(sTemp);
     103          strcat(sTemp,lpszFile);
     104          strcpy(szDest,sTemp);
    133105        }
    134106        else
     
    157129        if (!lpszFile || !lpszFile[0] || (lpszFile[0]==(WCHAR)'.' && !lpszFile[1]) )
    158130        {
    159           CRTDLL_wcscpy(szDest,lpszDir);
     131          strcpyW(szDest,lpszDir);
    160132          return szDest;
    161133        }
    162134
    163135        /*  if lpszFile is a complete path don't care about lpszDir */
    164         if (PathIsRootW(lpszFile))
    165         {
    166           CRTDLL_wcscpy(szDest,lpszFile);
     136        if (PathGetDriveNumberW(lpszFile) != -1)
     137        {
     138            strcpyW(szDest,lpszFile);
     139        }
     140        else if (lpszFile[0] == (WCHAR)'\\' )
     141        {
     142          strcpyW(sTemp,lpszDir);
     143          PathStripToRootW(sTemp);
     144          strcatW(sTemp,lpszFile);
     145          strcpyW(szDest,sTemp);
    167146        }
    168147        else
    169148        {
    170           CRTDLL_wcscpy(sTemp,lpszDir);
     149          strcpyW(sTemp,lpszDir);
    171150          PathAddBackslashW(sTemp);
    172           CRTDLL_wcscat(sTemp,lpszFile);
    173           CRTDLL_wcscpy(szDest,sTemp);
     151          strcatW(sTemp,lpszFile);
     152          strcpyW(szDest,sTemp);
    174153        }
    175154        return szDest;
    176 }
    177 
    178 /*************************************************************************
    179  * PathCombineAW         [SHELL32.37]
    180  */
    181 LPVOID WINAPI PathCombineAW(
    182         LPVOID szDest,
    183         LPCVOID lpszDir,
    184         LPCVOID lpszFile)
    185 {
    186         if (VERSION_OsIsUnicode())
    187           return PathCombineW( szDest, lpszDir, lpszFile );
    188         return PathCombineA( szDest, lpszDir, lpszFile );
    189155}
    190156
     
    218184        TRACE("%p->%s\n",lpszPath,debugstr_w(lpszPath));
    219185
    220         len = CRTDLL_wcslen(lpszPath);
     186        len = strlenW(lpszPath);
    221187        if (len && lpszPath[len-1]!=(WCHAR)'\\')
    222188        {
     
    229195
    230196/*************************************************************************
    231  * PathAddBackslashAW           [SHELL32.32]
    232  */
    233 LPVOID WINAPI PathAddBackslashAW(LPVOID lpszPath)
    234 {
    235         if(VERSION_OsIsUnicode())
    236           return PathAddBackslashW(lpszPath);
    237         return PathAddBackslashA(lpszPath);
    238 }
    239 
    240 /*************************************************************************
    241197 * PathBuildRootA               [SHLWAPI.@]
    242198 */
     
    262218}
    263219
    264 /*************************************************************************
    265  * PathBuildRootAW              [SHELL32.30]
    266  */
    267 LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive)
    268 {
    269         if(VERSION_OsIsUnicode())
    270           return PathBuildRootW(lpszPath, drive);
    271         return PathBuildRootA(lpszPath, drive);
    272 }
    273 
    274220/*
    275221        Extracting Component Parts
     
    281227LPSTR WINAPI PathFindFileNameA(LPCSTR lpszPath)
    282228{
    283         LPCSTR aslash;
    284         aslash = lpszPath;
    285 
    286         TRACE("%s\n",aslash);
    287         while (lpszPath[0])
    288         {
    289           if (((lpszPath[0]=='\\') || (lpszPath[0]==':')) && lpszPath[1] && lpszPath[1]!='\\')
    290               aslash = lpszPath+1;
    291           lpszPath++;
    292         }
    293         return (LPSTR)aslash;
     229        LPCSTR lastSlash = lpszPath;
     230
     231        TRACE("%s\n",lpszPath);
     232        while (*lpszPath)
     233        {
     234          if ( isSlash(lpszPath[0]) && lpszPath[1])
     235              lastSlash = lpszPath+1;
     236          lpszPath = CharNextA(lpszPath);
     237        }
     238        return (LPSTR)lastSlash;
    294239
    295240}
     
    308253          if (((lpszPath[0]=='\\') || (lpszPath[0]==':')) && lpszPath[1] && lpszPath[1]!='\\')
    309254            wslash = lpszPath+1;
    310           lpszPath++;
     255          lpszPath = CharNextW(lpszPath);
    311256        }
    312257        return (LPWSTR)wslash; 
    313 }
    314 
    315 /*************************************************************************
    316  * PathFindFileNameAW   [SHELL32.34]
    317  */
    318 LPVOID WINAPI PathFindFileNameAW(LPCVOID lpszPath)
    319 {
    320         if(VERSION_OsIsUnicode())
    321           return PathFindFileNameW(lpszPath);
    322         return PathFindFileNameA(lpszPath);
    323258}
    324259
     
    342277          if (*lpszPath=='.')
    343278            lastpoint=lpszPath;
    344           lpszPath++;
     279          lpszPath = CharNextA(lpszPath);
    345280        }
    346281        return (LPSTR)(lastpoint?lastpoint:lpszPath);
     
    362297          if (*lpszPath==(WCHAR)'.')
    363298            lastpoint=lpszPath;
    364           lpszPath++;
     299          lpszPath = CharNextW(lpszPath);
    365300        }
    366301        return (LPWSTR)(lastpoint?lastpoint:lpszPath);
    367 }
    368 
    369 /*************************************************************************
    370  * PathFindExtensionAW          [SHELL32.31]
    371  */
    372 LPVOID WINAPI PathFindExtensionAW(LPCVOID lpszPath)
    373 {
    374         if (VERSION_OsIsUnicode())
    375           return PathFindExtensionW(lpszPath);
    376         return PathFindExtensionA(lpszPath);
    377 
    378 }
    379 
    380 /*************************************************************************
    381  * PathGetExtensionA            [internal]
    382  *
    383  * NOTES
    384  *  exported by ordinal
    385  *  return value points to the first char after the dot
    386  */
    387 LPSTR WINAPI PathGetExtensionA(LPCSTR lpszPath)
    388 {
    389         TRACE("(%s)\n",lpszPath);
    390 
    391         lpszPath = PathFindExtensionA(lpszPath);
    392         return (LPSTR)(*lpszPath?(lpszPath+1):lpszPath);
    393 }
    394 
    395 /*************************************************************************
    396  * PathGetExtensionW            [internal]
    397  */
    398 LPWSTR WINAPI PathGetExtensionW(LPCWSTR lpszPath)
    399 {
    400         TRACE("(%s)\n",debugstr_w(lpszPath));
    401 
    402         lpszPath = PathFindExtensionW(lpszPath);
    403         return (LPWSTR)(*lpszPath?(lpszPath+1):lpszPath);
    404 }
    405 
    406 /*************************************************************************
    407  * PathGetExtensionAW           [SHELL32.158]
    408  */
    409 LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath)
    410 {
    411         if (VERSION_OsIsUnicode())
    412           return PathGetExtensionW(lpszPath);
    413         return PathGetExtensionA(lpszPath);
    414302}
    415303
     
    436324          if (*lpszPath=='"')
    437325            qflag=!qflag;
    438           lpszPath++;
     326          lpszPath = CharNextA(lpszPath);
    439327        }
    440328        return (LPSTR)lpszPath;
    441 
    442329}
    443330
     
    457344          if (*lpszPath=='"')
    458345            qflag=!qflag;
    459           lpszPath++;
     346          lpszPath = CharNextW(lpszPath);
    460347        }
    461348        return (LPWSTR)lpszPath;
    462 }
    463 
    464 /*************************************************************************
    465  * PathGetArgsAW        [SHELL32.52]
    466  */
    467 LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath)
    468 {
    469         if (VERSION_OsIsUnicode())
    470           return PathGetArgsW(lpszPath);
    471         return PathGetArgsA(lpszPath);
    472349}
    473350
     
    490367int WINAPI PathGetDriveNumberW(LPCWSTR lpszPath)
    491368{
    492         int chr = towlower(lpszPath[0]);
     369        int chr = tolowerW(lpszPath[0]);
    493370       
    494371        TRACE ("%s\n",debugstr_w(lpszPath));
    495372
    496373        if (!lpszPath || lpszPath[1]!=':' || chr < 'a' || chr > 'z') return -1;
    497         return tolower(lpszPath[0]) - 'a' ;
    498 }
    499 
    500 /*************************************************************************
    501  * PathGetDriveNumber   [SHELL32.57]
    502  */
    503 int WINAPI PathGetDriveNumberAW(LPVOID lpszPath)
    504 {
    505         if (VERSION_OsIsUnicode())
    506           return PathGetDriveNumberW(lpszPath);
    507         return PathGetDriveNumberA(lpszPath);
     374        return tolowerW(lpszPath[0]) - 'a' ;
    508375}
    509376
     
    520387BOOL WINAPI PathRemoveFileSpecA(LPSTR lpszPath)
    521388{
    522         LPSTR cutplace;
    523 
     389        LPSTR cutplace = lpszPath;
     390        BOOL ret = FALSE;
     391       
    524392        TRACE("%s\n",lpszPath);
    525393
    526         if (!lpszPath[0]) return 0;
    527 
    528         cutplace = PathFindFileNameA(lpszPath);
    529         if (cutplace)
    530         {
    531           *cutplace='\0';
    532           if (PathIsRootA(lpszPath))
    533           {
    534             PathAddBackslashA(lpszPath);
    535           }
    536           else
    537           {
    538             PathRemoveBackslashA(lpszPath);
    539           }
    540           return TRUE;
    541         }
    542         return FALSE;
     394        if(lpszPath)
     395        {
     396          while (*lpszPath == '\\') cutplace = ++lpszPath;
     397         
     398          while (*lpszPath)
     399          {
     400            if(lpszPath[0] == '\\') cutplace = lpszPath;
     401         
     402            if(lpszPath[0] == ':')
     403            {
     404              cutplace = lpszPath + 1;
     405              if (lpszPath[1] == '\\') cutplace++;
     406              lpszPath++;
     407            }
     408            lpszPath = CharNextA(lpszPath);
     409            if (!lpszPath) break;
     410          }
     411         
     412          ret = (*cutplace!='\0');
     413          *cutplace = '\0';
     414        }
     415        return ret;
    543416}
    544417
     
    548421BOOL WINAPI PathRemoveFileSpecW(LPWSTR lpszPath)
    549422{
    550         LPWSTR cutplace;
     423        LPWSTR cutplace = lpszPath;
     424        BOOL ret = FALSE;
    551425
    552426        TRACE("%s\n",debugstr_w(lpszPath));
    553427
    554         if (!lpszPath[0]) return 0;
    555         cutplace = PathFindFileNameW(lpszPath);
    556         if (cutplace)
    557         {
    558           *cutplace='\0';
    559           if (PathIsRootW(lpszPath))
    560           {
    561             PathAddBackslashW(lpszPath);
    562           }
    563           else
    564           {
    565             PathRemoveBackslashW(lpszPath);
    566           }
    567           return TRUE;
    568         }
    569         return FALSE;
    570 }
    571 
    572 /*************************************************************************
    573  * PathRemoveFileSpec [SHELL32.35]
    574  */
    575 BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath)
    576 {
    577         if (VERSION_OsIsUnicode())
    578           return PathRemoveFileSpecW(lpszPath);
    579         return PathRemoveFileSpecA(lpszPath);
     428        if(lpszPath)
     429        {
     430          while (*lpszPath == '\\') cutplace = ++lpszPath;
     431         
     432          while (*lpszPath)
     433          {
     434            if(lpszPath[0] == '\\') cutplace = lpszPath;
     435         
     436            if(lpszPath[0] == ':')
     437            {
     438              cutplace = lpszPath + 1;
     439              if (lpszPath[1] == '\\') cutplace++;
     440              lpszPath++;
     441            }
     442            lpszPath = CharNextW(lpszPath);
     443            if (!lpszPath) break;
     444          }
     445         
     446          ret = (*cutplace!='\0');
     447          *cutplace = '\0';
     448        }
     449        return ret;
    580450}
    581451
     
    593463
    594464        if(lpszFileName)
    595           RtlMoveMemory(lpszPath, lpszFileName, strlen(lpszFileName));
     465          RtlMoveMemory(lpszPath, lpszFileName, strlen(lpszFileName)+1);
    596466}
    597467
     
    605475        TRACE("%s\n", debugstr_w(lpszPath));
    606476        if(lpszFileName)
    607           RtlMoveMemory(lpszPath, lpszFileName, lstrlenW(lpszFileName)*sizeof(WCHAR));
    608 }
    609 
    610 /*************************************************************************
    611  * PathStripPathAW      [SHELL32.38]
    612  */
    613 void WINAPI PathStripPathAW(LPVOID lpszPath)
    614 {
    615         if (VERSION_OsIsUnicode())
    616           PathStripPathW(lpszPath);
    617         PathStripPathA(lpszPath);
     477          RtlMoveMemory(lpszPath, lpszFileName, (strlenW(lpszFileName)+1)*sizeof(WCHAR));
    618478}
    619479
     
    625485        TRACE("%s\n", lpszPath);
    626486
    627         /* X:\ */
    628         if (lpszPath[1]==':' && lpszPath[2]=='\\')
    629         {
    630           lpszPath[3]='\0';
    631           return TRUE;
    632         }
    633 
    634         /* "\" */
    635         if (lpszPath[0]=='\\')
    636         {
    637           lpszPath[1]='\0';
    638           return TRUE;
    639         }
    640 
    641         /* UNC "\\<computer>\<share>" */
    642         if (lpszPath[0]=='\\' && lpszPath[1]=='\\')             
    643         {
    644           int foundbackslash = 0;
    645           lpszPath += 2;
    646           while (*lpszPath)
    647           {
    648             if (*lpszPath=='\\') foundbackslash++;
    649             if (foundbackslash==2)
    650             {
    651               *lpszPath = '\0';
    652               return TRUE;
    653             }
    654             lpszPath++;
    655           }
    656         }
    657 
    658         return FALSE;
     487        if (!lpszPath) return FALSE;
     488        while(!PathIsRootA(lpszPath))
     489          if (!PathRemoveFileSpecA(lpszPath)) return FALSE;
     490        return TRUE;
    659491}
    660492
     
    666498        TRACE("%s\n", debugstr_w(lpszPath));
    667499
    668         /* X:\ */
    669         if (lpszPath[1]==':' && lpszPath[2]=='\\')
    670         {
    671           lpszPath[3]='\0';
    672           return TRUE;
    673         }
    674 
    675         /* "\" */
    676         if (lpszPath[0]=='\\')
    677         {
    678           lpszPath[1]='\0';
    679           return TRUE;
    680         }
    681 
    682         /* UNC "\\<computer>\<share>" */
    683         if (lpszPath[0]=='\\' && lpszPath[1]=='\\')             
    684         {
    685           int foundbackslash = 0;
    686           lpszPath += 2;
    687           while (*lpszPath)
    688           {
    689             if (*lpszPath=='\\') foundbackslash++;
    690             if (foundbackslash==2)
    691             {
    692               *lpszPath = '\0';
    693               return TRUE;
    694             }
    695             lpszPath++;
    696           }
    697         }
    698 
    699         return FALSE;
    700 }
    701 
    702 /*************************************************************************
    703  * PathStripToRootAW    [SHELL32.50]
    704  */
    705 BOOL WINAPI PathStripToRootAW(LPVOID lpszPath)
    706 {
    707         if (VERSION_OsIsUnicode())
    708           return PathStripToRootW(lpszPath);
    709         return PathStripToRootA(lpszPath);
     500        if (!lpszPath) return FALSE;
     501        while(!PathIsRootW(lpszPath))
     502          if (!PathRemoveFileSpecW(lpszPath)) return FALSE;
     503        return TRUE;
    710504}
    711505
    712506/*************************************************************************
    713507 * PathRemoveArgsA      [SHLWAPI.@]
     508 *
    714509 */
    715510void WINAPI PathRemoveArgsA(LPSTR lpszPath)
    716511{
    717         LPSTR lpszArgs = PathGetArgsA(lpszPath);
     512        TRACE("%s\n",lpszPath);
     513       
     514        if(lpszPath)
     515        {
     516          LPSTR lpszArgs = PathGetArgsA(lpszPath);
     517          if (!*lpszArgs)
     518          {
     519            LPSTR lpszLastChar = CharPrevA(lpszPath, lpszArgs);
     520            if(*lpszLastChar==' ') *lpszLastChar = '\0';
     521          }
     522        }
     523}
     524
     525/*************************************************************************
     526 * PathRemoveArgsW      [SHLWAPI.@]
     527 */
     528void WINAPI PathRemoveArgsW(LPWSTR lpszPath)
     529{
     530        TRACE("%s\n", debugstr_w(lpszPath));
     531
     532        if(lpszPath)
     533        {
     534          LPWSTR lpszArgs = PathGetArgsW(lpszPath);
     535          if (!*lpszArgs)
     536          {
     537            LPWSTR lpszLastChar = CharPrevW(lpszPath, lpszArgs);
     538            if(*lpszLastChar==' ') *lpszLastChar = '\0';
     539          }
     540        }
     541}
     542
     543/*************************************************************************
     544 * PathRemoveExtensionA         [SHLWAPI.@]
     545 */
     546void WINAPI PathRemoveExtensionA(LPSTR lpszPath)
     547{
     548        LPSTR lpszExtension = PathFindExtensionA(lpszPath);
    718549
    719550        TRACE("%s\n", lpszPath);
    720551
    721         if (lpszArgs) *(--lpszArgs)='\0';
    722 }
    723 
    724 /*************************************************************************
    725  * PathRemoveArgsW      [SHLWAPI.@]
    726  */
    727 void WINAPI PathRemoveArgsW(LPWSTR lpszPath)
    728 {
    729         LPWSTR lpszArgs = PathGetArgsW(lpszPath);
     552        if (lpszExtension) *lpszExtension='\0';
     553}
     554
     555/*************************************************************************
     556 * PathRemoveExtensionW         [SHLWAPI.@]
     557 */
     558void WINAPI PathRemoveExtensionW(LPWSTR lpszPath)
     559{
     560        LPWSTR lpszExtension = PathFindExtensionW(lpszPath);
    730561
    731562        TRACE("%s\n", debugstr_w(lpszPath));
    732563
    733         if (lpszArgs) *(--lpszArgs)='\0';
    734 }
    735 
    736 /*************************************************************************
    737  * PathRemoveArgsAW     [SHELL32.251]
    738  */
    739 void WINAPI PathRemoveArgsAW(LPVOID lpszPath)
    740 {
    741         if (VERSION_OsIsUnicode())
    742           PathRemoveArgsW(lpszPath);
    743         PathRemoveArgsA(lpszPath);
    744 }
    745 
    746 /*************************************************************************
    747  * PathRemoveExtensionA         [SHLWAPI.@]
    748  */
    749 void WINAPI PathRemoveExtensionA(LPSTR lpszPath)
    750 {
    751         LPSTR lpszExtension = PathFindExtensionA(lpszPath);
    752 
    753         TRACE("%s\n", lpszPath);
    754 
    755564        if (lpszExtension) *lpszExtension='\0';
    756 }
    757 
    758 /*************************************************************************
    759  * PathRemoveExtensionW         [SHLWAPI.@]
    760  */
    761 void WINAPI PathRemoveExtensionW(LPWSTR lpszPath)
    762 {
    763         LPWSTR lpszExtension = PathFindExtensionW(lpszPath);
    764 
    765         TRACE("%s\n", debugstr_w(lpszPath));
    766 
    767         if (lpszExtension) *lpszExtension='\0';
    768 }
    769 
    770 /*************************************************************************
    771  * PathRemoveExtensionAW        [SHELL32.250]
    772  */
    773 void WINAPI PathRemoveExtensionAW(LPVOID lpszPath)
    774 {
    775         if (VERSION_OsIsUnicode())
    776           PathRemoveExtensionW(lpszPath);
    777         PathRemoveExtensionA(lpszPath);
    778565}
    779566
     
    786573 * the address of the last character is returned.
    787574 *
     575 * FIXME
     576 *  "c:\": keep backslash
    788577 */
    789578LPSTR WINAPI PathRemoveBackslashA( LPSTR lpszPath )
    790579{
    791         LPSTR p = lpszPath;
    792        
    793         while (*lpszPath) p = lpszPath++;
    794         if ( *p == (CHAR)'\\') *p = (CHAR)'\0';
    795         return p;
     580        int len;
     581        LPSTR szTemp = NULL;
     582       
     583        if(lpszPath)
     584        {
     585          len = strlen(lpszPath);
     586          szTemp = CharPrevA(lpszPath, lpszPath+len);
     587          if (! PathIsRootA(lpszPath))
     588          {
     589            if (*szTemp == '\\') *szTemp = '\0';
     590          }
     591        }
     592        return szTemp;
    796593}
    797594
     
    801598LPWSTR WINAPI PathRemoveBackslashW( LPWSTR lpszPath )
    802599{
    803         LPWSTR p = lpszPath;
    804        
    805         while (*lpszPath); p = lpszPath++;
    806         if ( *p == (WCHAR)'\\') *p = (WCHAR)'\0';
    807         return p;
    808 }
     600        int len;
     601        LPWSTR szTemp = NULL;
     602       
     603        if(lpszPath)
     604        {
     605          len = strlenW(lpszPath);
     606          szTemp = CharPrevW(lpszPath, lpszPath+len);
     607          if (! PathIsRootW(lpszPath))
     608          {
     609            if (*szTemp == '\\') *szTemp = '\0';
     610          }
     611        }
     612        return szTemp;
     613}
     614
    809615
    810616/*
    811617        Path Manipulations
    812618*/
    813 
    814 /*************************************************************************
    815  * PathGetShortPathA [internal]
    816  */
    817 LPSTR WINAPI PathGetShortPathA(LPSTR lpszPath)
    818 {
    819         FIXME("%s stub\n", lpszPath);
    820         return NULL;
    821 }
    822 
    823 /*************************************************************************
    824  * PathGetShortPathW [internal]
    825  */
    826 LPWSTR WINAPI PathGetShortPathW(LPWSTR lpszPath)
    827 {
    828         FIXME("%s stub\n", debugstr_w(lpszPath));
    829         return NULL;
    830 }
    831 
    832 /*************************************************************************
    833  * PathGetShortPathAW [SHELL32.92]
    834  */
    835 LPVOID WINAPI PathGetShortPathAW(LPVOID lpszPath)
    836 {
    837         if(VERSION_OsIsUnicode())
    838           return PathGetShortPathW(lpszPath);
    839         return PathGetShortPathA(lpszPath);
    840 }
    841619
    842620/*************************************************************************
     
    846624 *     remove spaces from beginning and end of passed string
    847625 */
    848 LPSTR WINAPI PathRemoveBlanksA(LPSTR str)
     626void WINAPI PathRemoveBlanksA(LPSTR str)
    849627{
    850628        LPSTR x = str;
     
    852630        TRACE("%s\n",str);
    853631
    854         while (*x==' ') x++;
    855         if (x!=str)
    856           strcpy(str,x);
    857         if (!*str)
    858           return str;
    859         x=str+strlen(str)-1;
    860         while (*x==' ')
    861           x--;
    862         if (*x==' ')
    863           *x='\0';
    864         return x;
     632        if(str)
     633        {
     634          while (*x==' ') x = CharNextA(x);
     635          if (x!=str) strcpy(str,x);
     636          x=str+strlen(str)-1;
     637          while (*x==' ') x = CharPrevA(str, x);
     638          if (*x==' ') *x='\0';
     639        }
    865640}
    866641
     
    868643 * PathRemoveBlanksW [SHLWAPI.@]
    869644 */
    870 LPWSTR WINAPI PathRemoveBlanksW(LPWSTR str)
     645void WINAPI PathRemoveBlanksW(LPWSTR str)
    871646{
    872647        LPWSTR x = str;
     
    874649        TRACE("%s\n",debugstr_w(str));
    875650
    876         while (*x==' ') x++;
    877         if (x!=str)
    878           CRTDLL_wcscpy(str,x);
    879         if (!*str)
    880           return str;
    881         x=str+CRTDLL_wcslen(str)-1;
    882         while (*x==' ')
    883           x--;
    884         if (*x==' ')
    885           *x='\0';
    886         return x;
    887 }
    888 
    889 /*************************************************************************
    890  * PathRemoveBlanksAW [SHELL32.33]
    891  */
    892 LPVOID WINAPI PathRemoveBlanksAW(LPVOID str)
    893 {
    894         if(VERSION_OsIsUnicode())
    895           return PathRemoveBlanksW(str);
    896         return PathRemoveBlanksA(str);
     651        if(str)
     652        {
     653          while (*x==' ') x = CharNextW(x);
     654          if (x!=str) strcpyW(str,x);
     655          x=str+strlenW(str)-1;
     656          while (*x==' ') x = CharPrevW(str, x);
     657          if (*x==' ') *x='\0';
     658        }
    897659}
    898660
     
    900662 * PathQuoteSpacesA [SHLWAPI.@]
    901663 *
    902  * NOTES
    903664 */
    904665LPSTR WINAPI PathQuoteSpacesA(LPSTR lpszPath)
    905666{
    906         FIXME("%s\n",lpszPath);
     667        TRACE("%s\n",lpszPath);
     668
     669        if(StrChrA(lpszPath,' '))
     670        {
     671          int len = strlen(lpszPath);
     672          RtlMoveMemory(lpszPath+1, lpszPath, len);
     673          *(lpszPath++) = '"';
     674          lpszPath += len;
     675          *(lpszPath++) = '"';
     676          *(lpszPath) = '\0';
     677          return --lpszPath;
     678        }
    907679        return 0;
    908680}
     
    913685LPWSTR WINAPI PathQuoteSpacesW(LPWSTR lpszPath)
    914686{
    915         FIXME("%s\n",debugstr_w(lpszPath));
    916         return 0;       
    917 }
    918 
    919 /*************************************************************************
    920  * PathQuoteSpacesAW [SHELL32.55]
    921  */
    922 LPVOID WINAPI PathQuoteSpacesAW (LPVOID lpszPath)
    923 {
    924         if(VERSION_OsIsUnicode())
    925           return PathQuoteSpacesW(lpszPath);
    926         return PathQuoteSpacesA(lpszPath);
     687        TRACE("%s\n",debugstr_w(lpszPath));
     688
     689        if(StrChrW(lpszPath,' '))
     690        {
     691          int len = strlenW(lpszPath);
     692          RtlMoveMemory(lpszPath+1, lpszPath, len*sizeof(WCHAR));
     693          *(lpszPath++) = '"';
     694          lpszPath += len;
     695          *(lpszPath++) = '"';
     696          *(lpszPath) = '\0';
     697          return --lpszPath;
     698        }
     699        return 0;
    927700}
    928701
     
    935708VOID WINAPI PathUnquoteSpacesA(LPSTR str)
    936709{
    937         DWORD len = lstrlenA(str);
     710        DWORD len = strlen(str);
    938711
    939712        TRACE("%s\n",str);
     
    944717          return;
    945718        str[len-1]='\0';
    946         lstrcpyA(str,str+1);
     719        strcpy(str,str+1);
    947720        return;
    948721}
     
    953726VOID WINAPI PathUnquoteSpacesW(LPWSTR str)
    954727{
    955         DWORD len = CRTDLL_wcslen(str);
     728        DWORD len = strlenW(str);
    956729
    957730        TRACE("%s\n",debugstr_w(str));
     
    962735          return;
    963736        str[len-1]='\0';
    964         CRTDLL_wcscpy(str,str+1);
     737        strcpyW(str,str+1);
    965738        return;
    966 }
    967 
    968 /*************************************************************************
    969  * PathUnquoteSpacesAW [SHELL32.56]
    970  */
    971 VOID WINAPI PathUnquoteSpacesAW(LPVOID str)
    972 {
    973         if(VERSION_OsIsUnicode())
    974           PathUnquoteSpacesW(str);
    975         else
    976           PathUnquoteSpacesA(str);
    977739}
    978740
     
    991753/*        return atoi(&lpstrComma[1]);  FIXME */
    992754        }
     755       
     756        PathUnquoteSpacesA(lpszPath);
    993757        return 0;
    994758}
     
    999763int WINAPI PathParseIconLocationW(LPWSTR lpszPath)
    1000764{
    1001         LPWSTR lpstrComma = CRTDLL_wcschr(lpszPath, ',');
     765        LPWSTR lpstrComma = strchrW(lpszPath, ',');
    1002766       
    1003767        FIXME("%s stub\n", debugstr_w(lpszPath));
     
    1008772/*        return _wtoi(&lpstrComma[1]); FIXME */
    1009773        }
     774        PathUnquoteSpacesW(lpszPath);
    1010775        return 0;
    1011776}
    1012777
    1013 /*************************************************************************
    1014  * PathParseIconLocationAW      [SHELL32.249]
    1015  */
    1016 int WINAPI PathParseIconLocationAW (LPVOID lpszPath)
    1017 {
    1018         if(VERSION_OsIsUnicode())
    1019           return PathParseIconLocationW(lpszPath);
    1020         return PathParseIconLocationA(lpszPath);
    1021 }
    1022 
    1023778/*
    1024         Path Testing
     779        ########## cleaning and resolving paths ##########
     780 */
     781
     782/*************************************************************************
     783 * PathFindOnPathA      [SHLWAPI.@]
     784 */
     785BOOL WINAPI PathFindOnPathA(LPSTR sFile, LPCSTR sOtherDirs)
     786{
     787        FIXME("%s %s\n",sFile, sOtherDirs);
     788        return FALSE;
     789}
     790
     791/*************************************************************************
     792 * PathFindOnPathW      [SHLWAPI.@]
     793 */
     794BOOL WINAPI PathFindOnPathW(LPWSTR sFile, LPCWSTR sOtherDirs)
     795{
     796        FIXME("%s %s\n",debugstr_w(sFile), debugstr_w(sOtherDirs));
     797        return FALSE;
     798}
     799
     800/*************************************************************************
     801 *      PathCompactPathExA   [SHLWAPI.@]
     802 */
     803BOOL WINAPI PathCompactPathExA(
     804        LPSTR pszOut,
     805        LPCSTR pszSrc,
     806        UINT cchMax,
     807        DWORD dwFlags)
     808{
     809        FIXME("%p %s 0x%08x 0x%08lx\n", pszOut, pszSrc, cchMax, dwFlags);
     810        return FALSE;
     811}
     812
     813/*************************************************************************
     814 *      PathCompactPathExW   [SHLWAPI.@]
     815 */
     816BOOL WINAPI PathCompactPathExW(
     817        LPWSTR pszOut,
     818        LPCWSTR pszSrc,
     819        UINT cchMax,
     820        DWORD dwFlags)
     821{
     822        FIXME("%p %s 0x%08x 0x%08lx\n", pszOut, debugstr_w(pszSrc), cchMax, dwFlags);
     823        return FALSE;
     824}
     825
     826/*
     827        ########## Path Testing ##########
    1025828*/
     829
    1026830/*************************************************************************
    1027831 * PathIsUNCA           [SHLWAPI.@]
     
    1048852
    1049853/*************************************************************************
    1050  * PathIsUNCAW          [SHELL32.39]
    1051  */
    1052 BOOL WINAPI PathIsUNCAW (LPCVOID lpszPath)
    1053 {
    1054         if (VERSION_OsIsUnicode())
    1055           return PathIsUNCW( lpszPath );
    1056         return PathIsUNCA( lpszPath ); 
    1057 }
    1058 
    1059 /*************************************************************************
    1060854 *  PathIsRelativeA     [SHLWAPI.@]
    1061855 */
     
    1075869
    1076870        return (lpszPath && (lpszPath[0]!='\\' && lpszPath[1]!=':'));
    1077 }
    1078 
    1079 /*************************************************************************
    1080  *  PathIsRelativeAW    [SHELL32.40]
    1081  */
    1082 BOOL WINAPI PathIsRelativeAW (LPCVOID lpszPath)
    1083 {
    1084         if (VERSION_OsIsUnicode())
    1085           return PathIsRelativeW( lpszPath );
    1086         return PathIsRelativeA( lpszPath ); 
    1087871}
    1088872
     
    1112896          while (*lpszPath)
    1113897          {
    1114             if (*(lpszPath++)=='\\') foundbackslash++;
    1115           }
    1116           if (foundbackslash==1)
     898            if (*lpszPath=='\\') foundbackslash++;
     899            lpszPath = CharNextA(lpszPath);
     900          }
     901          if (foundbackslash <= 1)
    1117902            return TRUE;
    1118903        }
     
    1142927          while (*lpszPath)
    1143928          {
    1144             if (*(lpszPath++)=='\\') foundbackslash++;
    1145           }
    1146           if (foundbackslash==1)
     929            if (*lpszPath=='\\') foundbackslash++;
     930            lpszPath = CharNextW(lpszPath);
     931          }
     932          if (foundbackslash <= 1)
    1147933            return TRUE;
    1148934        }
     
    1152938
    1153939/*************************************************************************
    1154  * PathIsRootAW         [SHELL32.29]
    1155  */
    1156 BOOL WINAPI PathIsRootAW(LPCVOID lpszPath)
    1157 {
    1158         if (VERSION_OsIsUnicode())
    1159           return PathIsRootW(lpszPath);
    1160         return PathIsRootA(lpszPath);
    1161 }
    1162 
    1163 /*************************************************************************
    1164  *  PathIsExeA          [internal]
    1165  */
    1166 BOOL WINAPI PathIsExeA (LPCSTR lpszPath)
    1167 {
    1168         LPCSTR lpszExtension = PathGetExtensionA(lpszPath);
    1169         int i = 0;
    1170         static char * lpszExtensions[6] = {"exe", "com", "pid", "cmd", "bat", NULL };
    1171        
    1172         TRACE("path=%s\n",lpszPath);
    1173 
    1174         for(i=0; lpszExtensions[i]; i++)
    1175           if (!strcasecmp(lpszExtension,lpszExtensions[i])) return TRUE;
    1176          
    1177         return FALSE;
    1178 }
    1179 
    1180 /*************************************************************************
    1181  *  PathIsExeW          [internal]
    1182  */
    1183 BOOL WINAPI PathIsExeW (LPCWSTR lpszPath)
    1184 {
    1185         LPCWSTR lpszExtension = PathGetExtensionW(lpszPath);
    1186         int i = 0;
    1187         static WCHAR lpszExtensions[6][4] =
    1188           {{'e','x','e','\0'}, {'c','o','m','\0'}, {'p','i','d','\0'},
    1189            {'c','m','d','\0'}, {'b','a','t','\0'}, {'\0'} };
    1190        
    1191         TRACE("path=%s\n",debugstr_w(lpszPath));
    1192 
    1193         for(i=0; lpszExtensions[i]; i++)
    1194           if (!CRTDLL__wcsicmp(lpszExtension,lpszExtensions[i])) return TRUE;
    1195          
    1196         return FALSE;
    1197 }
    1198 
    1199 /*************************************************************************
    1200  *  PathIsExeAW         [SHELL32.43]
    1201  */
    1202 BOOL WINAPI PathIsExeAW (LPCVOID path)
    1203 {
    1204         if (VERSION_OsIsUnicode())
    1205           return PathIsExeW (path);
    1206         return PathIsExeA(path);
    1207 }
    1208 
    1209 /*************************************************************************
    1210940 * PathIsDirectoryA     [SHLWAPI.@]
    1211941 */
    1212942BOOL WINAPI PathIsDirectoryA(LPCSTR lpszPath)
    1213943{
    1214         HANDLE hFile;
    1215         WIN32_FIND_DATAA stffile;
    1216        
     944        DWORD dwAttr;
     945
    1217946        TRACE("%s\n", debugstr_a(lpszPath));
    1218947
    1219         hFile = FindFirstFileA(lpszPath, &stffile);
    1220 
    1221         if ( hFile != INVALID_HANDLE_VALUE )
    1222         {
    1223           FindClose (hFile);
    1224           return (stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
    1225         }
    1226 
    1227         return FALSE;   
     948        dwAttr = GetFileAttributesA(lpszPath);
     949        return  (dwAttr != -1) ? dwAttr & FILE_ATTRIBUTE_DIRECTORY : 0;
    1228950}
    1229951
     
    1233955BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
    1234956{
    1235         HANDLE hFile;
    1236         WIN32_FIND_DATAW stffile;
     957        DWORD dwAttr;
    1237958       
    1238959        TRACE("%s\n", debugstr_w(lpszPath));
    1239960
    1240         hFile = FindFirstFileW(lpszPath, &stffile);
    1241 
    1242         if ( hFile != INVALID_HANDLE_VALUE )
    1243         {
    1244           FindClose (hFile);
    1245           return (stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
    1246         }
    1247 
    1248         return FALSE;   
    1249 }
    1250 
    1251 /*************************************************************************
    1252  * PathIsDirectoryAW    [SHELL32.159]
    1253  */
    1254 BOOL WINAPI PathIsDirectoryAW (LPCVOID lpszPath)
    1255 {
    1256         if (VERSION_OsIsUnicode())
    1257           return PathIsDirectoryW (lpszPath);
    1258         return PathIsDirectoryA (lpszPath);
     961        dwAttr = GetFileAttributesW(lpszPath);
     962        return  (dwAttr != -1) ? dwAttr & FILE_ATTRIBUTE_DIRECTORY : 0;
    1259963}
    1260964
     
    1278982        TRACE("%s\n",debugstr_w(lpszPath));
    1279983        return  (GetFileAttributesW(lpszPath)!=-1);
    1280 }
    1281 
    1282 /*************************************************************************
    1283  * PathFileExistsAW     [SHELL32.45]
    1284  */
    1285 BOOL WINAPI PathFileExistsAW (LPCVOID lpszPath)
    1286 {
    1287         if (VERSION_OsIsUnicode())
    1288           return PathFileExistsW (lpszPath);
    1289         return PathFileExistsA (lpszPath);
    1290984}
    1291985
     
    13091003          }
    13101004          if (toupper(*mask)!=toupper(*name) && *mask!='?') return 0;
    1311           name++;
    1312           mask++;
     1005          name = CharNextA(name);
     1006          mask = CharNextA(mask);
    13131007        }
    13141008        if (!*name)
     
    13351029            return 0;
    13361030          }
    1337           if (towupper(*mask)!=towupper(*name) && *mask!='?') return 0;
    1338           name++;
    1339           mask++;
     1031          if (toupperW(*mask)!=toupperW(*name) && *mask!='?') return 0;
     1032          name = CharNextW(name);
     1033          mask = CharNextW(mask);
    13401034        }
    13411035        if (!*name)
     
    13611055        {
    13621056          if (PathMatchSingleMaskA(name,mask)) return 1;    /* helper function */
    1363           while (*mask && *mask!=';') mask++;
     1057          while (*mask && *mask!=';') mask = CharNextA(mask);
    13641058          if (*mask==';')
    13651059          {
     
    13851079        {
    13861080          if (PathMatchSingleMaskW(name,mask)) return 1;    /* helper function */
    1387           while (*mask && *mask!=';') mask++;
     1081          while (*mask && *mask!=';') mask = CharNextW(mask);
    13881082          if (*mask==';')
    13891083          {
     
    13931087        }
    13941088        return 0;
    1395 }
    1396 
    1397 /*************************************************************************
    1398  * PathMatchSpecAW      [SHELL32.46]
    1399  */
    1400 BOOL WINAPI PathMatchSpecAW(LPVOID name, LPVOID mask)
    1401 {
    1402         if (VERSION_OsIsUnicode())
    1403           return PathMatchSpecW( name, mask );
    1404         return PathMatchSpecA( name, mask );
    14051089}
    14061090
     
    14331117            if (lpszPath1[pos]=='\\') bsfound++;
    14341118            if (bsfound == 2) return TRUE;
    1435             pos++;
     1119            pos++; /* fixme: use CharNext*/
    14361120          }
    14371121          return (lpszPath1[pos] == lpszPath2[pos]);
     
    14501134
    14511135        /* usual path */
    1452         if ( towupper(lpszPath1[0])==towupper(lpszPath2[0]) &&
     1136        if ( toupperW(lpszPath1[0])==toupperW(lpszPath2[0]) &&
    14531137             lpszPath1[1]==':' && lpszPath2[1]==':' &&
    14541138             lpszPath1[2]=='\\' && lpszPath2[2]=='\\')
     
    14651149            if (lpszPath1[pos]=='\\') bsfound++;
    14661150            if (bsfound == 2) return TRUE;
    1467             pos++;
     1151            pos++;/* fixme: use CharNext*/
    14681152          }
    14691153          return (lpszPath1[pos] == lpszPath2[pos]);
    14701154        }
    14711155        return FALSE;
    1472 }
    1473 
    1474 /*************************************************************************
    1475  * PathIsSameRootAW     [SHELL32.650]
    1476  */
    1477 BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2)
    1478 {
    1479         if (VERSION_OsIsUnicode())
    1480           return PathIsSameRootW(lpszPath1, lpszPath2);
    1481         return PathIsSameRootA(lpszPath1, lpszPath2);
    14821156}
    14831157
     
    15021176        {
    15031177          if (iSize == strlen(SupportedProtocol[i]))
    1504             if(!strncasecmp(lpstrPath, SupportedProtocol[i], iSize));
     1178            if(!strncasecmp(lpstrPath, SupportedProtocol[i], iSize))
    15051179              return TRUE;
    15061180          i++;
     
    15251199
    15261200        /* get protocol        */
    1527         lpstrRes = CRTDLL_wcschr(lpstrPath,':');
     1201        lpstrRes = strchrW(lpstrPath,':');
    15281202        if(!lpstrRes) return FALSE;
    15291203        iSize = lpstrRes - lpstrPath;
     
    15311205        while(SupportedProtocol[i])
    15321206        {
    1533           if (iSize == CRTDLL_wcslen(SupportedProtocol[i]))
    1534             if(!CRTDLL__wcsnicmp(lpstrPath, SupportedProtocol[i], iSize));
     1207          if (iSize == strlenW(SupportedProtocol[i]))
     1208            if(!strncmpiW(lpstrPath, SupportedProtocol[i], iSize))
    15351209              return TRUE;
    15361210          i++;
     
    15401214
    15411215
    1542 /*************************************************************************
    1543  * IsLFNDriveA          [SHELL32.119]
    1544  *
    1545  * NOTES
    1546  *     exported by ordinal Name
    1547  */
    1548 BOOL WINAPI IsLFNDriveA(LPCSTR lpszPath)
    1549 {
    1550     DWORD       fnlen;
    1551 
    1552     if (!GetVolumeInformationA(lpszPath,NULL,0,NULL,&fnlen,NULL,NULL,0))
    1553         return FALSE;
    1554     return fnlen>12;
    1555 }
    1556 
    1557 /*
    1558         Creating Something Unique
    1559 */
    1560 /*************************************************************************
    1561  * PathMakeUniqueNameA  [internal]
    1562  */
    1563 BOOL WINAPI PathMakeUniqueNameA(
    1564         LPSTR lpszBuffer,
    1565         DWORD dwBuffSize,
    1566         LPCSTR lpszShortName,
    1567         LPCSTR lpszLongName,
    1568         LPCSTR lpszPathName)
    1569 {
    1570         FIXME("%p %lu %s %s %s stub\n",
    1571          lpszBuffer, dwBuffSize, debugstr_a(lpszShortName),
    1572          debugstr_a(lpszLongName), debugstr_a(lpszPathName));
    1573         return TRUE;
    1574 }
    1575 
    1576 /*************************************************************************
    1577  * PathMakeUniqueNameW  [internal]
    1578  */
    1579 BOOL WINAPI PathMakeUniqueNameW(
    1580         LPWSTR lpszBuffer,
    1581         DWORD dwBuffSize,
    1582         LPCWSTR lpszShortName,
    1583         LPCWSTR lpszLongName,
    1584         LPCWSTR lpszPathName)
    1585 {
    1586         FIXME("%p %lu %s %s %s stub\n",
    1587          lpszBuffer, dwBuffSize, debugstr_w(lpszShortName),
    1588          debugstr_w(lpszLongName), debugstr_w(lpszPathName));
    1589         return TRUE;
    1590 }
    1591 
    1592 /*************************************************************************
    1593  * PathMakeUniqueNameAW [SHELL32.47]
    1594  */
    1595 BOOL WINAPI PathMakeUniqueNameAW(
    1596         LPVOID lpszBuffer,
    1597         DWORD dwBuffSize,
    1598         LPCVOID lpszShortName,
    1599         LPCVOID lpszLongName,
    1600         LPCVOID lpszPathName)
    1601 {
    1602         if (VERSION_OsIsUnicode())
    1603           return PathMakeUniqueNameW(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,lpszPathName);
    1604         return PathMakeUniqueNameA(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,lpszPathName);
    1605 }
    1606 
    1607 /*************************************************************************
    1608  * PathYetAnotherMakeUniqueNameA [SHELL32.75]
    1609  *
    1610  * NOTES
    1611  *     exported by ordinal
    1612  */
    1613 BOOL WINAPI PathYetAnotherMakeUniqueNameA(
    1614         LPSTR lpszBuffer,
    1615         LPCSTR lpszPathName,
    1616         LPCSTR lpszShortName,
    1617         LPCSTR lpszLongName)
    1618 {
    1619     FIXME("(%p,%p, %p ,%p):stub.\n",
    1620      lpszBuffer, lpszPathName, lpszShortName, lpszLongName);
    1621     return TRUE;
    1622 }
    1623 
    1624 /*************************************************************************
    1625  * PathYetAnotherMakeUniqueNameA [SHELL32.75]
    1626  *
    1627  * NOTES
    1628  *     exported by ordinal
    1629  */
    1630 BOOL WINAPI PathYetAnotherMakeUniqueNameW(
    1631         LPWSTR lpszBuffer,
    1632         LPCWSTR lpszPathName,
    1633         LPCWSTR lpszShortName,
    1634         LPCWSTR lpszLongName)
    1635 {
    1636     FIXME("(%p,%p, %p ,%p):stub.\n",
    1637      lpszBuffer, lpszPathName, lpszShortName, lpszLongName);
    1638     return TRUE;
    1639 }
    1640 
    1641 BOOL WINAPI PathYetAnotherMakeUniqueNameAW(
    1642         LPSTR lpszBuffer,
    1643         LPCSTR lpszPathName,
    1644         LPCSTR lpszShortName,
    1645         LPCSTR lpszLongName)
    1646 {
    1647         if (VERSION_OsIsUnicode())
    1648           return PathYetAnotherMakeUniqueNameW((LPWSTR)lpszBuffer,(LPCWSTR)lpszPathName, (LPCWSTR)lpszShortName,(LPCWSTR)lpszLongName);
    1649         return PathYetAnotherMakeUniqueNameA(lpszBuffer, lpszPathName, lpszShortName,lpszLongName);
    1650 }
    1651 
    1652 
    1653 /*
    1654         cleaning and resolving paths
    1655  */
    1656 
    1657 /*************************************************************************
    1658  * PathFindOnPathA      [SHELL32.479]
    1659  */
    1660 BOOL WINAPI PathFindOnPathA(LPSTR sFile, LPCSTR sOtherDirs)
    1661 {
    1662         FIXME("%s %s\n",sFile, sOtherDirs);
    1663         return FALSE;
    1664 }
    1665 
    1666 /*************************************************************************
    1667  * PathFindOnPathW      [SHELL32]
    1668  */
    1669 BOOL WINAPI PathFindOnPathW(LPWSTR sFile, LPCWSTR sOtherDirs)
    1670 {
    1671         FIXME("%s %s\n",debugstr_w(sFile), debugstr_w(sOtherDirs));
    1672         return FALSE;
    1673 }
    1674 
    1675 /*************************************************************************
    1676  * PathFindOnPathAW     [SHELL32]
    1677  */
    1678 BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs)
    1679 {
    1680         if (VERSION_OsIsUnicode())
    1681           return PathFindOnPathW(sFile, sOtherDirs);
    1682         return PathFindOnPathA(sFile, sOtherDirs);
    1683 }
    1684 
    1685 /*************************************************************************
    1686  * PathCleanupSpecA     [SHELL32.171]
    1687  */
    1688 DWORD WINAPI PathCleanupSpecA(LPSTR x, LPSTR y)
    1689 {
    1690         FIXME("(%p %s, %p %s) stub\n",x,debugstr_a(x),y,debugstr_a(y));
    1691         return TRUE;
    1692 }
    1693 
    1694 /*************************************************************************
    1695  * PathCleanupSpecA     [SHELL32]
    1696  */
    1697 DWORD WINAPI PathCleanupSpecW(LPWSTR x, LPWSTR y)
    1698 {
    1699         FIXME("(%p %s, %p %s) stub\n",x,debugstr_w(x),y,debugstr_w(y));
    1700         return TRUE;
    1701 }
    1702 
    1703 /*************************************************************************
    1704  * PathCleanupSpecAW    [SHELL32]
    1705  */
    1706 DWORD WINAPI PathCleanupSpecAW (LPVOID x, LPVOID y)
    1707 {
    1708         if (VERSION_OsIsUnicode())
    1709           return PathCleanupSpecW(x,y);
    1710         return PathCleanupSpecA(x,y);
    1711 }
    1712 
    1713 /*************************************************************************
    1714  * PathQualifyA         [SHELL32]
    1715  */
    1716 BOOL WINAPI PathQualifyA(LPCSTR pszPath)
    1717 {
    1718         FIXME("%s\n",pszPath);
    1719         return 0;
    1720 }
    1721 
    1722 /*************************************************************************
    1723  * PathQualifyW         [SHELL32]
    1724  */
    1725 BOOL WINAPI PathQualifyW(LPCWSTR pszPath)
    1726 {
    1727         FIXME("%s\n",debugstr_w(pszPath));
    1728         return 0;
    1729 }
    1730 
    1731 /*************************************************************************
    1732  * PathQualifyAW        [SHELL32]
    1733  */
    1734 BOOL WINAPI PathQualifyAW(LPCVOID pszPath)
    1735 {
    1736         if (VERSION_OsIsUnicode())
    1737           return PathQualifyW(pszPath);
    1738         return PathQualifyA(pszPath);
    1739 }
    1740 
    1741 /*************************************************************************
    1742  * PathResolveA [SHELL32.51]
    1743  */
    1744 BOOL WINAPI PathResolveA(
    1745         LPSTR lpszPath,
    1746         LPCSTR *alpszPaths,
    1747         DWORD dwFlags)
    1748 {
    1749         FIXME("(%s,%p,0x%08lx),stub!\n",
    1750           lpszPath, *alpszPaths, dwFlags);
    1751         return 0;
    1752 }
    1753 
    1754 /*************************************************************************
    1755  * PathResolveW [SHELL32]
    1756  */
    1757 BOOL WINAPI PathResolveW(
    1758         LPWSTR lpszPath,
    1759         LPCWSTR *alpszPaths,
    1760         DWORD dwFlags)
    1761 {
    1762         FIXME("(%s,%p,0x%08lx),stub!\n",
    1763           debugstr_w(lpszPath), debugstr_w(*alpszPaths), dwFlags);
    1764         return 0;
    1765 }
    1766 
    1767 /*************************************************************************
    1768  * PathResolveAW [SHELL32]
    1769  */
    1770 BOOL WINAPI PathResolveAW(
    1771         LPVOID lpszPath,
    1772         LPCVOID *alpszPaths,
    1773         DWORD dwFlags)
    1774 {
    1775         if (VERSION_OsIsUnicode())
    1776           return PathResolveW(lpszPath, (LPCWSTR*)alpszPaths, dwFlags);
    1777         return PathResolveA(lpszPath, (LPCSTR*)alpszPaths, dwFlags);
    1778 }
    1779 
    1780 /*************************************************************************
    1781 *       PathProcessCommandA     [SHELL32.653]
    1782 */
    1783 HRESULT WINAPI PathProcessCommandA (
    1784         LPCSTR lpszPath,
    1785         LPSTR lpszBuff,
    1786         DWORD dwBuffSize,
    1787         DWORD dwFlags)
    1788 {
    1789         FIXME("%s %p 0x%04lx 0x%04lx stub\n",
    1790         lpszPath, lpszBuff, dwBuffSize, dwFlags);
    1791         lstrcpyA(lpszBuff, lpszPath);
    1792         return 0;
    1793 }
    1794 
    1795 /*************************************************************************
    1796 *       PathProcessCommandW
    1797 */
    1798 HRESULT WINAPI PathProcessCommandW (
    1799         LPCWSTR lpszPath,
    1800         LPWSTR lpszBuff,
    1801         DWORD dwBuffSize,
    1802         DWORD dwFlags)
    1803 {
    1804         FIXME("(%s, %p, 0x%04lx, 0x%04lx) stub\n",
    1805         debugstr_w(lpszPath), lpszBuff, dwBuffSize, dwFlags);
    1806         lstrcpyW(lpszBuff, lpszPath);
    1807         return 0;
    1808 }
    1809 
    1810 /*************************************************************************
    1811 *       PathProcessCommandAW
    1812 */
    1813 HRESULT WINAPI PathProcessCommandAW (
    1814         LPCVOID lpszPath,
    1815         LPVOID lpszBuff,
    1816         DWORD dwBuffSize,
    1817         DWORD dwFlags)
    1818 {
    1819         if (VERSION_OsIsUnicode())
    1820           return PathProcessCommandW(lpszPath, lpszBuff, dwBuffSize, dwFlags);
    1821         return PathProcessCommandA(lpszPath, lpszBuff, dwBuffSize, dwFlags);
    1822 }
    1823 
    1824 /*
    1825         special
    1826 */
    1827 
    1828 /*************************************************************************
    1829  * PathSetDlgItemPathA
    1830  *
    1831  * NOTES
    1832  *  use PathCompactPath to make sure, the path fits into the control
    1833  */
    1834 BOOL WINAPI PathSetDlgItemPathA(HWND hDlg, int id, LPCSTR pszPath)
    1835 {       TRACE("%x %x %s\n",hDlg, id, pszPath);
    1836         return SetDlgItemTextA(hDlg, id, pszPath);
    1837 }
    1838 
    1839 /*************************************************************************
    1840  * PathSetDlgItemPathW
    1841  */
    1842 BOOL WINAPI PathSetDlgItemPathW(HWND hDlg, int id, LPCWSTR pszPath)
    1843 {       TRACE("%x %x %s\n",hDlg, id, debugstr_w(pszPath));
    1844         return SetDlgItemTextW(hDlg, id, pszPath);
    1845 }
    1846 
    1847 /*************************************************************************
    1848  * PathSetDlgItemPathAW
    1849  */
    1850 BOOL WINAPI PathSetDlgItemPathAW(HWND hDlg, int id, LPCVOID pszPath)
    1851 {       if (VERSION_OsIsUnicode())
    1852           return PathSetDlgItemPathW(hDlg, id, pszPath);
    1853         return PathSetDlgItemPathA(hDlg, id, pszPath);
    1854 }
    1855 
    1856 
    1857 /*************************************************************************
    1858  * SHGetSpecialFolderPathA [SHELL32.175]
    1859  *
    1860  * converts csidl to path
    1861  *
    1862  */
    1863  
    1864 static char * szSHFolders = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
    1865 static char * szSHUserFolders = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders";
    1866 
    1867 BOOL WINAPI SHGetSpecialFolderPathA (
    1868         HWND hwndOwner,
    1869         LPSTR szPath,
    1870         DWORD csidl,
    1871         BOOL bCreate)
    1872 {
    1873         CHAR    szValueName[MAX_PATH], szDefaultPath[MAX_PATH];
    1874         HKEY    hRootKey, hKey;
    1875         BOOL    bRelative = TRUE;
    1876         DWORD   dwType, dwDisp, dwPathLen = MAX_PATH;
    1877 
    1878         TRACE("0x%04x,%p,csidl=%lu,0x%04x\n", hwndOwner,szPath,csidl,bCreate);
    1879 
    1880         /* build default values */
    1881         switch(csidl)
    1882         {
    1883           case CSIDL_APPDATA:
    1884             hRootKey = HKEY_CURRENT_USER;
    1885             strcpy (szValueName, "AppData");
    1886             strcpy (szDefaultPath, "AppData");
    1887             break;
    1888 
    1889           case CSIDL_COOKIES:
    1890             hRootKey = HKEY_CURRENT_USER;
    1891             strcpy (szValueName, "Cookies");
    1892             strcpy(szDefaultPath, "Cookies");
    1893             break;
    1894 
    1895           case CSIDL_DESKTOPDIRECTORY:
    1896             hRootKey = HKEY_CURRENT_USER;
    1897             strcpy(szValueName, "Desktop");
    1898             strcpy(szDefaultPath, "Desktop");
    1899             break;
    1900 
    1901           case CSIDL_COMMON_DESKTOPDIRECTORY:
    1902             hRootKey = HKEY_LOCAL_MACHINE;
    1903             strcpy(szValueName, "Common Desktop");
    1904             strcpy(szDefaultPath, "Desktop");
    1905             break;
    1906 
    1907           case CSIDL_FAVORITES:
    1908             hRootKey = HKEY_CURRENT_USER;
    1909             strcpy(szValueName, "Favorites");
    1910             strcpy(szDefaultPath, "Favorites");
    1911             break;
    1912 
    1913           case CSIDL_FONTS:
    1914             hRootKey = HKEY_CURRENT_USER;
    1915             strcpy(szValueName, "Fonts");
    1916             strcpy(szDefaultPath, "Fonts");
    1917             break;
    1918 
    1919           case CSIDL_HISTORY:
    1920             hRootKey = HKEY_CURRENT_USER;
    1921             strcpy(szValueName, "History");
    1922             strcpy(szDefaultPath, "History");
    1923             break;
    1924 
    1925           case CSIDL_NETHOOD:
    1926             hRootKey = HKEY_CURRENT_USER;
    1927             strcpy(szValueName, "NetHood");
    1928             strcpy(szDefaultPath, "NetHood");
    1929             break;
    1930 
    1931           case CSIDL_INTERNET_CACHE:
    1932             hRootKey = HKEY_CURRENT_USER;
    1933             strcpy(szValueName, "Cache");
    1934             strcpy(szDefaultPath, "Temporary Internet Files");
    1935             break;
    1936 
    1937           case CSIDL_PERSONAL:
    1938             hRootKey = HKEY_CURRENT_USER;
    1939             strcpy(szValueName, "Personal");
    1940             strcpy(szDefaultPath, "My Own Files");
    1941             bRelative = FALSE;
    1942             break;
    1943 
    1944           case CSIDL_PRINTHOOD:
    1945             hRootKey = HKEY_CURRENT_USER;
    1946             strcpy(szValueName, "PrintHood");
    1947             strcpy(szDefaultPath, "PrintHood");
    1948             break;
    1949 
    1950           case CSIDL_PROGRAMS:
    1951             hRootKey = HKEY_CURRENT_USER;
    1952             strcpy(szValueName, "Programs");
    1953             strcpy(szDefaultPath, "Start Menu\\Programs");
    1954             break;
    1955 
    1956           case CSIDL_COMMON_PROGRAMS:
    1957             hRootKey = HKEY_LOCAL_MACHINE;
    1958             strcpy(szValueName, "Common Programs");
    1959             strcpy(szDefaultPath, "");
    1960             break;
    1961 
    1962           case CSIDL_RECENT:
    1963             hRootKey = HKEY_CURRENT_USER;
    1964             strcpy(szValueName, "Recent");
    1965             strcpy(szDefaultPath, "Recent");
    1966             break;
    1967 
    1968           case CSIDL_SENDTO:
    1969             hRootKey = HKEY_CURRENT_USER;
    1970             strcpy(szValueName, "SendTo");
    1971             strcpy(szDefaultPath, "SendTo");
    1972             break;
    1973 
    1974           case CSIDL_STARTMENU:
    1975             hRootKey = HKEY_CURRENT_USER;
    1976             strcpy(szValueName, "Start Menu");
    1977             strcpy(szDefaultPath, "Start Menu");
    1978             break;
    1979 
    1980           case CSIDL_COMMON_STARTMENU:
    1981             hRootKey = HKEY_LOCAL_MACHINE;
    1982             strcpy(szValueName, "Common StartMenu"); //TODO: Start Menu?
    1983             strcpy(szDefaultPath, "Start Menu");
    1984             break;
    1985 
    1986           case CSIDL_STARTUP:
    1987             hRootKey = HKEY_CURRENT_USER;
    1988             strcpy(szValueName, "Startup");
    1989             strcpy(szDefaultPath, "Start Menu\\Programs\\Startup");
    1990             break;
    1991 
    1992           case CSIDL_COMMON_STARTUP:
    1993             hRootKey = HKEY_LOCAL_MACHINE;
    1994             strcpy(szValueName, "Common Startup");
    1995             strcpy(szDefaultPath, "Start Menu\\Programs\\Startup");
    1996             break;
    1997 
    1998           case CSIDL_TEMPLATES:
    1999             hRootKey = HKEY_CURRENT_USER;
    2000             strcpy(szValueName, "Templates");
    2001             strcpy(szDefaultPath, "ShellNew");
    2002             break;
    2003 
    2004           default:
    2005             ERR("folder unknown or not allowed\n");
    2006             return FALSE;
    2007         }
    2008 
    2009         /* user shell folders */
    2010         if (RegCreateKeyExA(hRootKey,szSHUserFolders,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,&dwDisp)) return FALSE;
    2011 
    2012         if (RegQueryValueExA(hKey,szValueName,NULL,&dwType,(LPBYTE)szPath,&dwPathLen))
    2013         {
    2014           RegCloseKey(hKey);
    2015 
    2016           /* shell folders */
    2017           if (RegCreateKeyExA(hRootKey,szSHFolders,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,&dwDisp)) return FALSE;
    2018 
    2019           if (RegQueryValueExA(hKey,szValueName,NULL,&dwType,(LPBYTE)szPath,&dwPathLen))
    2020           {
    2021 
    2022             /* value not existing */
    2023             if (bRelative)
    2024             {
    2025               GetWindowsDirectoryA(szPath, MAX_PATH);
    2026               PathAddBackslashA(szPath);
    2027               strcat(szPath, szDefaultPath);
    2028             }
    2029             else
    2030             {
    2031               strcpy(szPath, "C:\\");   /* fixme ??? */
    2032               strcat(szPath, szDefaultPath);
    2033             }
    2034             RegSetValueExA(hKey,szValueName,0,REG_SZ,(LPBYTE)szPath,strlen(szPath)+1);
    2035           }
    2036         }
    2037         RegCloseKey(hKey);
    2038 
    2039         if (bCreate && CreateDirectoryA(szPath,NULL))
    2040         {
    2041             MESSAGE("Created not existing system directory '%s'\n", szPath);
    2042         }
    2043 
    2044         return TRUE;
    2045 }
    2046 
    2047 /*************************************************************************
    2048  * SHGetSpecialFolderPathW
    2049  */
    2050 BOOL WINAPI SHGetSpecialFolderPathW (
    2051         HWND hwndOwner,
    2052         LPWSTR szPath,
    2053         DWORD csidl,
    2054         BOOL bCreate)
    2055 {
    2056         char szTemp[MAX_PATH];
    2057        
    2058         if (SHGetSpecialFolderPathA(hwndOwner, szTemp, csidl, bCreate))
    2059         {
    2060           lstrcpynAtoW(szPath, szTemp, MAX_PATH);
    2061         }
    2062 
    2063         TRACE("0x%04x,%p,csidl=%lu,0x%04x\n", hwndOwner,szPath,csidl,bCreate);
    2064 
    2065         return TRUE;
    2066 }
    2067 
    2068 /*************************************************************************
    2069  * SHGetSpecialFolderPathAW
    2070  */
    2071 BOOL WINAPI SHGetSpecialFolderPathAW (
    2072         HWND hwndOwner,
    2073         LPVOID szPath,
    2074         DWORD csidl,
    2075         BOOL bCreate)
    2076 
    2077 {
    2078         if (VERSION_OsIsUnicode())
    2079           return SHGetSpecialFolderPathW (hwndOwner, szPath, csidl, bCreate);
    2080         return SHGetSpecialFolderPathA (hwndOwner, szPath, csidl, bCreate);
    2081 }
    2082 
    2083 /*************************************************************************
    2084  * PathCanonicalizeA
     1216
     1217/*************************************************************************
     1218 *      PathIsContentTypeA   [SHLWAPI.@]
     1219 */
     1220BOOL WINAPI PathIsContentTypeA(LPCSTR pszPath, LPCSTR pszContentType)
     1221{
     1222        FIXME("%s %s\n", pszPath, pszContentType);
     1223        return FALSE;
     1224}
     1225
     1226/*************************************************************************
     1227 *      PathIsContentTypeW   [SHLWAPI.@]
     1228 */
     1229BOOL WINAPI PathIsContentTypeW(LPCWSTR pszPath, LPCWSTR pszContentType)
     1230{
     1231        FIXME("%s %s\n", debugstr_w(pszPath), debugstr_w(pszContentType));
     1232        return FALSE;
     1233}
     1234
     1235/*************************************************************************
     1236 *      PathIsFileSpecA   [SHLWAPI.@]
     1237 */
     1238BOOL WINAPI PathIsFileSpecA(LPCSTR pszPath)
     1239{
     1240        FIXME("%s\n", pszPath);
     1241        return FALSE;
     1242}
     1243
     1244/*************************************************************************
     1245 *      PathIsFileSpecW   [SHLWAPI.@]
     1246 */
     1247BOOL WINAPI PathIsFileSpecW(LPCWSTR pszPath)
     1248{
     1249        FIXME("%s\n", debugstr_w(pszPath));
     1250        return FALSE;
     1251}
     1252
     1253/*************************************************************************
     1254 *      PathIsPrefixA   [SHLWAPI.@]
     1255 */
     1256BOOL WINAPI PathIsPrefixA(LPCSTR pszPrefix, LPCSTR pszPath)
     1257{
     1258        FIXME("%s %s\n", pszPrefix, pszPath);
     1259        return FALSE;
     1260}
     1261
     1262/*************************************************************************
     1263 *      PathIsPrefixW   [SHLWAPI.@]
     1264 */
     1265BOOL WINAPI PathIsPrefixW(LPCWSTR pszPrefix, LPCWSTR pszPath)
     1266{
     1267        FIXME("%s %s\n", debugstr_w(pszPrefix), debugstr_w(pszPath));
     1268        return FALSE;
     1269}
     1270
     1271/*************************************************************************
     1272 *      PathIsSystemFolderA   [SHLWAPI.@]
     1273 */
     1274BOOL WINAPI PathIsSystemFolderA(LPCSTR pszPath, DWORD dwAttrb)
     1275{
     1276        FIXME("%s 0x%08lx\n", pszPath, dwAttrb);
     1277        return FALSE;
     1278}
     1279
     1280/*************************************************************************
     1281 *      PathIsSystemFolderW   [SHLWAPI.@]
     1282 */
     1283BOOL WINAPI PathIsSystemFolderW(LPCWSTR pszPath, DWORD dwAttrb)
     1284{
     1285        FIXME("%s 0x%08lx\n", debugstr_w(pszPath), dwAttrb);
     1286        return FALSE;
     1287}
     1288
     1289/*************************************************************************
     1290 *      PathIsUNCServerA   [SHLWAPI.@]
     1291 */
     1292BOOL WINAPI PathIsUNCServerA(
     1293        LPCSTR pszPath)
     1294{
     1295        FIXME("%s\n", pszPath);
     1296        return FALSE;
     1297}
     1298
     1299/*************************************************************************
     1300 *      PathIsUNCServerW   [SHLWAPI.@]
     1301 */
     1302BOOL WINAPI PathIsUNCServerW(
     1303        LPCWSTR pszPath)
     1304{
     1305        FIXME("%s\n", debugstr_w(pszPath));
     1306        return FALSE;
     1307}
     1308
     1309/*************************************************************************
     1310 *      PathIsUNCServerShareA   [SHLWAPI.@]
     1311 */
     1312BOOL WINAPI PathIsUNCServerShareA(
     1313        LPCSTR pszPath)
     1314{
     1315        FIXME("%s\n", pszPath);
     1316        return FALSE;
     1317}
     1318
     1319/*************************************************************************
     1320 *      PathIsUNCServerShareW   [SHLWAPI.@]
     1321 */
     1322BOOL WINAPI PathIsUNCServerShareW(
     1323        LPCWSTR pszPath)
     1324{
     1325        FIXME("%s\n", debugstr_w(pszPath));
     1326        return FALSE;
     1327}
     1328
     1329/*************************************************************************
     1330 * PathCanonicalizeA   [SHLWAPI.@]
    20851331 *
    20861332 *  FIXME
    2087  *   returnvalue
     1333 *   returnvalue, use CharNext
    20881334 */
    20891335 
     
    21551401
    21561402/*************************************************************************
    2157  * PathCanonicalizeW
     1403 * PathCanonicalizeW   [SHLWAPI.@]
    21581404 *
    21591405 *  FIXME
    2160  *   returnvalue
     1406 *   returnvalue, use CharNext
    21611407 */
    21621408BOOL WINAPI PathCanonicalizeW(LPWSTR pszBuf, LPCWSTR pszPath)
    21631409{
    2164         int OffsetMin = 0, OffsetSrc = 0, OffsetDst = 0, LenSrc = lstrlenW(pszPath);
     1410        int OffsetMin = 0, OffsetSrc = 0, OffsetDst = 0, LenSrc = strlenW(pszPath);
    21651411        BOOL bModifyed = FALSE;
    21661412
     
    22261472
    22271473/*************************************************************************
    2228  * PathFindNextComponentA
    2229  */
     1474 * PathFindNextComponentA   [SHLWAPI.@]
     1475 *
     1476 * NOTES
     1477 * special cases:
     1478 *      ""              null
     1479 *      aa              "" (pointer to traling NULL)
     1480 *      aa\             "" (pointer to traling NULL)
     1481 *      aa\\            "" (pointer to traling NULL)
     1482 *      aa\\bb          bb
     1483 *      aa\\\bb         \bb
     1484 *      c:\aa\          "aa\"
     1485 *      \\aa            aa
     1486 *      \\aa\b          aa\b
     1487*/
    22301488LPSTR WINAPI PathFindNextComponentA(LPCSTR pszPath)
    22311489{
    2232         while( *pszPath )
    2233         {
    2234           if(*pszPath++=='\\')
    2235             return (LPSTR)((*pszPath)? pszPath : NULL);
    2236         }
    2237         return NULL;
    2238 }
    2239 
    2240 /*************************************************************************
    2241  * PathFindNextComponentW
     1490        LPSTR pos;
     1491
     1492        TRACE("%s\n", pszPath);
     1493
     1494        if(!pszPath || !*pszPath) return NULL;
     1495        if(!(pos = StrChrA(pszPath, '\\')))
     1496          return (LPSTR) pszPath + strlen(pszPath);
     1497        pos++;
     1498        if(pos[0] == '\\') pos++;
     1499        return pos;
     1500}
     1501
     1502/*************************************************************************
     1503 * PathFindNextComponentW   [SHLWAPI.@]
    22421504 */
    22431505LPWSTR WINAPI PathFindNextComponentW(LPCWSTR pszPath)
    22441506{
    2245         while( *pszPath )
    2246         {
    2247           if(*pszPath++=='\\')
    2248             return (LPWSTR)((*pszPath)? pszPath : NULL);
    2249         }
    2250         return NULL;
    2251 }
    2252 
     1507        LPWSTR pos;
     1508
     1509        TRACE("%s\n", debugstr_w(pszPath));
     1510       
     1511        if(!pszPath || !*pszPath) return NULL;
     1512        if (!(pos = StrChrW(pszPath, '\\')))
     1513          return (LPWSTR) pszPath + strlenW(pszPath);
     1514        pos++;
     1515        if(pos[0] == '\\') pos++;
     1516        return pos;
     1517}
     1518
     1519/*************************************************************************
     1520 * PathAddExtensionA   [SHLWAPI.@]
     1521 *
     1522 * NOTES
     1523 *  it adds never a dot
     1524 */
     1525 
     1526BOOL WINAPI PathAddExtensionA(
     1527        LPSTR  pszPath,
     1528        LPCSTR pszExtension)
     1529{
     1530        if (*pszPath)
     1531        {
     1532          if (*(PathFindExtensionA(pszPath))) return FALSE;
     1533
     1534          if (!pszExtension || *pszExtension=='\0')
     1535            strcat(pszPath, "exe");
     1536          else
     1537            strcat(pszPath, pszExtension);
     1538        }
     1539
     1540        return TRUE;
     1541}
     1542
     1543/*************************************************************************
     1544 *      PathAddExtensionW   [SHLWAPI.@]
     1545 */
     1546BOOL WINAPI PathAddExtensionW(
     1547        LPWSTR  pszPath,
     1548        LPCWSTR pszExtension)
     1549{
     1550        static const WCHAR ext[] = { 'e','x','e',0 };
     1551
     1552        if (*pszPath)
     1553        {
     1554          if (*(PathFindExtensionW(pszPath))) return FALSE;
     1555
     1556          if (!pszExtension || *pszExtension=='\0')
     1557            strcatW(pszPath, ext);
     1558          else
     1559            strcatW(pszPath, pszExtension);
     1560        }
     1561        return TRUE;
     1562
     1563}
     1564
     1565/*************************************************************************
     1566 *      PathMakePrettyA   [SHLWAPI.@]
     1567 */
     1568BOOL WINAPI PathMakePrettyA(
     1569        LPSTR lpPath)
     1570{
     1571        FIXME("%s\n", lpPath);
     1572        return TRUE;
     1573}
     1574
     1575/*************************************************************************
     1576 *      PathMakePrettyW   [SHLWAPI.@]
     1577 */
     1578BOOL WINAPI PathMakePrettyW(
     1579        LPWSTR lpPath)
     1580{
     1581        FIXME("%s\n", debugstr_w(lpPath));
     1582        return TRUE;
     1583
     1584}
     1585
     1586/*************************************************************************
     1587 *      PathCommonPrefixA   [SHLWAPI.@]
     1588 */
     1589int WINAPI PathCommonPrefixA(
     1590        LPCSTR pszFile1,
     1591        LPCSTR pszFile2,
     1592        LPSTR achPath)
     1593{
     1594        FIXME("%s %s %p\n", pszFile1, pszFile2, achPath);
     1595        return 0;
     1596}
     1597
     1598/*************************************************************************
     1599 *      PathCommonPrefixW   [SHLWAPI.@]
     1600 */
     1601int WINAPI PathCommonPrefixW(
     1602        LPCWSTR pszFile1,
     1603        LPCWSTR pszFile2,
     1604        LPWSTR achPath)
     1605{
     1606        FIXME("%s %s %p\n", debugstr_w(pszFile1), debugstr_w(pszFile2),achPath );
     1607        return 0;
     1608}
     1609
     1610/*************************************************************************
     1611 *      PathCompactPathA   [SHLWAPI.@]
     1612 */
     1613BOOL WINAPI PathCompactPathA(HDC hDC, LPSTR pszPath, UINT dx)
     1614{
     1615        FIXME("0x%08x %s 0x%08x\n", hDC, pszPath, dx);
     1616        return FALSE;
     1617}
     1618
     1619/*************************************************************************
     1620 *      PathCompactPathW   [SHLWAPI.@]
     1621 */
     1622BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR pszPath, UINT dx)
     1623{
     1624        FIXME("0x%08x %s 0x%08x\n", hDC, debugstr_w(pszPath), dx);
     1625        return FALSE;
     1626}
     1627
     1628/*************************************************************************
     1629 *      PathGetCharTypeA   [SHLWAPI.@]
     1630 */
     1631UINT WINAPI PathGetCharTypeA(UCHAR ch)
     1632{
     1633        FIXME("%c\n", ch);
     1634        return 0;
     1635}
     1636
     1637/*************************************************************************
     1638 *      PathGetCharTypeW   [SHLWAPI.@]
     1639 */
     1640UINT WINAPI PathGetCharTypeW(WCHAR ch)
     1641{
     1642        FIXME("%c\n", ch);
     1643        return 0;
     1644}
     1645
     1646/*************************************************************************
     1647 *      PathMakeSystemFolderA   [SHLWAPI.@]
     1648 */
     1649BOOL WINAPI PathMakeSystemFolderA(LPCSTR pszPath)
     1650{
     1651        FIXME("%s\n", pszPath);
     1652        return FALSE;
     1653}
     1654
     1655/*************************************************************************
     1656 *      PathMakeSystemFolderW   [SHLWAPI.@]
     1657 */
     1658BOOL WINAPI PathMakeSystemFolderW(LPCWSTR pszPath)
     1659{
     1660        FIXME("%s\n", debugstr_w(pszPath));
     1661        return FALSE;
     1662}
     1663
     1664/*************************************************************************
     1665 *      PathRenameExtensionA   [SHLWAPI.@]
     1666 */
     1667BOOL WINAPI PathRenameExtensionA(LPSTR pszPath, LPCSTR pszExt)
     1668{
     1669        FIXME("%s %s\n", pszPath, pszExt);
     1670        return FALSE;
     1671}
     1672
     1673/*************************************************************************
     1674 *      PathRenameExtensionW   [SHLWAPI.@]
     1675 */
     1676BOOL WINAPI PathRenameExtensionW(LPWSTR pszPath, LPCWSTR pszExt)
     1677{
     1678        FIXME("%s %s\n", debugstr_w(pszPath), debugstr_w(pszExt));
     1679        return FALSE;
     1680}
     1681
     1682/*************************************************************************
     1683 *      PathSearchAndQualifyA   [SHLWAPI.@]
     1684 */
     1685BOOL WINAPI PathSearchAndQualifyA(
     1686        LPCSTR pszPath,
     1687        LPSTR pszBuf,
     1688        UINT cchBuf)
     1689{
     1690        FIXME("%s %s 0x%08x\n", pszPath, pszBuf, cchBuf);
     1691        return FALSE;
     1692}
     1693
     1694/*************************************************************************
     1695 *      PathSearchAndQualifyW   [SHLWAPI.@]
     1696 */
     1697BOOL WINAPI PathSearchAndQualifyW(
     1698        LPCWSTR pszPath,
     1699        LPWSTR pszBuf,
     1700        UINT cchBuf)
     1701{
     1702        FIXME("%s %s 0x%08x\n", debugstr_w(pszPath), debugstr_w(pszBuf), cchBuf);
     1703        return FALSE;
     1704}
     1705
     1706#ifndef __WIN32OS2__
     1707/*************************************************************************
     1708 *      PathSkipRootA   [SHLWAPI.@]
     1709 */
     1710LPSTR WINAPI PathSkipRootA(LPCSTR pszPath)
     1711{
     1712        FIXME("%s\n", pszPath);
     1713        return (LPSTR)pszPath;
     1714}
     1715
     1716/*************************************************************************
     1717 *      PathSkipRootW   [SHLWAPI.@]
     1718 */
     1719LPWSTR WINAPI PathSkipRootW(LPCWSTR pszPath)
     1720{
     1721        FIXME("%s\n", debugstr_w(pszPath));
     1722        return (LPWSTR)pszPath;
     1723}
     1724#endif
     1725
     1726/*************************************************************************
     1727 *      PathCreateFromUrlA   [SHLWAPI.@]
     1728 */
     1729HRESULT WINAPI PathCreateFromUrlA(
     1730        LPCSTR pszUrl,
     1731        LPSTR pszPath,
     1732        LPDWORD pcchPath,
     1733        DWORD dwFlags)
     1734{
     1735        FIXME("%s %p %p 0x%08lx\n",
     1736          pszUrl, pszPath, pcchPath, dwFlags);
     1737        return S_OK;
     1738}
     1739
     1740/*************************************************************************
     1741 *      PathCreateFromUrlW   [SHLWAPI.@]
     1742 */
     1743HRESULT WINAPI PathCreateFromUrlW(
     1744        LPCWSTR pszUrl,
     1745        LPWSTR pszPath,
     1746        LPDWORD pcchPath,
     1747        DWORD dwFlags)
     1748{
     1749        FIXME("%s %p %p 0x%08lx\n",
     1750          debugstr_w(pszUrl), pszPath, pcchPath, dwFlags);
     1751        return S_OK;
     1752}
     1753
     1754/*************************************************************************
     1755 *      PathRelativePathToA   [SHLWAPI.@]
     1756 */
     1757BOOL WINAPI PathRelativePathToA(
     1758        LPSTR pszPath,
     1759        LPCSTR pszFrom,
     1760        DWORD dwAttrFrom,
     1761        LPCSTR pszTo,
     1762        DWORD dwAttrTo)
     1763{
     1764        FIXME("%s %s 0x%08lx %s 0x%08lx\n",
     1765          pszPath, pszFrom, dwAttrFrom, pszTo, dwAttrTo);
     1766        return FALSE;
     1767}
     1768
     1769/*************************************************************************
     1770 *      PathRelativePathToW   [SHLWAPI.@]
     1771 */
     1772BOOL WINAPI PathRelativePathToW(
     1773        LPWSTR pszPath,
     1774        LPCWSTR pszFrom,
     1775        DWORD dwAttrFrom,
     1776        LPCWSTR pszTo,
     1777        DWORD dwAttrTo)
     1778{
     1779        FIXME("%s %s 0x%08lx %s 0x%08lx\n",
     1780          debugstr_w(pszPath), debugstr_w(pszFrom), dwAttrFrom, debugstr_w(pszTo), dwAttrTo);
     1781        return FALSE;
     1782}
     1783
     1784/*************************************************************************
     1785 *      PathUnmakeSystemFolderA   [SHLWAPI.@]
     1786 */
     1787BOOL WINAPI PathUnmakeSystemFolderA(LPCSTR pszPath)
     1788{
     1789        FIXME("%s\n", pszPath);
     1790        return FALSE;
     1791}
     1792
     1793/*************************************************************************
     1794 *      PathUnmakeSystemFolderW   [SHLWAPI.@]
     1795 */
     1796BOOL WINAPI PathUnmakeSystemFolderW(LPCWSTR pszPath)
     1797{
     1798        FIXME("%s\n", debugstr_w(pszPath));
     1799        return FALSE;
     1800}
     1801
     1802/*
     1803        ########## special ##########
     1804*/
     1805
     1806/*************************************************************************
     1807 * PathSetDlgItemPathA   [SHLWAPI.@]
     1808 *
     1809 * NOTES
     1810 *  use PathCompactPath to make sure, the path fits into the control
     1811 */
     1812BOOL WINAPI PathSetDlgItemPathA(HWND hDlg, int id, LPCSTR pszPath)
     1813{       TRACE("%x %x %s\n",hDlg, id, pszPath);
     1814        return SetDlgItemTextA(hDlg, id, pszPath);
     1815}
     1816
     1817/*************************************************************************
     1818 * PathSetDlgItemPathW   [SHLWAPI.@]
     1819 */
     1820BOOL WINAPI PathSetDlgItemPathW(HWND hDlg, int id, LPCWSTR pszPath)
     1821{       TRACE("%x %x %s\n",hDlg, id, debugstr_w(pszPath));
     1822        return SetDlgItemTextW(hDlg, id, pszPath);
     1823}
  • trunk/src/shlwapi/pathcpp.cpp

    r3942 r4081  
    1 /* $Id: pathcpp.cpp,v 1.3 2000-08-02 20:18:23 bird Exp $ */
     1/* $Id: pathcpp.cpp,v 1.4 2000-08-24 09:32:42 sandervl Exp $ */
    22
    33/*
     
    9898  return (LPWSTR)pszPath;
    9999}
    100 
    101 //SvL: NT seems to concatenate both strings (not tested very well)
    102 ODINFUNCTION2(BOOL, PathAddExtensionA, LPSTR, pszPath, LPSTR, pszExtension)
    103 {
    104   lstrcatA(pszPath, pszExtension);
    105   return 1;
    106 }
    107 
    108 ODINFUNCTION2(BOOL, PathAddExtensionW, LPWSTR, pszPath, LPWSTR, pszExtension)
    109 {
    110   lstrcatW(pszPath, pszExtension);
    111   return 1;
    112 }
    113 
  • trunk/src/shlwapi/shlwapi.def

    r3688 r4081  
    1 ; $Id: shlwapi.def,v 1.17 2000-06-12 11:35:14 phaller Exp $
     1; $Id: shlwapi.def,v 1.18 2000-08-24 09:32:43 sandervl Exp $
    22
    33; updated export ordinals to NT4 SP6 version of SHLWAPI.DLL
     
    106106                             _GetWindowTextLengthW@4              @96
    107107                             _GetWindowsDirectoryW@8              @97
    108                              _InsertMenuW@20                      @98 ; @@@PH imcomplete
     108                             _InsertMenuW@20                      @98 ; @@@PH incomplete
    109109                             _IsDialogMessageW@8                  @99
    110110                             _LoadAcceleratorsW@8                 @100
     
    219219    PathCombineA           = _PathCombineA@12                     @461
    220220    PathCombineW           = _PathCombineW@12                     @462
    221   ; PathCommonPrefixA      = _PathCommonPrefixA@12                @463
    222   ; PathCommonPrefixW      = _PathCommonPrefixW@?                 @464
    223   ; PathCompactPathA       = _PathCompactPathA@12                 @465
    224   ; PathCompactPathExA     = _PathCompactPathExA@12               @466
    225   ; PathCompactPathExW     = _PathCompactPathExW@12               @467
    226   ; PathCompactPathW       = _PathCompactPathW@12                 @468
    227   ; PathCreateFromUrlA     = _PathCreateFromUrlA@?                @469
    228   ; PathCreateFromUrlW     = _PathCreateFromUrlW@?                @470
     221    PathCommonPrefixA      = _PathCommonPrefixA@12                @463
     222    PathCommonPrefixW      = _PathCommonPrefixW@12                @464
     223    PathCompactPathA       = _PathCompactPathA@12                 @465
     224    PathCompactPathExA     = _PathCompactPathExA@16               @466
     225    PathCompactPathExW     = _PathCompactPathExW@16               @467
     226    PathCompactPathW       = _PathCompactPathW@12                 @468
     227    PathCreateFromUrlA     = _PathCreateFromUrlA@16               @469
     228    PathCreateFromUrlW     = _PathCreateFromUrlW@16               @470
    229229    PathFileExistsA        = _PathFileExistsA@4                   @471
    230230    PathFileExistsW        = _PathFileExistsW@4                   @472
     
    241241    PathGetArgsA           = _PathGetArgsA@4                      @483
    242242    PathGetArgsW           = _PathGetArgsW@4                      @484
    243   ; PathGetCharTypeA       = _PathGetCharTypeA@?                  @485
    244   ; PathGetCharTypeW       = _PathGetCharTypeW@?                  @486
     243    PathGetCharTypeA       = _PathGetCharTypeA@4                  @485
     244    PathGetCharTypeW       = _PathGetCharTypeW@4                  @486
    245245    PathGetDriveNumberA    = _PathGetDriveNumberA@4               @487
    246246    PathGetDriveNumberW    = _PathGetDriveNumberW@4               @488
    247   ; PathIsContentTypeA     = _PathIsContentTypeA@8                @489
    248   ; PathIsContentTypeW     = _PathIsContentTypeW@8                @490
     247    PathIsContentTypeA     = _PathIsContentTypeA@8                @489
     248    PathIsContentTypeW     = _PathIsContentTypeW@8                @490
    249249    PathIsDirectoryA       = _PathIsDirectoryA@4                  @491
    250250;   PathIsDirectoryEmptyA  = _PathIsDirectoryEmptyA@4             @492
    251251;   PathIsDirectoryEmptyW  = _PathIsDirectoryEmptyW@4             @493
    252   ; PathIsDirectoryW       = _PathIsDirectoryW@?                  @494
    253   ; PathIsFileSpecA        = _PathIsFileSpecA@?                   @495
    254   ; PathIsFileSpecW        = _PathIsFileSpecW@?                   @496
     252    PathIsDirectoryW       = _PathIsDirectoryW@4                  @494
     253    PathIsFileSpecA        = _PathIsFileSpecA@4                   @495
     254    PathIsFileSpecW        = _PathIsFileSpecW@4                   @496
    255255;   PathIsLFNFileSpecA     = _PathIsLFNFileSpecA@4                @497
    256256;   PathIsLFNFileSpecW     = _PathIsLFNFileSpecW@4                @498
    257257;   PathIsNetworkPathA     = _PathIsNetworkPathA@4                @499
    258258;   PathIsNetworkPathW     = _PathIsNetworkPathW@4                @500
    259   ; PathIsPrefixA          = _PathIsPrefixA@8                     @501
    260   ; PathIsPrefixW          = _PathIsPrefixW@?                     @502
     259    PathIsPrefixA          = _PathIsPrefixA@8                     @501
     260    PathIsPrefixW          = _PathIsPrefixW@8                     @502
    261261    PathIsRelativeA        = _PathIsRelativeA@4                   @503
    262262    PathIsRelativeW        = _PathIsRelativeW@4                   @504
     
    265265    PathIsSameRootA        = _PathIsSameRootA@8                   @507
    266266    PathIsSameRootW        = _PathIsSameRootW@8                   @508
    267   ; PathIsSystemFolderA    = _PathIsSystemFolderA@8               @509
    268   ; PathIsSystemFolderW    = _PathIsSystemFolderW@8               @510
     267    PathIsSystemFolderA    = _PathIsSystemFolderA@8               @509
     268    PathIsSystemFolderW    = _PathIsSystemFolderW@8               @510
    269269    PathIsUNCA             = _PathIsUNCA@4                        @511
    270   ; PathIsUNCServerA       = _PathIsUNCServerA@?                  @512
    271   ; PathIsUNCServerShareA  = _PathIsUNCServerShareA@?             @513
    272   ; PathIsUNCServerShareW  = _PathIsUNCServerShareW@?             @514
    273   ; PathIsUNCServerW       = _PathIsUNCServerW@?                  @515
     270    PathIsUNCServerA       = _PathIsUNCServerA@4                  @512
     271    PathIsUNCServerShareA  = _PathIsUNCServerShareA@4             @513
     272    PathIsUNCServerShareW  = _PathIsUNCServerShareW@4             @514
     273    PathIsUNCServerW       = _PathIsUNCServerW@4                  @515
    274274    PathIsUNCW             = _PathIsUNCW@4                        @516
    275275    PathIsURLA             = _PathIsURLA@4                        @517
    276276    PathIsURLW             = _PathIsURLW@4                        @518
    277   ; PathMakePrettyA        = _PathMakePrettyA@?                   @519
    278   ; PathMakePrettyW        = _PathMakePrettyW@?                   @520
    279   ; PathMakeSystemFolderA  = _PathMakeSystemFolderA@4             @521
    280   ; PathMakeSystemFolderW  = _PathMakeSystemFolderW@4             @522
     277    PathMakePrettyA        = _PathMakePrettyA@4                   @519
     278    PathMakePrettyW        = _PathMakePrettyW@4                   @520
     279    PathMakeSystemFolderA  = _PathMakeSystemFolderA@4             @521
     280    PathMakeSystemFolderW  = _PathMakeSystemFolderW@4             @522
    281281    PathMatchSpecA         = _PathMatchSpecA@8                    @523
    282282    PathMatchSpecW         = _PathMatchSpecW@8                    @524
     
    285285    PathQuoteSpacesA       = _PathQuoteSpacesA@4                  @527
    286286    PathQuoteSpacesW       = _PathQuoteSpacesW@4                  @528
    287   ; PathRelativePathToA    = _PathRelativePathToA@?               @529
    288   ; PathRelativePathToW    = _PathRelativePathToW@?               @530
     287    PathRelativePathToA    = _PathRelativePathToA@20              @529
     288    PathRelativePathToW    = _PathRelativePathToW@20              @530
    289289    PathRemoveArgsA        = _PathRemoveArgsA@4                   @531
    290290    PathRemoveArgsW        = _PathRemoveArgsW@4                   @532
     
    297297    PathRemoveFileSpecA    = _PathRemoveFileSpecA@4               @539
    298298    PathRemoveFileSpecW    = _PathRemoveFileSpecW@4               @540
    299   ; PathRenameExtensionA   = _PathRenameExtensionA@@8             @541
    300   ; PathRenameExtensionW   = _PathRenameExtensionW@?              @542
    301   ; PathSearchAndQualifyA  = _PathSearchAndQualifyA@12            @543
    302   ; PathSearchAndQualifyW  = _PathSearchAndQualifyW@12            @544
     299    PathRenameExtensionA   = _PathRenameExtensionA@8              @541
     300    PathRenameExtensionW   = _PathRenameExtensionW@8              @542
     301    PathSearchAndQualifyA  = _PathSearchAndQualifyA@12            @543
     302    PathSearchAndQualifyW  = _PathSearchAndQualifyW@12            @544
    303303    PathSetDlgItemPathA    = _PathSetDlgItemPathA@12              @545
    304304    PathSetDlgItemPathW    = _PathSetDlgItemPathW@12              @546
     
    311311;   PathUndecorateA        = _PathUndecorateA@4                   @553
    312312;   PathUndecorateW        = _PathUndecorateW@4                   @554
    313   ; PathUnmakeSystemFolderA= _PathUnmakeSystemFolderA@4           @555
    314   ; PathUnmakeSystemFolderW= _PathUnmakeSystemFolderW@4           @556
     313    PathUnmakeSystemFolderA= _PathUnmakeSystemFolderA@4           @555
     314    PathUnmakeSystemFolderW= _PathUnmakeSystemFolderW@4           @556
    315315    PathUnquoteSpacesA     = _PathUnquoteSpacesA@4                @557
    316316    PathUnquoteSpacesW     = _PathUnquoteSpacesW@4                @558
     
    319319  ; SHCopyKeyA             = _SHCopyKeyA@?                        @560
    320320  ; SHCopyKeyW             = _SHCopyKeyW@?                        @561
    321   ; SHCreateShellPalette   = _SHCreateShellPalette@?              @562
     321    SHCreateShellPalette   = _SHCreateShellPalette@4              @562
    322322  ; SHCreateStreamOnFileA  = _SHCreateStreamOnFileA@?             @563
    323323  ; SHCreateStreamOnFileW  = _SHCreateStreamOnFileW@?             @564
     
    326326  ; SHDeleteEmptyKeyA      = _SHDeleteEmptyKeyA@?                 @567
    327327  ; SHDeleteEmptyKeyW      = _SHDeleteEmptyKeyW@?                 @568
    328   ; SHDeleteKeyA           = _SHDeleteKeyA@?                      @569
    329   ; SHDeleteKeyW           = _SHDeleteKeyW@?                      @570
     328    SHDeleteKeyA           = _SHDeleteKeyA@8                      @569
     329    SHDeleteKeyW           = _SHDeleteKeyW@8                      @570
    330330  ; SHDeleteOrphanKeyA     = _SHDeleteOrphanKeyA@?                @571
    331331  ; SHDeleteOrphanKeyW     = _SHDeleteOrphanKeyW@?                @572
     
    342342    SHGetValueW            = _SHGetValueW@24                      @583
    343343    SHIsLowMemoryMachine   = _SHIsLowMemoryMachine@4              @584
    344   ; SHOpenRegStream2A      = _SHOpenRegStream2A@?                 @585
    345   ; SHOpenRegStream2W      = _SHOpenRegStream2W@?                 @586
    346   ; SHOpenRegStreamA       = _SHOpenRegStreamA@?                  @587
    347   ; SHOpenRegStreamW       = _SHOpenRegStreamW@?                  @588
     344    SHOpenRegStream2A      = _SHOpenRegStreamA@16                 @585
     345    SHOpenRegStream2W      = _SHOpenRegStreamW@16                 @586
     346    SHOpenRegStreamA       = _SHOpenRegStreamA@16                 @587
     347    SHOpenRegStreamW       = _SHOpenRegStreamW@16                 @588
    348348  ; SHQueryInfoKeyA        = _SHQueryInfoKeyA@?                   @589
    349349  ; SHQueryInfoKeyW        = _SHQueryInfoKeyW@?                   @590
    350   ; SHQueryValueExA        = _SHQueryValueExA@?                   @591
    351   ; SHQueryValueExW        = _SHQueryValueExW@?                   @592
     350    SHQueryValueExA        = _SHQueryValueExA@24                  @591
     351    SHQueryValueExW        = _SHQueryValueExW@24                  @592
    352352  ; SHRegCloseUSKey        = _SHRegCloseUSKey@?                   @593
    353353    SHRegCreateUSKeyA      = _SHRegCreateUSKeyA@20                @594
     
    377377;   SHRegWriteUSValueW     = _SHRegWriteUSValueW@?                @618
    378378;   SHSetSetThreadRef      = _SHSetThreadRef@?                    @619
    379 ;   SHSetValueA            = _SHSetValueA@?                       @620
     379    SHSetValueA            = _SHSetValueA@24                      @620
    380380;   SHSetValueW            = _SHSetValueW@?                       @621
    381381;   SHSkipJunction         = _SHSkipJunction@8                    @622
    382382;   SHStrDupA              = _SHStrDupA@?                         @623
    383383;   SHStrDupW              = _SHStrDUpW@?                         @624
    384   ; StrCSpnA               = _StrCSpnA@?                          @625
     384    StrCSpnA               = _StrCSpnA@8                          @625
    385385  ; StrCSpnIA              = _StrCSpnIA@?                         @626
    386386  ; StrCSpnIW              = _StrCSpnIW@?                         @627
    387   ; StrCSpnW               = _StrCSpnW@?                          @628
    388 ;   StrCatBuffA            = _StrCatBuffA@?                       @629
    389 ;   StrCatBuffW            = _StrCatBuffW@?                       @630
     387    StrCSpnW               = _StrCSpnW@8                          @628
     388    StrCatBuffA            = _StrCatBuffA@12                      @629
     389    StrCatBuffW            = _StrCatBuffW@12                      @630
    390390  ; StrCatA                = _StrCatA@?                                 ; not exported ?
    391391  ; StrCatW                = _StrCatW@?                           @631
     
    394394    StrChrIW               = _StrChrIW@8                          @634
    395395    StrChrW                = _StrChrW@8                           @635
    396   ; StrCmpIW               = _StrCmpIW@?                          @636
    397   ; StrCmpNA               = _StrCmpNA@12                         @637
     396    StrCmpIW               = _lstrcmpiW@8                         @636
     397    StrCmpNA               = _StrCmpNA@12                         @637
    398398    StrCmpNIA              = _StrCmpNIA@12                        @638
    399399    StrCmpNIW              = _StrCmpNIW@12                        @639
    400   ; StrCmpNW               = _StrCmpNW@12                         @640
    401   ; StrCmpW                = _StrCmpW@?                           @641
    402   ; StrCpyNW               = _StrCpyNW@?                          @642
     400    StrCmpNW               = _StrCmpNW@12                         @640
     401    StrCmpW                = _lstrcmpW@8                          @641
     402    StrCpyNW               = _lstrcpynW@12                        @642
    403403    StrCpyA                = _StrCpyA@8                                 ; not exported ?
    404404    StrCpyW                = _StrCpyW@8                           @643
     
    430430  ; StrSpnA                = _StrSpnA@?                           @669
    431431  ; StrSpnW                = _StrSpnW@?                           @670
    432   ; StrStrA                = _StrStrA@8                           @671
     432    StrStrA                = _StrStrA@8                           @671
    433433    StrStrIA               = _StrStrIA@8                          @672
    434434    StrStrIW               = _StrStrIW@8                          @673
    435   ; StrStrW                = _StrStrW@8                           @674
     435    StrStrW                = _StrStrW@8                           @674
    436436    StrToIntA              = _StrToIntA@4                         @675
    437437  ; StrToIntExA            = _StrToIntExA@?                       @676
     
    466466    UrlUnescapeA           = _UrlUnescapeA@16                     @705
    467467    UrlUnescapeW           = _UrlUnescapeW@16                     @706
    468 ;   wnsprintfA             = _wnsprintfA@16                       @707
    469 ;   wnsprintfW             = _wnsprintfW@16                       @708
     468    wnsprintfA             = _wnsprintfA                          @707
     469    wnsprintfW             = _wnsprintfW                          @708
    470470;   wvnsprintfA            = _wvnsprintfA@16                      @709
    471471;   wvnsprintfW            = _wvnsprintfW@16                      @710
    472472
    473 ; ------------------------------
    474 ; Export for SHELL32 to catch up
    475 ; ------------------------------
    476 
    477    _PathIsRootAW@4                      @1000
    478    _PathBuildRootAW@8                   @1001
    479    _PathFindExtensionAW@4               @1002
    480    _PathAddBackslashAW@4                @1003
    481    _PathRemoveBlanksAW@4                @1004
    482    _PathFindFileNameAW@4                @1005
    483    _PathRemoveFileSpecAW@4              @1006
    484    _PathAppendAW@8                      @1007
    485    _PathCombineAW@12                    @1008
    486    _PathStripPathAW@4                   @1009
    487    _PathIsUNCAW@4                       @1010
    488    _PathIsRelativeAW@4                  @1011
    489    _PathProcessCommandAW@16             @1012
    490    _PathParseIconLocationAW@4           @1013
    491    _PathResolveAW@12                    @1014
    492    _PathQualifyAW@4                     @1015
    493    _PathGetArgsAW@4                     @1016
    494    _PathMatchSpecAW@8                   @1017
    495    _PathRemoveArgsAW@4                  @1018
    496    _PathFindOnPathAW@8                  @1019
    497    _PathIsSameRootAW@8                  @1020
    498    _PathCleanupSpecAW@8                 @1021
    499    _PathIsDirectoryAW@4                 @1022
    500    _PathQuoteSpacesAW@4                 @1023
    501    _PathGetExtensionAW@4                @1024
    502    _PathGetShortPathAW@4                @1025
    503    _PathStripToRootAW@4                 @1026
    504    _PathUnquoteSpacesAW@4               @1027
    505    _PathMakeUniqueNameAW@20             @1028
    506    _PathSetDlgItemPathAW@12             @1029
    507    _PathGetDriveNumberAW@4              @1030
    508    _PathYetAnotherMakeUniqueNameAW@16   @1031
    509    _PathIsExeAW@4                       @1032
    510    _PathRemoveExtensionAW@4             @1033
    511 
    512    _SHGetSpecialFolderPathAW@16         @1050
    513    _SHGetSpecialFolderPathA@16          @1051
    514    _SHGetSpecialFolderPathW@16          @1052
    515 
    516    _IsLFNDriveA@4                       @1070
    517 
     473;which ordinals??
     474    StrRetToBufA           = _StrRetToBufA@16                     @800
     475    StrRetToBufW           = _StrRetToBufW@16                     @801
     476
     477    SHRegGetPathA          = _SHRegGetPathA@20                    @802
     478    SHRegGetPathW          = _SHRegGetPathW@20                    @803
  • trunk/src/shlwapi/url.cpp

    r3942 r4081  
    1 /* $Id: url.cpp,v 1.5 2000-08-02 20:18:24 bird Exp $ */
     1/* $Id: url.cpp,v 1.6 2000-08-24 09:32:45 sandervl Exp $ */
    22
    33/*
     
    3838#include <win\winerror.h>
    3939
    40 #include "shlwapi.h"
     40#include "shlwapi_odin.h"
    4141
    4242ODINDEBUGCHANNEL(SHLWAPI-URL)
Note: See TracChangeset for help on using the changeset viewer.