Ignore:
Timestamp:
May 15, 2000, 4:43:17 AM (25 years ago)
Author:
phaller
Message:

Further SHLWAPI development

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shlwapi/shlwapi.cpp

    r3281 r3539  
    1 /* $Id: shlwapi.cpp,v 1.5 2000-03-30 15:40:43 cbratschi Exp $ */
     1/* $Id: shlwapi.cpp,v 1.6 2000-05-15 02:42:35 phaller Exp $ */
    22
    33/*
     
    3939#include <win\winerror.h>
    4040
     41
    4142ODINDEBUGCHANNEL(SHLWAPI)
    4243
    43 
    44 
    45 /*
    46    shlwapi functions that have found their way in because most of
    47    shlwapi is unimplemented and doesn't have a home.
    48 
    49    FIXME: move to a more appropriate file( when one exists )
    50 */
    51 
    52  /* SHGetValue: Gets a value from the registry */
    53 
    54 ODINFUNCTION6(DWORD,SHGetValueA,HKEY,     hkey,
    55                                 LPCSTR,   pSubKey,
    56                                 LPCSTR,   pValue,
    57                                 LPDWORD,  pwType,
    58                                 LPVOID,   pvData,
    59                                 LPDWORD,  pbData)
    60 {
    61     dprintf(("(%p),stub!\n", pSubKey));
    62 
    63         return ERROR_SUCCESS;  /* return success */
    64 }
    65 
    66 ODINFUNCTION6(DWORD,SHGetValueW,HKEY,     hkey,
    67                                 LPCWSTR,  pSubKey,
    68                                 LPCWSTR,  pValue,
    69                                 LPDWORD,  pwType,
    70                                 LPVOID,   pvData,
    71                                 LPDWORD,  pbData)
    72 {
    73     dprintf(("(%p),stub!\n", pSubKey));
    74 
    75         return ERROR_SUCCESS;  /* return success */
    76 }
    77 
    78 /* gets a user-specific registry value. */
    79 
    80 ODINFUNCTION8(LONG,SHRegGetUSValueA,LPCSTR,   pSubKey,
    81                                     LPCSTR,   pValue,
    82                                     LPDWORD,  pwType,
    83                                     LPVOID,   pvData,
    84                                     LPDWORD,  pbData,
    85                                     BOOL,     fIgnoreHKCU,
    86                                     LPVOID,   pDefaultData,
    87                                     DWORD,    wDefaultDataSize)
    88 {
    89     FIXME("(%p),stub!\n", pSubKey);
    90 
    91         return ERROR_SUCCESS;  /* return success */
    92 }
    93 
    94 ODINFUNCTION8(LONG,SHRegGetUSValueW,LPCWSTR, pSubKey,
    95                                     LPCWSTR, pValue,
    96                                     LPDWORD, pwType,
    97                                     LPVOID,  pvData,
    98                                     LPDWORD, pbData,
    99                                     BOOL,    flagIgnoreHKCU,
    100                                     LPVOID,  pDefaultData,
    101                                     DWORD,   wDefaultDataSize)
    102 {
    103     dprintf(("(%p),stub!\n", pSubKey));
    104 
    105         return ERROR_SUCCESS;  /* return success */
    106 }
    107 
    108 
    109 /*****************************************************************************
    110  * Name      : DWORD SHRegGetBoolUSValueA
    111  * Purpose   : unknown
    112  * Parameters: unknown
    113  * Variables :
    114  * Result    : unknown
    115  * Remark    : SHLWAPI.SHRegGetBoolUSValueA
    116  * Status    : UNTESTED
    117  *
    118  * Author    : Patrick Haller [Wed, 1999/12/29 23:02]
    119  *****************************************************************************/
    120 
    121 ODINFUNCTION5(LONG,    SHRegGetBoolUSValueA,
    122               LPCSTR,  pSubKey,
    123               DWORD,   arg2,
    124               DWORD,   arg3,
    125               DWORD,   arg4,
    126               DWORD,   arg5)
    127 {
    128   char  szBuffer[264];
    129   int   iLength;
    130 
    131   dprintf(("(%p),stub!\n", pSubKey));
    132 
    133   return ERROR_SUCCESS;  /* return success */
    134 }
    135 
    136 
    137 /*****************************************************************************
    138  * Name      : DWORD SHRegGetBoolUSValueW
    139  * Purpose   : unknown
    140  * Parameters: unknown
    141  * Variables :
    142  * Result    : unknown
    143  * Remark    : SHLWAPI.SHRegGetBoolUSValueW
    144  * Status    : UNTESTED
    145  *
    146  * Author    : Patrick Haller [Wed, 1999/12/29 23:02]
    147  *****************************************************************************/
    148 
    149 ODINFUNCTION5(LONG,    SHRegGetBoolUSValueW,
    150               LPCWSTR, pSubKey,
    151               DWORD,   arg2,
    152               DWORD,   arg3,
    153               DWORD,   arg4,
    154               DWORD,   arg5)
    155 {
    156   char  szBuffer[264];
    157   int   iLength;
    158 
    159   dprintf(("(%p),stub!\n", pSubKey));
    160 
    161   return ERROR_SUCCESS;  /* return success */
    162 }
    163 
    164 
    165 /*****************************************************************************
    166  * Name      : LPSTR PathSkipRootA
    167  * Purpose   : Parses a path, ignoring the drive letter or UNC server/share path parts.
    168  * Parameters: LPCSTR pszPath
    169  * Variables :
    170  * Result    : unknown
    171  * Remark    : SHLWAPI.PathSkipRootA
    172  * Status    : UNTESTED
    173  *
    174  * Author    : Patrick Haller [Mon, 2000/01/31 23:02]
    175  *****************************************************************************/
    176 
    177 ODINFUNCTION1(LPSTR, PathSkipRootA, LPCSTR, pszPath)
    178 {
    179   // check if "driveletter:\"
    180   if (pszPath[1] == ':')
    181     return (LPSTR)(pszPath + 2);
    182 
    183   // check if UNC-style path
    184   if ( (pszPath[0] == '\\') &&
    185       (pszPath[1] == '\\') )
    186   {
    187     LPSTR pszTemp = strchr(pszPath + 2, '\\');
    188     if (NULL != pszTemp)
    189       // return root part, skip server/share
    190       return (LPSTR)pszTemp++;
    191     else
    192       // UNC syntax validation, return pszPath
    193       return (LPSTR)pszTemp;
    194   }
    195 
    196   // else ...
    197   return (LPSTR)pszPath;
    198 }
    199 
    200 
    201 /*****************************************************************************
    202  * Name      : LPWSTR PathSkipRootW
    203  * Purpose   : Parses a path, ignoring the drive letter or UNC server/share path parts.
    204  * Parameters: LPCWSTR pszPath
    205  * Variables :
    206  * Result    : unknown
    207  * Remark    : SHLWAPI.PathSkipRootW
    208  * Status    : UNTESTED
    209  *
    210  * Author    : Patrick Haller [Mon, 2000/01/31 23:02]
    211  *****************************************************************************/
    212 
    213 ODINFUNCTION1(LPWSTR, PathSkipRootW, LPCWSTR, pszPath)
    214 {
    215   dprintf(("not implemented"));
    216 
    217   return (LPWSTR)pszPath;
    218 }
     44#include "shlwapi.h"
     45
     46BOOL VERSION_OsIsUnicode(VOID)
     47{
     48  return FALSE;
     49}
     50
     51
     52
     53/*****************************************************************************
     54 * Name      : ???
     55 * Purpose   : Unknown (used by explorer.exe)
     56 * Parameters: Unknown (wrong)
     57 * Variables :
     58 * Result    : Unknown
     59 * Remark    :
     60 * Status    : UNTESTED STUB
     61 *
     62 * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
     63 *****************************************************************************/
     64
     65ODINFUNCTION1(DWORD,SHLWAPI_1,DWORD,x)
     66{
     67  dprintf(("not implemented"));
     68
     69  return 0;
     70}
     71
     72
     73/*****************************************************************************
     74 * Name      : ???
     75 * Purpose   : Unknown (used by explorer.exe)
     76 * Parameters: Unknown (wrong)
     77 * Variables :
     78 * Result    : Unknown
     79 * Remark    :
     80 * Status    : UNTESTED STUB
     81 *
     82 * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
     83 *****************************************************************************/
     84
     85ODINFUNCTION1(DWORD,SHLWAPI_2,DWORD,x)
     86{
     87  dprintf(("not implemented"));
     88
     89  return 0;
     90}
     91
     92
     93/*****************************************************************************
     94 * Name      : ???
     95 * Purpose   : Unknown (used by explorer.exe)
     96 * Parameters: Unknown (wrong)
     97 * Variables :
     98 * Result    : Unknown
     99 * Remark    :
     100 * Status    : UNTESTED STUB
     101 *
     102 * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
     103 *****************************************************************************/
     104
     105ODINFUNCTION1(DWORD,SHLWAPI_5,DWORD,x)
     106{
     107  dprintf(("not implemented"));
     108
     109  return 0;
     110}
     111
     112
     113/*****************************************************************************
     114 * Name      : ???
     115 * Purpose   : Unknown (used by explorer.exe)
     116 * Parameters: Unknown (wrong)
     117 * Variables :
     118 * Result    : Unknown
     119 * Remark    :
     120 * Status    : UNTESTED STUB
     121 *
     122 * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
     123 *****************************************************************************/
     124
     125ODINFUNCTION1(DWORD,SHLWAPI_7,DWORD,x)
     126{
     127  dprintf(("not implemented"));
     128
     129  return 0;
     130}
     131
    219132
    220133/*****************************************************************************
     
    275188}
    276189
     190
     191/*****************************************************************************
     192 * Name      : ???
     193 * Purpose   : Unknown (used by explorer.exe)
     194 * Parameters: Unknown (wrong)
     195 * Variables :
     196 * Result    : Unknown
     197 * Remark    :
     198 * Status    : UNTESTED STUB
     199 *
     200 * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
     201 *****************************************************************************/
     202
     203ODINFUNCTION1(DWORD,SHLWAPI_12,DWORD,x)
     204{
     205  dprintf(("not implemented, explorer.exe will trap now"));
     206
     207  return 0;
     208}
     209
     210/*****************************************************************************
     211 * Name      : ???
     212 * Purpose   : Unknown (used by explorer.exe)
     213 * Parameters: Unknown (wrong)
     214 * Variables :
     215 * Result    : Unknown
     216 * Remark    :
     217 * Status    : UNTESTED STUB
     218 *
     219 * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
     220 *****************************************************************************/
     221
     222ODINFUNCTION1(DWORD,SHLWAPI_13,DWORD,x)
     223{
     224  dprintf(("not implemented, explorer.exe will trap now"));
     225
     226  return 0;
     227}
     228
     229
     230/*****************************************************************************
     231 * Name      : ???
     232 * Purpose   : Unknown (used by explorer.exe)
     233 * Parameters: Unknown (wrong)
     234 * Variables :
     235 * Result    : Unknown
     236 * Remark    :
     237 * Status    : UNTESTED STUB
     238 *
     239 * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
     240 *****************************************************************************/
     241
     242ODINFUNCTION1(DWORD,SHLWAPI_14,DWORD,x)
     243{
     244  dprintf(("not implemented, explorer.exe will trap now"));
     245
     246  return 0;
     247}
     248
     249
    277250/*****************************************************************************
    278251 * Name      : ???
     
    294267}
    295268
    296 /*****************************************************************************
    297  * Name      : PathStripToRootA
    298  * Purpose   : return root (used by explorer.exe)
    299  * Parameters: Unknown (wrong)
    300  * Variables :
    301  * Result    : Unknown
    302  * Remark    :
    303  * Status    : UNTESTED STUB
    304  *
    305  * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
    306  *****************************************************************************/
    307 
    308 ODINFUNCTION1(LPSTR,PathStripToRootA,LPSTR,pszPath)
    309 {
    310   dprintf(("not implemented"));
    311 
    312   return NULL;
    313 }
    314 
    315 /*****************************************************************************
    316  * Name      : PathStripToRootW
    317  * Purpose   : return root (used by explorer.exe)
    318  * Parameters: Unknown (wrong)
    319  * Variables :
    320  * Result    : Unknown
    321  * Remark    :
    322  * Status    : UNTESTED STUB
    323  *
    324  * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
    325  *****************************************************************************/
    326 
    327 ODINFUNCTION1(LPSTR,PathStripToRootW,LPSTR,pszPath)
    328 {
    329   dprintf(("not implemented"));
    330 
    331   return NULL;
    332 }
    333 
    334 /*****************************************************************************
    335  * Name      : StrToIntA
    336  * Purpose   : convert string to integer (used by explorer.exe)
    337  * Parameters: Unknown (wrong)
    338  * Variables :
    339  * Result    : Unknown
    340  * Remark    :
    341  * Status    : UNTESTED STUB
    342  *
    343  * Author    : Christoph Bratschi [Wed, 2000/03/29 19:47]
    344  *****************************************************************************/
    345 
    346 ODINFUNCTION1(INT,StrToIntA,LPSTR,pszPath)
    347 {
    348   dprintf(("not implemented"));
    349 
    350   return NULL;
    351 }
    352 
    353 /*************************************************************************
    354  * PathFindExtension [SHELL32.31]
    355  *
    356  * NOTES
    357  *     returns pointer to last . in last pathcomponent or at \0.
    358  */
    359 LPCSTR WINAPI PathFindExtensionA(LPCSTR path)
    360 {       LPCSTR   lastpoint = NULL;
    361         TRACE("%p %s\n",path,path);
    362         while (*path)
    363         { if (*path=='\\'||*path==' ')
    364             lastpoint=NULL;
    365           if (*path=='.')
    366             lastpoint=path;
    367           path++;
    368         }
    369         return lastpoint?lastpoint:path;
    370 }
    371 LPCWSTR WINAPI PathFindExtensionW(LPCWSTR path)
    372 {       LPCWSTR   lastpoint = NULL;
    373         TRACE("(%p %s)\n",path,debugstr_w(path));
    374         while (*path)
    375         { if (*path==(WCHAR)'\\'||*path==(WCHAR)' ')
    376             lastpoint=NULL;
    377           if (*path==(WCHAR)'.')
    378             lastpoint=path;
    379           path++;
    380         }
    381         return lastpoint?lastpoint:path;
    382 }
    383 
Note: See TracChangeset for help on using the changeset viewer.