Ignore:
Timestamp:
Dec 29, 1999, 12:16:33 AM (26 years ago)
Author:
sandervl
Message:

added apis + exports for shlwapi

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/shellpath.cpp

    r1553 r2237  
    1 /* $Id: shellpath.cpp,v 1.4 1999-11-02 20:05:35 phaller Exp $ */
     1/* $Id: shellpath.cpp,v 1.5 1999-12-28 23:16:33 sandervl Exp $ */
    22
    33/*
     
    9999 * PathBuildRoot [SHELL32.30]
    100100 */
    101 ODINFUNCTION2(LPSTR, PathBuildRootA,
    102               LPSTR, root,
    103               BYTE, drive)
     101LPSTR WINAPI PathBuildRootA(LPSTR root, BYTE drive)
    104102{
    105103  TRACE("%p %i\n",root, drive);
    106104   strcpy(root,"A:\\");
     105   root[0]+=drive;
     106   return root;
     107}
     108
     109/*************************************************************************
     110 */
     111LPWSTR WINAPI PathBuildRootW(LPWSTR root, BYTE drive)
     112{
     113   lstrcpyW(root, (LPWSTR)L"A:\\");
    107114   root[0]+=drive;
    108115   return root;
     
    329336 *     concats "target\\add" and writes them to target
    330337 */
    331 ODINFUNCTION2(LPSTR, PathAppendA,
    332               LPSTR, x1,
    333               LPSTR, x2)
     338LPSTR WINAPI PathAppendA(LPSTR x1, LPSTR x2)
    334339{
    335340  TRACE("%s %s\n",x1,x2);
    336341  while (x2[0]=='\\') x2++;
    337342  return PathCombineA(x1,x1,x2);
     343}
     344
     345/*************************************************************************
     346 * PathAppend [SHELL32.36]
     347 *
     348 * NOTES
     349 *     concat_paths(char*target,const char*add);
     350 *     concats "target\\add" and writes them to target
     351 */
     352LPWSTR WINAPI PathAppendW(LPWSTR x1, LPWSTR x2)
     353{
     354  while (x2[0] == (WCHAR)'\\') x2++;
     355  return PathCombineW(x1,x1,x2);
    338356}
    339357
     
    491509  TRACE("%s\n",fn);
    492510   if (GetFileAttributesA(fn)==-1)
     511      return FALSE;
     512    else
     513      return TRUE;
     514}
     515/*************************************************************************
     516 * PathFileExists [SHELL32.45]
     517 *
     518 * NOTES
     519 *     file_exists(char *fn);
     520 */
     521ODINFUNCTION1(BOOL, PathFileExistsW,
     522              LPWSTR, fn)
     523{
     524   if (GetFileAttributesW(fn)==-1)
    493525      return FALSE;
    494526    else
     
    763795 *
    764796 */
    765 ODINFUNCTION1(HRESULT, PathGetDriveNumber,
     797ODINFUNCTION1(HRESULT, PathGetDriveNumberAW,
    766798              LPSTR, u)
    767799{  FIXME("%s stub\n",debugstr_a(u));
     800   return 0;
     801}
     802
     803/*************************************************************************
     804 * PathGetDriveNumber32 [SHELL32.57]
     805 *
     806 */
     807ODINFUNCTION1(HRESULT, PathGetDriveNumberA,
     808              LPSTR, u)
     809{  FIXME("%s stub\n",debugstr_a(u));
     810   return 0;
     811}
     812
     813/*************************************************************************
     814 * PathGetDriveNumber32 [SHELL32.57]
     815 *
     816 */
     817ODINFUNCTION1(HRESULT, PathGetDriveNumberW,
     818              LPWSTR, u)
     819
    768820   return 0;
    769821}
     
    11531205 *
    11541206 */
    1155 ODINFUNCTION1(LPSTR,PathRemoveBackslashA,LPSTR,lpPath)
     1207LPSTR WINAPI PathRemoveBackslashA(LPSTR lpPath)
    11561208{
    11571209        LPSTR temp = lpPath;
     
    11701222}
    11711223
    1172 ODINFUNCTION1(LPWSTR,PathRemoveBackslashW,LPWSTR,lpPath)
    1173 {
    1174     dprintf(("(%p),stub!\n", lpPath));
    1175         return lpPath;
    1176 }
    1177 
    1178 /*
    1179    shlwapi functions that have found their way in because most of
    1180    shlwapi is unimplemented and doesn't have a home.
    1181 
    1182    FIXME: move to a more appropriate file( when one exists )
    1183 */
    1184 
    1185  /* SHGetValue: Gets a value from the registry */
    1186 
    1187 ODINFUNCTION6(DWORD,SHGetValueA,HKEY,     hkey,
    1188                                 LPCSTR,   pSubKey,
    1189                                 LPCSTR,   pValue,
    1190                                 LPDWORD,  pwType,
    1191                                 LPVOID,   pvData,
    1192                                 LPDWORD,  pbData)
    1193 {
    1194     dprintf(("(%p),stub!\n", pSubKey));
    1195 
    1196         return ERROR_SUCCESS;  /* return success */
    1197 }
    1198 
    1199 ODINFUNCTION6(DWORD,SHGetValueW,HKEY,     hkey,
    1200                                 LPCWSTR,  pSubKey,
    1201                                 LPCWSTR,  pValue,
    1202                                 LPDWORD,  pwType,
    1203                                 LPVOID,   pvData,
    1204                                 LPDWORD,  pbData)
    1205 {
    1206     dprintf(("(%p),stub!\n", pSubKey));
    1207 
    1208         return ERROR_SUCCESS;  /* return success */
    1209 }
    1210 
    1211 /* gets a user-specific registry value. */
    1212 
    1213 ODINFUNCTION8(LONG,SHRegGetUSValueA,LPCSTR,   pSubKey,
    1214                                     LPCSTR,   pValue,
    1215                                     LPDWORD,  pwType,
    1216                                     LPVOID,   pvData,
    1217                                     LPDWORD,  pbData,
    1218                                     BOOL,     fIgnoreHKCU,
    1219                                     LPVOID,   pDefaultData,
    1220                                     DWORD,    wDefaultDataSize)
    1221 {
    1222     FIXME("(%p),stub!\n", pSubKey);
    1223 
    1224         return ERROR_SUCCESS;  /* return success */
    1225 }
    1226 
    1227 ODINFUNCTION8(LONG,SHRegGetUSValueW,LPCWSTR, pSubKey,
    1228                                     LPCWSTR, pValue,
    1229                                     LPDWORD, pwType,
    1230                                     LPVOID,  pvData,
    1231                                     LPDWORD, pbData,
    1232                                     BOOL,    flagIgnoreHKCU,
    1233                                     LPVOID,  pDefaultData,
    1234                                     DWORD,   wDefaultDataSize)
    1235 {
    1236     dprintf(("(%p),stub!\n", pSubKey));
    1237 
    1238         return ERROR_SUCCESS;  /* return success */
    1239 }
     1224LPWSTR WINAPI PathRemoveBackslashW(LPWSTR lpPath)
     1225{
     1226        LPWSTR temp = lpPath;
     1227        LPWSTR prev = lpPath;
     1228       
     1229        while (*temp)
     1230        {
     1231                prev = temp++;
     1232        }
     1233        if ( *prev == (WCHAR)'\\')
     1234        {
     1235                *prev = (WCHAR)'\0';
     1236        }
     1237
     1238        return prev;
     1239}
     1240
Note: See TracChangeset for help on using the changeset viewer.