Changeset 797 for trunk/src


Ignore:
Timestamp:
Sep 2, 1999, 8:18:59 PM (26 years ago)
Author:
phaller
Message:

.

Location:
trunk/src/shell32/new
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/new/shell.cpp

    r791 r797  
    3333#include "imagelist.h"
    3434
     35#include <heapstring.h>
    3536#include <misc.h>
    3637
  • trunk/src/shell32/new/shell32_main.cpp

    r791 r797  
    3232#include "wine/undocshell.h"
    3333
     34#include <heapstring.h>
    3435#include <misc.h>
    3536
  • trunk/src/shell32/new/shellord.cpp

    r791 r797  
    2424#include "wine/undocshell.h"
    2525
     26#include <heapstring.h>
    2627#include <misc.h>
    2728
     
    227228{
    228229        if (VERSION_OsIsUnicode())
    229           return OleStrToStrNW (lpOut, nOut, lpIn, nIn);
    230         return OleStrToStrNA (lpOut, nOut, lpIn, nIn);
     230          return OleStrToStrNW ((LPWSTR)lpOut, nOut, (LPCWSTR)lpIn, nIn);
     231        return OleStrToStrNA ((LPSTR)lpOut, nOut, (LPCWSTR)lpIn, nIn);
    231232}
    232233
     
    254255{
    255256        if (VERSION_OsIsUnicode())
    256           return StrToOleStrNW (lpWide, nWide, lpStr, nStr);
    257         return StrToOleStrNA (lpWide, nWide, lpStr, nStr);
     257          return StrToOleStrNW (lpWide, nWide, (LPWSTR)lpStr, nStr);
     258        return StrToOleStrNA (lpWide, nWide, (LPSTR)lpStr, nStr);
    258259}
    259260
     
    300301          pszText = (LPWSTR)idText;
    301302
    302         FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY ,szText,0,0,szTemp,256,args);
     303        FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY,
     304                szText,
     305                0,
     306                0,
     307                szTemp,
     308                256,
     309                (LPDWORD)args);
    303310        return MessageBoxW(hwnd,szTemp,szTitle,uType);
    304311}
     
    325332          pszText = (LPSTR)idText;
    326333
    327         FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY ,pszText,0,0,szTemp,256,args);
     334        FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY ,pszText,0,0,szTemp,256,(LPDWORD)args);
    328335        return MessageBoxA(hwnd,szTemp,pszTitle,uType);
    329336}
     
    432439
    433440#ifdef MEM_DEBUG
    434         ret = (LPVOID) HeapAlloc(GetProcessHeap(),0,len+6);
     441        ret = (LPBYTE) HeapAlloc(GetProcessHeap(),0,len+6);
    435442#else
    436         ret = (LPVOID) HeapAlloc(GetProcessHeap(),0,len);
     443        ret = (LPBYTE) HeapAlloc(GetProcessHeap(),0,len);
    437444#endif
    438445
     
    651658BOOL WINAPI ShellExecuteExAW (LPVOID sei)
    652659{       if (VERSION_OsIsUnicode())
    653           return ShellExecuteExW (sei);
    654         return ShellExecuteExA (sei);
     660          return ShellExecuteExW ((LPSHELLEXECUTEINFOW)sei);
     661        return ShellExecuteExA ((LPSHELLEXECUTEINFOA)sei);
    655662}
    656663/*************************************************************************
     
    691698        /* process the IDList */
    692699        if ( (sei->fMask & SEE_MASK_INVOKEIDLIST) == SEE_MASK_INVOKEIDLIST) /*0x0c*/
    693         { SHGetPathFromIDListA (sei->lpIDList,szApplicationName);
     700        { SHGetPathFromIDListA ((LPCITEMIDLIST)sei->lpIDList,szApplicationName);
    694701          TRACE("-- idlist=%p (%s)\n", sei->lpIDList, szApplicationName);
    695702        }
     
    699706            pos = strstr(szCommandline, "%I");
    700707            if (pos)
    701             { HGLOBAL hmem = SHAllocShared ( sei->lpIDList, ILGetSize(sei->lpIDList), 0);
     708            { HGLOBAL hmem = SHAllocShared ( sei->lpIDList, ILGetSize((LPCITEMIDLIST)sei->lpIDList), 0);
    702709              sprintf(szPidl,":%li",(DWORD)SHLockShared(hmem,0) );
    703710              SHUnlockShared(hmem);
     
    879886{       WARN("0x%04x %s %p %p semi-stub\n",
    880887                hkey, debugstr_w(lpszSubKey), lpszData, lpcbData);
    881         return RegQueryValueW( hkey, lpszSubKey, lpszData, lpcbData );
     888        return RegQueryValueW( hkey, lpszSubKey, lpszData, (LPLONG)lpcbData );
    882889}
    883890
     
    894901        WARN("0x%04x %s %p %p %p %p semi-stub\n",
    895902                hkey, debugstr_w(pszValue), pdwReserved, pdwType, pvData, pcbData);
    896         ret = RegQueryValueExW ( hkey, pszValue, pdwReserved, pdwType, pvData, pcbData);
     903        ret = RegQueryValueExW ( hkey, pszValue, pdwReserved, pdwType, (LPBYTE)pvData, pcbData);
    897904        return ret;
    898905}
     
    9961003            if (pidl)
    9971004            {
    998               lstrcpynAtoW((LPWSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len);
     1005              lstrcpynAtoW((LPWSTR)dest, ((LPSTR)&pidl->mkid)+src->u.uOffset, len);
    9991006            }
    10001007            break;
     
    12901297{
    12911298        if (VERSION_OsIsUnicode())
    1292           return StrToOleStrW (lpWideCharStr, lpString);
    1293         return StrToOleStrA (lpWideCharStr, lpString);
     1299          return StrToOleStrW (lpWideCharStr, (LPCWSTR)lpString);
     1300        return StrToOleStrA (lpWideCharStr, (LPCSTR)lpString);
    12941301}
    12951302
     
    13231330{
    13241331        if (VERSION_OsIsUnicode())
    1325           return DoEnvironmentSubstW(x, y);
    1326         return DoEnvironmentSubstA(x, y);
    1327 }
    1328 
     1332          return DoEnvironmentSubstW((LPWSTR)x, (LPWSTR)y);
     1333        return DoEnvironmentSubstA((LPSTR)x, (LPSTR)y);
     1334}
     1335
  • trunk/src/shell32/new/shellpath.cpp

    r791 r797  
    2121#include "shell32_main.h"
    2222
     23#include <heapstring.h>
    2324#include <misc.h>
    2425
     
    6667BOOL WINAPI PathIsRootAW(LPCVOID x)
    6768{       if (VERSION_OsIsUnicode())
    68           return PathIsRootW(x);
    69         return PathIsRootA(x);
     69          return PathIsRootW((LPWSTR)x);
     70        return PathIsRootA((LPSTR)x);
    7071
    7172}
     
    112113LPCVOID WINAPI PathFindExtensionAW(LPCVOID path)
    113114{       if (VERSION_OsIsUnicode())
    114           return PathFindExtensionW(path);
    115         return PathFindExtensionA(path);
     115          return PathFindExtensionW((LPWSTR)path);
     116        return PathFindExtensionA((LPSTR)path);
    116117
    117118}
     
    139140        TRACE("%p->%s\n",path,debugstr_w(path));
    140141
    141         len = CRTDLL_wcslen(path);
     142        len = lstrlenW(path);
    142143        if (len && path[len-1]!=(WCHAR)'\\')
    143144        { path[len]  = (WCHAR)'\\';
     
    149150LPVOID WINAPI PathAddBackslashAW(LPVOID path)
    150151{       if(VERSION_OsIsUnicode())
    151           return PathAddBackslashW(path);
    152         return PathAddBackslashA(path);
     152          return PathAddBackslashW((LPWSTR)path);
     153        return PathAddBackslashA((LPSTR)path);
    153154}
    154155
     
    179180        while (*x==' ') x++;
    180181        if (x!=str)
    181           CRTDLL_wcscpy(str,x);
     182          lstrcpyW(str,x);
    182183        if (!*str)
    183184          return str;
    184         x=str+CRTDLL_wcslen(str)-1;
     185        x=str+lstrlenW(str)-1;
    185186        while (*x==' ')
    186187          x--;
     
    191192LPVOID WINAPI PathRemoveBlanksAW(LPVOID str)
    192193{       if(VERSION_OsIsUnicode())
    193           return PathRemoveBlanksW(str);
    194         return PathRemoveBlanksA(str);
     194          return PathRemoveBlanksW((LPWSTR)str);
     195        return PathRemoveBlanksA((LPSTR)str);
    195196}
    196197
     
    231232{
    232233        if(VERSION_OsIsUnicode())
    233           return PathFindFilenameW(fn);
    234         return PathFindFilenameA(fn);
     234          return PathFindFilenameW((LPWSTR)fn);
     235        return PathFindFilenameA((LPSTR)fn);
    235236}
    236237
     
    328329       
    329330        if (!lpszFile || !lpszFile[0] || (lpszFile[0]==(WCHAR)'.' && !lpszFile[1]) )
    330         { CRTDLL_wcscpy(szDest,lpszDir);
     331        { lstrcpyW(szDest,lpszDir);
    331332          return szDest;
    332333        }
     
    334335        /*  if lpszFile is a complete path don't care about lpszDir */
    335336        if (PathIsRootW(lpszFile))
    336         { CRTDLL_wcscpy(szDest,lpszFile);
     337        { lstrcpyW(szDest,lpszFile);
    337338        }
    338339        else
    339         { CRTDLL_wcscpy(sTemp,lpszDir);
     340        { lstrcpyW(sTemp,lpszDir);
    340341          PathAddBackslashW(sTemp);
    341           CRTDLL_wcscat(sTemp,lpszFile);
    342           CRTDLL_wcscpy(szDest,sTemp);
     342          lstrcatW(sTemp,lpszFile);
     343          lstrcpyW(szDest,sTemp);
    343344        }
    344345        return szDest;
     
    346347LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile)
    347348{       if (VERSION_OsIsUnicode())
    348           return PathCombineW( szDest, lpszDir, lpszFile );
    349         return PathCombineA( szDest, lpszDir, lpszFile );
     349          return PathCombineW( (LPWSTR)szDest, (LPWSTR)lpszDir, (LPWSTR)lpszFile );
     350        return PathCombineA( (LPSTR)szDest, (LPSTR)lpszDir, (LPSTR)lpszFile );
    350351}
    351352
     
    372373BOOL WINAPI PathIsUNCAW (LPCVOID path)
    373374{       if (VERSION_OsIsUnicode())
    374           return PathIsUNCW( path );
    375         return PathIsUNCA( path );
     375          return PathIsUNCW( (LPWSTR)path );
     376        return PathIsUNCA( (LPSTR)path );
    376377}
    377378/*************************************************************************
     
    395396BOOL WINAPI PathIsRelativeAW (LPCVOID path)
    396397{       if (VERSION_OsIsUnicode())
    397           return PathIsRelativeW( path );
    398         return PathIsRelativeA( path );
     398          return PathIsRelativeW( (LPWSTR)path );
     399        return PathIsRelativeA( (LPSTR)path );
    399400}
    400401/*************************************************************************
     
    412413BOOL WINAPI PathIsExeAW (LPCVOID path)
    413414{       if (VERSION_OsIsUnicode())
    414           return PathIsExeW (path);
    415         return PathIsExeA(path);
     415          return PathIsExeW ((LPWSTR)path);
     416        return PathIsExeA((LPSTR)path);
    416417}
    417418
     
    504505BOOL WINAPI PathMatchSpecAW(LPVOID name, LPVOID mask)
    505506{       if (VERSION_OsIsUnicode())
    506           return PathMatchSpecW( name, mask );
    507         return PathMatchSpecA( name, mask );
     507          return PathMatchSpecW( (LPWSTR)name, (LPWSTR)mask );
     508        return PathMatchSpecA( (LPSTR)name, (LPSTR)mask );
    508509}
    509510/*************************************************************************
     
    523524BOOL WINAPI PathSetDlgItemPathAW(HWND hDlg, int id, LPCVOID pszPath)
    524525{       if (VERSION_OsIsUnicode())
    525           return PathSetDlgItemPathW(hDlg, id, pszPath);
    526         return PathSetDlgItemPathA(hDlg, id, pszPath);
     526          return PathSetDlgItemPathW(hDlg, id, (LPWSTR)pszPath);
     527        return PathSetDlgItemPathA(hDlg, id, (LPSTR)pszPath);
    527528}
    528529
     
    541542BOOL WINAPI PathQualifyAW(LPCVOID pszPath)
    542543{       if (VERSION_OsIsUnicode())
    543           return PathQualifyW(pszPath);
    544         return PathQualifyA(pszPath);
     544          return PathQualifyW((LPWSTR)pszPath);
     545        return PathQualifyA((LPSTR)pszPath);
    545546}
    546547
     
    591592LPCVOID WINAPI PathGetArgsAW(LPVOID cmdline)
    592593{       if (VERSION_OsIsUnicode())
    593           return PathGetArgsW(cmdline);
    594         return PathGetArgsA(cmdline);
     594          return PathGetArgsW((LPWSTR)cmdline);
     595        return PathGetArgsA((LPSTR)cmdline);
    595596}
    596597/*************************************************************************
     
    611612LPVOID WINAPI PathQuoteSpacesAW (LPCVOID fn)
    612613{       if(VERSION_OsIsUnicode())
    613           return PathQuoteSpacesW(fn);
    614         return PathQuoteSpacesA(fn);
     614          return PathQuoteSpacesW((LPWSTR)fn);
     615        return PathQuoteSpacesA((LPSTR)fn);
    615616}
    616617
     
    634635}
    635636VOID WINAPI PathUnquoteSpacesW(LPWSTR str)
    636 {       DWORD len = CRTDLL_wcslen(str);
     637{       DWORD len = lstrlenW(str);
    637638
    638639        TRACE("%s\n",debugstr_w(str));
     
    643644          return;
    644645        str[len-1]='\0';
    645         CRTDLL_wcscpy(str,str+1);
     646        lstrcpyW(str,str+1);
    646647        return;
    647648}
    648649VOID WINAPI PathUnquoteSpacesAW(LPVOID str)
    649650{       if(VERSION_OsIsUnicode())
    650           PathUnquoteSpacesW(str);
    651         PathUnquoteSpacesA(str);
     651          PathUnquoteSpacesW((LPWSTR)str);
     652        PathUnquoteSpacesA((LPSTR)str);
    652653}
    653654
     
    699700BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs)
    700701{       if (VERSION_OsIsUnicode())
    701           return PathFindOnPathW(sFile, sOtherDirs);
    702         return PathFindOnPathA(sFile, sOtherDirs);
     702          return PathFindOnPathW((LPWSTR)sFile, (LPWSTR)sOtherDirs);
     703        return PathFindOnPathA((LPSTR)sFile, (LPSTR)sOtherDirs);
    703704}
    704705
     
    721722LPCVOID WINAPI PathGetExtensionAW(LPCVOID path,DWORD y,DWORD z)
    722723{       if (VERSION_OsIsUnicode())
    723           return PathGetExtensionW(path,y,z);
    724         return PathGetExtensionA(path,y,z);
     724          return PathGetExtensionW((LPWSTR)path,y,z);
     725        return PathGetExtensionA((LPSTR)path,y,z);
    725726}
    726727
     
    744745{
    745746        if (VERSION_OsIsUnicode())
    746           return PathCleanupSpecW(x,y);
    747         return PathCleanupSpecA(x,y);
     747          return PathCleanupSpecW((LPWSTR)x,(LPWSTR)y);
     748        return PathCleanupSpecA((LPSTR)x,(LPSTR)y);
    748749}
    749750
     
    786787{
    787788        if (VERSION_OsIsUnicode())
    788           return PathProcessCommandW(lpCommand, v, w, x);
    789         return PathProcessCommandA(lpCommand, v, w, x);
     789          return PathProcessCommandW((LPWSTR)lpCommand, v, w, x);
     790        return PathProcessCommandA((LPSTR)lpCommand, v, w, x);
    790791}
    791792
     
    994995{
    995996        if (VERSION_OsIsUnicode())
    996           return SHGetSpecialFolderPathW (hwndOwner, szPath, csidl, bCreate);
    997         return SHGetSpecialFolderPathA (hwndOwner, szPath, csidl, bCreate);
    998 }
     997          return SHGetSpecialFolderPathW (hwndOwner, (LPWSTR)szPath, csidl, bCreate);
     998        return SHGetSpecialFolderPathA (hwndOwner, (LPSTR)szPath, csidl, bCreate);
     999}
Note: See TracChangeset for help on using the changeset viewer.