Changeset 5618
- Timestamp:
- Apr 28, 2001, 3:33:49 PM (24 years ago)
- Location:
- trunk/src
- Files:
-
- 5 added
- 2 deleted
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/shell32/brsfolder.c ¶
r4121 r5618 1 /* $Id: brsfolder.c,v 1.1 2000-08-30 13:52:50 sandervl Exp $ */2 #ifdef __WIN32OS2__3 #define ICOM_CINTERFACE 14 #include <odin.h>5 #endif6 1 #include <stdlib.h> 7 2 #include <string.h> … … 15 10 #include "shresdef.h" 16 11 17 DEFAULT_DEBUG_CHANNEL(shell) 12 DEFAULT_DEBUG_CHANNEL(shell); 18 13 19 14 static HWND hwndTreeView; -
TabularUnified trunk/src/shell32/dialogs.c ¶
r4121 r5618 1 /* $Id: dialogs.c,v 1. 1 2000-08-30 13:52:51sandervl Exp $ */1 /* $Id: dialogs.c,v 1.2 2001-04-28 13:33:43 sandervl Exp $ */ 2 2 /* 3 3 * common shell dialogs … … 62 62 { 63 63 TRACE("(0x%08x)\n", hWndOwner); 64 #ifdef __WIN32OS2__ 65 if (MessageBoxA( hWndOwner, "Do you want to exit Odin?", "Shutdown", MB_YESNO|MB_ICONQUESTION) == IDOK) 66 #else 64 67 if (MessageBoxA( hWndOwner, "Do you want to exit WINE?", "Shutdown", MB_YESNO|MB_ICONQUESTION) == IDOK) 68 #endif 65 69 { 66 70 SendMessageA ( hWndOwner, WM_QUIT, 0, 0); -
TabularUnified trunk/src/shell32/folders.c ¶
r4706 r5618 1 /* $Id: folders.c,v 1. 7 2000-11-28 11:00:47sandervl Exp $ */1 /* $Id: folders.c,v 1.8 2001-04-28 13:33:44 sandervl Exp $ */ 2 2 /* 3 3 * Copyright 1997 Marcus Meissner … … 410 410 411 411 if (phiconLarge) 412 *phiconLarge = pImageList_GetIcon(ShellBigIconList, nIconIndex, ILD_TRANSPARENT);412 *phiconLarge = ImageList_GetIcon(ShellBigIconList, nIconIndex, ILD_TRANSPARENT); 413 413 414 414 if (phiconSmall) 415 *phiconSmall = pImageList_GetIcon(ShellSmallIconList, nIconIndex, ILD_TRANSPARENT);415 *phiconSmall = ImageList_GetIcon(ShellSmallIconList, nIconIndex, ILD_TRANSPARENT); 416 416 417 417 return S_OK; -
TabularUnified trunk/src/shell32/iconcache.c ¶
r4691 r5618 1 /* $Id: iconcache.c,v 1. 3 2000-11-24 13:19:12sandervl Exp $ */1 /* $Id: iconcache.c,v 1.4 2001-04-28 13:33:44 sandervl Exp $ */ 2 2 /* 3 3 * shell icon cache (SIC) … … 790 790 else 791 791 { 792 index = pImageList_AddIcon (ShellSmallIconList, hSmallIcon);793 index1= pImageList_AddIcon (ShellBigIconList, hBigIcon);792 index = ImageList_AddIcon (ShellSmallIconList, hSmallIcon); 793 index1= ImageList_AddIcon (ShellBigIconList, hBigIcon); 794 794 795 795 if (index!=index1) … … 884 884 885 885 if (bSmallIcon) 886 return pImageList_GetIcon(ShellSmallIconList, index, ILD_NORMAL);887 return pImageList_GetIcon(ShellBigIconList, index, ILD_NORMAL);886 return ImageList_GetIcon(ShellSmallIconList, index, ILD_NORMAL); 887 return ImageList_GetIcon(ShellBigIconList, index, ILD_NORMAL); 888 888 889 889 } … … 912 912 } 913 913 914 ShellSmallIconList = pImageList_Create(16,16,ILC_COLORDDB | ILC_MASK,0,0x20);915 ShellBigIconList = pImageList_Create(32,32,ILC_COLORDDB | ILC_MASK,0,0x20);916 917 pImageList_SetBkColor(ShellSmallIconList, GetSysColor(COLOR_WINDOW));918 pImageList_SetBkColor(ShellBigIconList, GetSysColor(COLOR_WINDOW));914 ShellSmallIconList = ImageList_Create(16,16,ILC_COLORDDB | ILC_MASK,0,0x20); 915 ShellBigIconList = ImageList_Create(32,32,ILC_COLORDDB | ILC_MASK,0,0x20); 916 917 ImageList_SetBkColor(ShellSmallIconList, GetSysColor(COLOR_WINDOW)); 918 ImageList_SetBkColor(ShellBigIconList, GetSysColor(COLOR_WINDOW)); 919 919 920 920 for (index=1; index<46; index++) -
TabularUnified trunk/src/shell32/makefile ¶
r4719 r5618 1 # $Id: makefile,v 1.3 2 2000-12-02 23:57:22 birdExp $1 # $Id: makefile,v 1.33 2001-04-28 13:33:44 sandervl Exp $ 2 2 3 3 # … … 54 54 $(OBJDIR)\shv_item_cmenu.obj \ 55 55 $(OBJDIR)\unknown.obj \ 56 $(OBJDIR)\control.obj \ 56 57 $(OBJDIR)\misc.obj \ 57 58 $(OBJDIR)\she.obj \ -
TabularUnified trunk/src/shell32/memorystream.c ¶
r4121 r5618 1 /* $Id: memorystream.c,v 1.1 2000-08-30 13:52:52 sandervl Exp $ */2 1 /* 3 2 * this class implements a pure IStream object … … 10 9 * access in a IStream to. 11 10 */ 12 #ifdef __WIN32OS2__13 #define ICOM_CINTERFACE 114 #include <odin.h>15 #endif16 11 17 12 #include <string.h> 18 13 19 #include "wine/obj_storage.h" 14 #include "winbase.h" 15 #include "winerror.h" 16 #include "shlobj.h" 17 #include "debugtools.h" 20 18 #include "heap.h" 21 #include "winerror.h"22 #include "debugtools.h"23 19 #include "shell32_main.h" 24 20 25 DEFAULT_DEBUG_CHANNEL(shell) 21 DEFAULT_DEBUG_CHANNEL(shell); 26 22 27 23 static HRESULT WINAPI IStream_fnQueryInterface(IStream *iface, REFIID riid, LPVOID *ppvObj); -
TabularUnified trunk/src/shell32/pidl.c ¶
r4125 r5618 1 /* $Id: pidl.c,v 1.2 2000-08-30 14:18:47 sandervl Exp $ */2 1 /* 3 2 * pidl Handling … … 9 8 * 10 9 */ 11 #ifdef __WIN32OS2__12 #define ICOM_CINTERFACE 113 #include <odin.h>14 #endif15 10 16 11 #include <ctype.h> … … 19 14 #include "winbase.h" 20 15 #include "debugtools.h" 21 #include "shell.h"22 16 #include "shlguid.h" 23 17 #include "winerror.h" 24 18 #include "winnls.h" 19 #include "wine/undocshell.h" 25 20 #include "shell32_main.h" 26 21 #include "shellapi.h" 22 #include "shlwapi.h" 27 23 28 24 #include "pidl.h" 29 #include "wine/undocshell.h"30 25 31 26 DEFAULT_DEBUG_CHANNEL(pidl); 32 27 DECLARE_DEBUG_CHANNEL(shell); 33 28 34 #ifdef __WIN32OS2__ 35 #ifdef DEBUG 29 #if defined( __WIN32OS2__) && defined(DEBUG) 36 30 void pdump (LPCITEMIDLIST pidl) 37 31 { … … 44 38 /* silence the sub-functions */ 45 39 bIsShellDebug = TRACE_ON(shell); 46 __SET_DEBUGGING(__DBCL_TRACE, dbch_shell, FALSE);47 __SET_DEBUGGING(__DBCL_TRACE, dbch_pidl, FALSE);40 __SET_DEBUGGING(__DBCL_TRACE, __wine_dbch_shell, FALSE); 41 __SET_DEBUGGING(__DBCL_TRACE, __wine_dbch_pidl, FALSE); 48 42 49 43 if (! pidltemp) … … 85 79 } 86 80 87 __SET_DEBUGGING(__DBCL_TRACE, dbch_shell, bIsShellDebug); 88 __SET_DEBUGGING(__DBCL_TRACE, dbch_pidl, TRUE); 89 90 } 91 #endif //DEBUG 92 #else 93 void pdump (LPCITEMIDLIST pidl) 94 { 95 BOOL bIsShellDebug; 96 97 LPITEMIDLIST pidltemp = pidl; 98 if (!TRACE_ON(pidl)) 99 return; 100 101 /* silence the sub-functions */ 102 bIsShellDebug = TRACE_ON(shell); 103 __SET_DEBUGGING(__DBCL_TRACE, dbch_shell, FALSE); 104 __SET_DEBUGGING(__DBCL_TRACE, dbch_pidl, FALSE); 105 106 if (! pidltemp) 107 { 108 MESSAGE ("-------- pidl=NULL (Desktop)\n"); 109 } 110 else 111 { 112 MESSAGE ("-------- pidl=%p\n", pidl); 113 if (pidltemp->mkid.cb) 114 { 115 do 116 { 117 DWORD dwAttrib = 0; 118 LPPIDLDATA pData = _ILGetDataPointer(pidltemp); 119 DWORD type = pData->type; 120 LPSTR szLongName = _ILGetTextPointer(pidltemp); 121 LPSTR szShortName = _ILGetSTextPointer(pidltemp); 122 char szName[MAX_PATH]; 123 124 _ILSimpleGetText(pidltemp, szName, MAX_PATH); 125 if( PT_FOLDER == type) 126 dwAttrib = pData->u.folder.uFileAttribs; 127 else if( PT_VALUE == type) 128 dwAttrib = pData->u.file.uFileAttribs; 129 130 MESSAGE ("-- pidl=%p size=%u type=%lx attr=0x%08lx name=%s (%s,%s)\n", 131 pidltemp, pidltemp->mkid.cb,type,dwAttrib,szName,debugstr_a(szLongName), debugstr_a(szShortName)); 132 133 pidltemp = ILGetNext(pidltemp); 134 135 } while (pidltemp->mkid.cb); 136 } 137 else 138 { 139 MESSAGE ("empty pidl (Desktop)\n"); 140 } 141 pcheck(pidl); 142 } 143 144 __SET_DEBUGGING(__DBCL_TRACE, dbch_shell, bIsShellDebug); 145 __SET_DEBUGGING(__DBCL_TRACE, dbch_pidl, TRUE); 146 147 } 148 #endif //__WIN32OS2__ 149 81 __SET_DEBUGGING(__DBCL_TRACE, __wine_dbch_shell, bIsShellDebug); 82 __SET_DEBUGGING(__DBCL_TRACE, __wine_dbch_pidl, TRUE); 83 84 } 85 #endif 150 86 #define BYTES_PRINTED 32 151 87 BOOL pcheck (LPCITEMIDLIST pidl) … … 156 92 157 93 bIsPidlDebug = TRACE_ON(shell); 158 __SET_DEBUGGING(__DBCL_TRACE, dbch_pidl, FALSE);94 __SET_DEBUGGING(__DBCL_TRACE, __wine_dbch_pidl, FALSE); 159 95 160 96 if (pidltemp && pidltemp->mkid.cb) … … 175 111 case PT_COMP: 176 112 case PT_NETWORK: 113 case PT_IESPECIAL1: 114 case PT_IESPECIAL2: 177 115 case PT_SHARE: 178 case PT_IESPECIAL:179 116 break; 180 117 default: … … 202 139 } while (pidltemp->mkid.cb); 203 140 } 204 __SET_DEBUGGING(__DBCL_TRACE, dbch_pidl, bIsPidlDebug);141 __SET_DEBUGGING(__DBCL_TRACE, __wine_dbch_pidl, bIsPidlDebug); 205 142 return ret; 206 143 } … … 300 237 return pidlNew; 301 238 } 239 302 240 /************************************************************************* 303 241 * ILLoadFromStream … … 332 270 } 333 271 334 /* we are not jet fully compatible */272 /* we are not yet fully compatible */ 335 273 if (!pcheck(*ppPidl)) 336 274 { SHFree(*ppPidl); … … 343 281 return ret; 344 282 } 283 284 /************************************************************************* 285 * ILSaveToStream 286 * 287 * NOTES 288 * the first two bytes are the len, the pidl is following then 289 */ 290 HRESULT WINAPI ILSaveToStream (IStream * pStream, LPCITEMIDLIST pPidl) 291 { 292 LPITEMIDLIST pidl; 293 WORD wLen = 0; 294 HRESULT ret = E_FAIL; 295 296 TRACE_(shell)("%p %p\n", pStream, pPidl); 297 298 IStream_AddRef (pStream); 299 300 pidl = pPidl; 301 while (pidl->mkid.cb) 302 { 303 wLen += sizeof(WORD) + pidl->mkid.cb; 304 pidl = ILGetNext(pidl); 305 } 306 307 if (SUCCEEDED(IStream_Write(pStream, (LPVOID)&wLen, 2, NULL))) 308 { 309 if (SUCCEEDED(IStream_Write(pStream, pPidl, wLen, NULL))) 310 { ret = S_OK; 311 } 312 } 313 314 315 IStream_Release (pStream); 316 317 return ret; 318 } 319 345 320 /************************************************************************* 346 321 * SHILCreateFromPath [SHELL32.28] … … 357 332 TRACE_(shell)("%s %p 0x%08lx\n",path,ppidl,attributes?*attributes:0); 358 333 359 lstrcpynAtoW(lpszDisplayName, path, MAX_PATH); 334 if (!MultiByteToWideChar( CP_ACP, 0, path, -1, lpszDisplayName, MAX_PATH )) 335 lpszDisplayName[MAX_PATH-1] = 0; 360 336 361 337 if (SUCCEEDED (SHGetDesktopFolder(&sf))) … … 831 807 TRACE("path=%s\n",debugstr_w(lpszPath)); 832 808 833 lstrcpynWtoA(lpszTemp, lpszPath, MAX_PATH); 809 if (!WideCharToMultiByte( CP_ACP, 0, lpszPath, -1, lpszTemp, sizeof(lpszTemp), NULL, NULL )) 810 lpszTemp[sizeof(lpszTemp)-1] = 0; 834 811 835 812 return SHSimpleIDListFromPathA (lpszTemp); … … 994 971 pfd->dwFileAttributes = _ILGetFileAttributes(pidl, NULL, 0); 995 972 pfd->nFileSizeLow = _ILGetFileSize ( pidl, NULL, 0); 996 lstrcpynAtoW(pfd->cFileName,_ILGetTextPointer(pidl), MAX_PATH); 997 lstrcpynAtoW(pfd->cAlternateFileName,_ILGetSTextPointer(pidl), 14); 973 if (!MultiByteToWideChar( CP_ACP, 0, _ILGetTextPointer(pidl), -1, 974 pfd->cFileName, MAX_PATH )) 975 pfd->cFileName[MAX_PATH-1] = 0; 976 if (!MultiByteToWideChar( CP_ACP, 0, _ILGetSTextPointer(pidl), -1, 977 pfd->cAlternateFileName, 14 )) 978 pfd->cFileName[13] = 0; 998 979 } 999 980 return NOERROR; … … 1069 1050 1070 1051 SHGetPathFromIDListA (pidl, sTemp); 1071 lstrcpyAtoW(pszPath, sTemp);1052 MultiByteToWideChar( CP_ACP, 0, sTemp, -1, pszPath, MAX_PATH ); 1072 1053 1073 1054 TRACE_(shell)("-- (%s)\n",debugstr_w(pszPath)); … … 1292 1273 */ 1293 1274 1294 LPITEMIDLIST _ILCreate(PIDLTYPE type, LPCVOID pIn, UINT 16uInSize)1275 LPITEMIDLIST _ILCreate(PIDLTYPE type, LPCVOID pIn, UINT uInSize) 1295 1276 { 1296 1277 LPITEMIDLIST pidlOut = NULL, pidlTemp = NULL; 1297 1278 LPPIDLDATA pData; 1298 UINT 16uSize = 0;1279 UINT uSize = 0; 1299 1280 LPSTR pszDest; 1300 1281 … … 1374 1355 * strlen (lpszText) 1375 1356 */ 1376 DWORD _ILGetDrive(LPCITEMIDLIST pidl,LPSTR pOut, UINT 16uSize)1357 DWORD _ILGetDrive(LPCITEMIDLIST pidl,LPSTR pOut, UINT uSize) 1377 1358 { TRACE("(%p,%p,%u)\n",pidl,pOut,uSize); 1378 1359 … … 1474 1455 * gets the text for the first item in the pidl (eg. simple pidl) 1475 1456 * 1476 * returns the leng htof the string1457 * returns the length of the string 1477 1458 */ 1478 1459 DWORD _ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize) … … 1569 1550 case PT_FOLDER1: 1570 1551 case PT_VALUE: 1571 case PT_IESPECIAL: 1552 case PT_IESPECIAL1: 1553 case PT_IESPECIAL2: 1572 1554 return (LPSTR)&(pdata->u.file.szNames); 1573 1555 … … 1597 1579 case PT_FOLDER: 1598 1580 case PT_VALUE: 1599 case PT_IESPECIAL: 1581 case PT_IESPECIAL1: 1582 case PT_IESPECIAL2: 1600 1583 return (LPSTR)(pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1); 1601 1584 -
TabularUnified trunk/src/shell32/pidl.h ¶
r4121 r5618 1 /* $Id: pidl.h,v 1.6 2000-08-30 13:50:55 sandervl Exp $ */2 1 /* 3 2 * internal pidl functions … … 76 75 #define PT_COMP 0x42 77 76 #define PT_NETWORK 0x47 78 #define PT_IESPECIAL 0xb1 77 #define PT_IESPECIAL1 0x61 78 #define PT_IESPECIAL2 0xb1 79 79 #define PT_SHARE 0xc3 80 80 … … 129 129 130 130 BOOL _ILGetFileDateTime (LPCITEMIDLIST pidl, FILETIME *ft); 131 DWORD _ILGetDrive (LPCITEMIDLIST, LPSTR, UINT 16);131 DWORD _ILGetDrive (LPCITEMIDLIST, LPSTR, UINT); 132 132 133 133 /* … … 145 145 * simple pidls from strings 146 146 */ 147 LPITEMIDLIST _ILCreate (PIDLTYPE,LPCVOID,UINT 16);147 LPITEMIDLIST _ILCreate (PIDLTYPE,LPCVOID,UINT); 148 148 149 149 LPITEMIDLIST _ILCreateDesktop (void); … … 170 170 * debug helper 171 171 */ 172 #ifdef __WIN32OS2__173 #ifdef DEBUG174 void pdump (LPCITEMIDLIST pidl);175 #else176 #define pdump(pidl)177 #endif178 //CB: needed in release build179 BOOL pcheck (LPCITEMIDLIST pidl);180 #else181 172 void pdump (LPCITEMIDLIST pidl); 182 173 BOOL pcheck (LPCITEMIDLIST pidl); 183 #endif184 174 185 175 /* -
TabularUnified trunk/src/shell32/sh.cpp ¶
r4032 r5618 1 /* $Id: sh.cpp,v 1.1 1 2000-08-18 02:01:18 phallerExp $ */1 /* $Id: sh.cpp,v 1.12 2001-04-28 13:33:45 sandervl Exp $ */ 2 2 3 3 /* … … 320 320 } 321 321 322 323 /*****************************************************************************324 * Name : HRESULT SHRegDeleteKeyA325 * Purpose :326 * Parameters:327 * Variables :328 * Result :329 * Remark : SHELL32.513330 * Status : UNTESTED STUB331 *332 * Author : Patrick Haller [Tue, 1999/06/09 20:02]333 *****************************************************************************/334 335 ODINFUNCTION2(HRESULT, SHRegDeleteKeyA,336 HKEY, hkey,337 LPSTR, lpszKey)338 {339 return RegDeleteKeyA(hkey,340 lpszKey);341 }342 -
TabularUnified trunk/src/shell32/shell32.def ¶
r4809 r5618 1 ; $Id: shell32.def,v 1.3 4 2000-12-16 22:53:43 birdExp $1 ; $Id: shell32.def,v 1.35 2001-04-28 13:33:45 sandervl Exp $ 2 2 3 3 ; Based on Windows 95 … … 80 80 Shell_GetImageList = _Shell_GetImageList@8 @71 81 81 Shell_GetCachedImageIndex = _Shell_GetCachedImageIndexAW@12 @72 82 Shell_GetCachedImageIndexW = _Shell_GetCachedImageIndexW@12 83 Shell_GetCachedImageIndexA = _Shell_GetCachedImageIndexA@12 82 Shell_GetCachedImageIndexW = _Shell_GetCachedImageIndexW@12 @1572 83 Shell_GetCachedImageIndexA = _Shell_GetCachedImageIndexA@12 @1573 84 84 SHShellFolderView_Message = _SHShellFolderView_Message@12 @73 85 85 SHCreateStdEnumFmtEtc = _SHCreateStdEnumFmtEtc@12 @74 … … 176 176 SHCreateDirectory = _SHCreateDirectory@8 @165 177 177 ; CallCPLEntry16 = _CallCPLEntry16@? @166 178 ; SHAddFromPropSheetExtArray = _SHAddFromPropSheetExtArray@?@167179 ; SHCreatePropSheetExtArray = _SHCreatePropSheetExtArray@?@168180 ; SHDestroyPropSheetExtArray = _SHDestroyPropSheetExtArray@?@169181 ; SHReplaceFromPropSheetExtArray = _SHReplaceFromPropSheetExtArray@?@170178 SHAddFromPropSheetExtArray = _SHAddFromPropSheetExtArray@12 @167 179 SHCreatePropSheetExtArray = _SHCreatePropSheetExtArray@12 @168 180 SHDestroyPropSheetExtArray = _SHDestroyPropSheetExtArray@4 @169 181 SHReplaceFromPropSheetExtArray = _SHReplaceFromPropSheetExtArray@16 @170 182 182 PathCleanupSpec = _PathCleanupSpecAW@8 @171 183 183 ; SHCreateLinks = _SHCreateLinks@? @172 … … 320 320 StrCpyNA = _lstrcpynA@12 @309 321 321 StrCpyNW = _lstrcpynW@12 @310 322 ; StrNCmpA = _StrNCmpA@?@311323 ; StrNCmpIA = _StrNCmpIA@?@312324 ; StrNCmpIW = _StrNCmpIW@?@313325 ; StrNCmpW = _StrNCmpW@?@314322 StrNCmpA = _StrCmpNA@12 @311 323 StrNCmpIA = _StrCmpNIA@12 @312 324 StrNCmpIW = _StrCmpNIW@12 @313 325 StrNCmpW = _StrCmpNW@12 @314 326 326 StrNCpyA = _lstrcpynA@12 @315 327 327 StrNCpyW = _lstrcpynW@12 @316 328 328 StrRChrA = _StrRChrA@12 @317 329 ; StrRChrIA = _StrRChrIA@?@318330 ; StrRChrIW = _StrRChrIW@?@319329 ; StrRChrIA = _StrRChrIA@8 @318 330 ; StrRChrIW = _StrRChrIW@8 @319 331 331 StrRChrW = _StrRChrW@12 @320 332 332 ; StrRStrA = _StrRStrA@? @321 333 ; StrRStrIA = _StrRStrIA@?@322334 ; StrRStrIW = _StrRStrIW@?@323333 ; StrRStrIA = _StrRStrIA@8 @322 334 ; StrRStrIW = _StrRStrIW@8 @323 335 335 ; StrRStrW = _StrRStrW@? @324 336 336 StrStrA = _StrStrA@8 @325 … … 349 349 SHRegDeleteKeyA = _SHRegDeleteKeyA@8 @513 ;? 350 350 SHAllocShared = _SHAllocShared@12 @520 351 SHInitRestricted = _SHInitRestricted@8 351 SHInitRestricted = _SHInitRestricted@8 @1521 352 352 SHLockShared = _SHLockShared@8 @521 353 353 SHUnlockShared = _SHUnlockShared@4 @522 … … 377 377 SHGetSpecialFolderPathA = _SHGetSpecialFolderPathA@16 @690 378 378 379 SHGetSettings = _SHGetSettings@ 12@691379 SHGetSettings = _SHGetSettings@8 @691 380 380 381 381 ; … … 390 390 391 391 DllGetVersion = _SHELL32_DllGetVersion@4 @1220 392 DllCanUnloadNow = _SHELL32_DllCanUnloadNow@0 @1221 392 393 393 394 _StrFormatByteSizeA@12 @1041 -
TabularUnified trunk/src/shell32/shell32_main.c ¶
r4121 r5618 1 /* $Id: shell32_main.c,v 1. 1 2000-08-30 13:52:54sandervl Exp $ */1 /* $Id: shell32_main.c,v 1.2 2001-04-28 13:33:45 sandervl Exp $ */ 2 2 /* 3 3 * Shell basics … … 89 89 } 90 90 91 /*************************************************************************92 * Control_RunDLL [SHELL32.12]93 *94 * Wild speculation in the following!95 *96 * http://premium.microsoft.com/msdn/library/techart/msdn193.htm97 */98 99 void WINAPI Control_RunDLL( HWND hwnd, LPCVOID code, LPCSTR cmd, DWORD arg4 )100 {101 FIXME("(0x%08x, %p, %s, 0x%08lx): stub\n", hwnd, code,102 debugstr_a(cmd), arg4);103 }104 91 105 92 /************************************************************************* … … 130 117 psfi->szTypeName[0] = '\0'; 131 118 psfi->iIcon = 0; 119 120 if (flags & SHGFI_EXETYPE) { 121 BOOL status = FALSE; 122 HANDLE hfile; 123 DWORD BinaryType; 124 IMAGE_DOS_HEADER mz_header; 125 IMAGE_NT_HEADERS nt; 126 DWORD len; 127 char magic[4]; 128 129 if (flags != SHGFI_EXETYPE) return 0; 130 131 status = GetBinaryTypeA (path, &BinaryType); 132 if (!status) return 0; 133 if ((BinaryType == SCS_DOS_BINARY) 134 || (BinaryType == SCS_PIF_BINARY)) return 0x4d5a; 135 136 hfile = CreateFileA( path, GENERIC_READ, FILE_SHARE_READ, 137 NULL, OPEN_EXISTING, 0, 0 ); 138 if ( hfile == INVALID_HANDLE_VALUE ) return 0; 139 140 /* The next section is adapted from MODULE_GetBinaryType, as we need 141 * to examine the image header to get OS and version information. We 142 * know from calling GetBinaryTypeA that the image is valid and either 143 * an NE or PE, so much error handling can be omitted. 144 * Seek to the start of the file and read the header information. 145 */ 146 147 SetFilePointer( hfile, 0, NULL, SEEK_SET ); 148 ReadFile( hfile, &mz_header, sizeof(mz_header), &len, NULL ); 149 150 SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET ); 151 ReadFile( hfile, magic, sizeof(magic), &len, NULL ); 152 if ( *(DWORD*)magic == IMAGE_NT_SIGNATURE ) 153 { 154 SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET ); 155 ReadFile( hfile, &nt, sizeof(nt), &len, NULL ); 156 CloseHandle( hfile ); 157 if (nt.OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI) { 158 return IMAGE_NT_SIGNATURE 159 | (nt.OptionalHeader.MajorSubsystemVersion << 24) 160 | (nt.OptionalHeader.MinorSubsystemVersion << 16); 161 } 162 return IMAGE_NT_SIGNATURE; 163 } 164 else if ( *(WORD*)magic == IMAGE_OS2_SIGNATURE ) 165 { 166 IMAGE_OS2_HEADER ne; 167 SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET ); 168 ReadFile( hfile, &ne, sizeof(ne), &len, NULL ); 169 CloseHandle( hfile ); 170 if (ne.ne_exetyp == 2) return IMAGE_OS2_SIGNATURE 171 | (ne.ne_expver << 16); 172 return 0; 173 } 174 CloseHandle( hfile ); 175 return 0; 176 } 177 132 178 133 179 /* translate the path into a pidl only when SHGFI_USEFILEATTRIBUTES in not specified … … 259 305 /* icon handle */ 260 306 if (SUCCEEDED(hr) && (flags & SHGFI_ICON)) 261 psfi->hIcon = pImageList_GetIcon((flags & SHGFI_LARGEICON) ? ShellBigIconList:ShellSmallIconList, psfi->iIcon, ILD_NORMAL); 262 263 264 if (flags & SHGFI_EXETYPE) 265 FIXME("type of executable, stub\n"); 307 psfi->hIcon = ImageList_GetIcon((flags & SHGFI_LARGEICON) ? ShellBigIconList:ShellSmallIconList, psfi->iIcon, ILD_NORMAL); 266 308 267 309 if (flags & (SHGFI_UNKNOWN1 | SHGFI_UNKNOWN2 | SHGFI_UNKNOWN3)) … … 280 322 #endif 281 323 return ret; 282 } 283 324 } 284 325 /************************************************************************* 285 326 * SHGetFileInfoW [SHELL32.@] … … 289 330 SHFILEINFOW *psfi, UINT sizeofpsfi, 290 331 UINT flags ) 291 { FIXME("(%s,0x%lx,%p,0x%x,0x%x)\n", 292 debugstr_w(path),dwFileAttributes,psfi,sizeofpsfi,flags); 293 return 0; 332 { 333 INT len; 334 LPSTR temppath; 335 DWORD ret; 336 SHFILEINFOA temppsfi; 337 338 len = WideCharToMultiByte(CP_ACP, 0, path, -1, NULL, 0, NULL, NULL); 339 temppath = HeapAlloc(GetProcessHeap(), 0, len); 340 WideCharToMultiByte(CP_ACP, 0, path, -1, temppath, len, NULL, NULL); 341 342 WideCharToMultiByte(CP_ACP, 0, psfi->szDisplayName, -1, temppsfi.szDisplayName, 343 sizeof(temppsfi.szDisplayName), NULL, NULL); 344 WideCharToMultiByte(CP_ACP, 0, psfi->szTypeName, -1, temppsfi.szTypeName, 345 sizeof(temppsfi.szTypeName), NULL, NULL); 346 347 ret = SHGetFileInfoA(temppath, dwFileAttributes, &temppsfi, sizeof(temppsfi), flags); 348 349 HeapFree(GetProcessHeap(), 0, temppath); 350 351 return ret; 294 352 } 295 353 … … 808 866 * 809 867 */ 810 void (* WINAPI pDLLInitComctl)(LPVOID); 811 INT (* WINAPI pImageList_AddIcon) (HIMAGELIST himl, HICON hIcon); 812 INT (* WINAPI pImageList_ReplaceIcon) (HIMAGELIST, INT, HICON); 813 HIMAGELIST (* WINAPI pImageList_Create) (INT,INT,UINT,INT,INT); 814 BOOL (* WINAPI pImageList_Draw) (HIMAGELIST himl, int i, HDC hdcDest, int x, int y, UINT fStyle); 815 HICON (* WINAPI pImageList_GetIcon) (HIMAGELIST, INT, UINT); 816 INT (* WINAPI pImageList_GetImageCount)(HIMAGELIST); 817 COLORREF (* WINAPI pImageList_SetBkColor)(HIMAGELIST, COLORREF); 868 void (* WINAPI pDLLInitComctl)(LPVOID); 818 869 819 870 LPVOID (* WINAPI pCOMCTL32_Alloc) (INT); 820 871 BOOL (* WINAPI pCOMCTL32_Free) (LPVOID); 821 872 822 HDPA (* WINAPI pDPA_Create) (INT);823 INT (* WINAPI pDPA_InsertPtr) (const HDPA, INT, LPVOID);824 BOOL (* WINAPI pDPA_Sort) (const HDPA, PFNDPACOMPARE, LPARAM);825 LPVOID (* WINAPI pDPA_GetPtr) (const HDPA, INT);826 BOOL (* WINAPI pDPA_Destroy) (const HDPA);827 INT (* WINAPI pDPA_Search) (const HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT);828 LPVOID (* WINAPI pDPA_DeletePtr) (const HDPA hdpa, INT i);829 830 /* user32 */831 HICON (* WINAPI pLookupIconIdFromDirectoryEx)(LPBYTE dir, BOOL bIcon, INT width, INT height, UINT cFlag);832 HICON (* WINAPI pCreateIconFromResourceEx)(LPBYTE bits,UINT cbSize, BOOL bIcon, DWORD dwVersion, INT width, INT height,UINT cFlag);833 834 873 static HINSTANCE hComctl32; 835 874 static INT shell32_RefCount = 0; … … 837 876 LONG shell32_ObjCount = 0; 838 877 HINSTANCE shell32_hInstance = 0; 839 HMODULE huser32 = 0;840 878 HIMAGELIST ShellSmallIconList = 0; 841 879 HIMAGELIST ShellBigIconList = 0; … … 861 899 shell32_hInstance = hinstDLL; 862 900 hComctl32 = GetModuleHandleA("COMCTL32.DLL"); 863 if(!huser32) huser32 = GetModuleHandleA("USER32.DLL");864 901 DisableThreadLibraryCalls(shell32_hInstance); 865 902 866 if (!hComctl32 || !huser32)903 if (!hComctl32) 867 904 { 868 905 ERR("P A N I C SHELL32 loading failed\n"); … … 871 908 872 909 /* comctl32 */ 873 pDLLInitComctl=(void*)GetProcAddress(hComctl32,"InitCommonControlsEx");874 pImageList_Create=(void*)GetProcAddress(hComctl32,"ImageList_Create");875 pImageList_AddIcon=(void*)GetProcAddress(hComctl32,"ImageList_AddIcon");876 pImageList_ReplaceIcon=(void*)GetProcAddress(hComctl32,"ImageList_ReplaceIcon");877 pImageList_GetIcon=(void*)GetProcAddress(hComctl32,"ImageList_GetIcon");878 pImageList_GetImageCount=(void*)GetProcAddress(hComctl32,"ImageList_GetImageCount");879 pImageList_Draw=(void*)GetProcAddress(hComctl32,"ImageList_Draw");880 pImageList_SetBkColor=(void*)GetProcAddress(hComctl32,"ImageList_SetBkColor");881 910 pCOMCTL32_Alloc=(void*)GetProcAddress(hComctl32, (LPCSTR)71L); 882 911 pCOMCTL32_Free=(void*)GetProcAddress(hComctl32, (LPCSTR)73L); 883 pDPA_Create=(void*)GetProcAddress(hComctl32, (LPCSTR)328L);884 pDPA_Destroy=(void*)GetProcAddress(hComctl32, (LPCSTR)329L);885 pDPA_GetPtr=(void*)GetProcAddress(hComctl32, (LPCSTR)332L);886 pDPA_InsertPtr=(void*)GetProcAddress(hComctl32, (LPCSTR)334L);887 pDPA_DeletePtr=(void*)GetProcAddress(hComctl32, (LPCSTR)336L);888 pDPA_Sort=(void*)GetProcAddress(hComctl32, (LPCSTR)338L);889 pDPA_Search=(void*)GetProcAddress(hComctl32, (LPCSTR)339L);890 /* user32 */891 pLookupIconIdFromDirectoryEx=(void*)GetProcAddress(huser32,"LookupIconIdFromDirectoryEx");892 pCreateIconFromResourceEx=(void*)GetProcAddress(huser32,"CreateIconFromResourceEx");893 912 894 913 /* initialize the common controls */ 895 if (pDLLInitComctl) 896 { 897 pDLLInitComctl(NULL); 898 } 914 InitCommonControlsEx(NULL); 899 915 900 916 SIC_Initialize(); -
TabularUnified trunk/src/shell32/shell32_main.h ¶
r5576 r5618 1 /* $Id: shell32_main.h,v 1. 8 2001-04-23 10:47:23sandervl Exp $ */1 /* $Id: shell32_main.h,v 1.9 2001-04-28 13:33:45 sandervl Exp $ */ 2 2 /* 3 3 * internal Shell32 Library definitions … … 17 17 #include "wine/obj_shelllink.h" 18 18 #include "wine/obj_extracticon.h" 19 #include "wine/obj_oleview.h" 19 20 #ifdef __WIN32OS2__ 20 21 #include <heapstring.h> … … 35 36 * pointer to functions dynamically loaded 36 37 */ 37 extern void (* WINAPI pDLLInitComctl)(LPVOID);38 extern INT (* WINAPI pImageList_AddIcon) (HIMAGELIST himl, HICON hIcon);39 extern INT (* WINAPI pImageList_ReplaceIcon) (HIMAGELIST, INT, HICON);40 extern HIMAGELIST (* WINAPI pImageList_Create) (INT,INT,UINT,INT,INT);41 extern BOOL (* WINAPI pImageList_Draw) (HIMAGELIST himl, int i, HDC hdcDest, int x, int y, UINT fStyle);42 extern HICON (* WINAPI pImageList_GetIcon) (HIMAGELIST, INT, UINT);43 extern INT (* WINAPI pImageList_GetImageCount)(HIMAGELIST);44 extern COLORREF (* WINAPI pImageList_SetBkColor)(HIMAGELIST, COLORREF);45 46 38 extern LPVOID (* WINAPI pCOMCTL32_Alloc) (INT); 47 39 extern BOOL (* WINAPI pCOMCTL32_Free) (LPVOID); 48 40 49 extern HDPA (* WINAPI pDPA_Create) (INT); 50 extern INT (* WINAPI pDPA_InsertPtr) (const HDPA, INT, LPVOID); 51 extern BOOL (* WINAPI pDPA_Sort) (const HDPA, PFNDPACOMPARE, LPARAM); 52 extern LPVOID (* WINAPI pDPA_GetPtr) (const HDPA, INT); 53 extern BOOL (* WINAPI pDPA_Destroy) (const HDPA); 54 extern INT (* WINAPI pDPA_Search) (const HDPA, LPVOID, INT, PFNDPACOMPARE, LPARAM, UINT); 55 extern LPVOID (* WINAPI pDPA_DeletePtr) (const HDPA hdpa, INT i); 41 #define pDPA_Create DPA_Create 42 #define pDPA_InsertPtr DPA_InsertPtr 43 #define pDPA_Sort DPA_Sort 44 #define pDPA_GetPtr DPA_GetPtr 45 #define pDPA_Destroy DPA_Destroy 46 #define pDPA_Search DPA_Search 47 #define pDPA_DeletePtr DPA_DeletePtr 48 56 49 #define pDPA_GetPtrCount(hdpa) (*(INT*)(hdpa)) 57 50 58 extern HICON (* WINAPI pLookupIconIdFromDirectoryEx)(LPBYTE dir, BOOL bIcon, INT width, INT height, UINT cFlag); 59 extern HICON (* WINAPI pCreateIconFromResourceEx)(LPBYTE bits,UINT cbSize, BOOL bIcon, DWORD dwVersion, INT width, INT height,UINT cFlag); 51 #define pLookupIconIdFromDirectoryEx LookupIconIdFromDirectoryEx 52 #define pCreateIconFromResourceEx CreateIconFromResourceEx 60 53 61 54 /* ole2 */ … … 68 61 */ 69 62 BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList); 70 71 HRESULT WINAPI StrRetToStrNA (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl);72 HRESULT WINAPI StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl);73 HRESULT WINAPI StrRetToStrN (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl);74 63 75 64 /* Iconcache */ -
TabularUnified trunk/src/shell32/shellfolder.h ¶
r4121 r5618 1 /* $Id: shellfolder.h,v 1.2 2000-08-30 13:50:58 sandervl Exp $ */2 1 /* 3 2 * defines helperfunctions to manipulate the contents of a IShellFolder … … 9 8 10 9 #include "winbase.h" 11 #include "shell.h"12 10 13 11 #include "wine/obj_base.h" -
TabularUnified trunk/src/shell32/shellguid.c ¶
r4121 r5618 1 /* $Id: shellguid.c,v 1. 1 2000-08-30 13:52:55sandervl Exp $ */1 /* $Id: shellguid.c,v 1.2 2001-04-28 13:33:46 sandervl Exp $ */ 2 2 /* 3 3 * Shell UID … … 22 22 #include "shlobj.h" 23 23 #include "docobj.h" 24 #include "shellfolder.h" -
TabularUnified trunk/src/shell32/shelllink.c ¶
r4561 r5618 1 /* $Id: shelllink.c,v 1.2 2000-11-06 10:20:56 sandervl Exp $ */2 1 /* 3 2 * … … 6 5 * 7 6 */ 8 #ifdef __WIN32OS2__ 9 #define ICOM_CINTERFACE 1 10 #include <odin.h> 11 #endif 7 8 #include "config.h" 12 9 13 10 #include <string.h> … … 18 15 #endif 19 16 #include <errno.h> 20 #if ndef __WIN32OS2__21 # include <sys/wait.h>17 #ifdef HAVE_SYS_WAIT_H 18 # include <sys/wait.h> 22 19 #endif 23 24 20 #include "debugtools.h" 25 21 #include "winerror.h" 26 22 #include "winbase.h" 27 23 #include "winnls.h" 24 #include "winreg.h" 28 25 29 26 #include "shlobj.h" 30 #include "wine/winestring.h"31 27 #include "wine/undocshell.h" 32 28 #ifndef __WIN32OS2__ … … 38 34 #include "shell32_main.h" 39 35 #include "shlguid.h" 40 #include "file.h"41 #include "options.h"42 36 43 37 DEFAULT_DEBUG_CHANNEL(shell); … … 355 349 356 350 if (!(hModule = LoadLibraryExA(szFileName, 0, LOAD_LIBRARY_AS_DATAFILE))) 351 { 352 TRACE("LoadLibraryExA (%s) failed, error %ld\n", szFileName, GetLastError()); 357 353 goto error1; 354 } 358 355 359 356 if (nIndex) 357 { 360 358 hResInfo = FindResourceA(hModule, MAKEINTRESOURCEA(nIndex), RT_GROUP_ICONA); 359 TRACE("FindResourceA (%s) called, return 0x%x, error %ld\n", szFileName, hResInfo, GetLastError()); 360 } 361 361 else 362 362 if (EnumResourceNamesA(hModule, RT_GROUP_ICONA, &EnumResNameProc, (LONG) &hResInfo)) 363 { 364 TRACE("EnumResourceNamesA failed, error %ld\n", GetLastError()); 363 365 goto error2; 366 } 364 367 365 368 if (!hResInfo) 369 { 370 TRACE("ExtractFromEXEDLL failed, error %ld\n", GetLastError()); 366 371 goto error2; 372 } 367 373 368 374 if (!(hResData = LoadResource(hModule, hResInfo))) 375 { 376 TRACE("LoadResource failed, error %ld\n", GetLastError()); 369 377 goto error2; 378 } 370 379 if (!(pIconDir = LockResource(hResData))) 380 { 381 TRACE("LockResource failed, error %ld\n", GetLastError()); 371 382 goto error3; 383 } 372 384 373 385 for (i = 0; i < pIconDir->idCount; i++) … … 381 393 382 394 if (!(hResInfo = FindResourceA(hModule, lpName, RT_ICONA))) 395 { 396 TRACE("Second FindResourceA failed, error %ld\n", GetLastError()); 383 397 goto error2; 398 } 384 399 if (!(hResData = LoadResource(hModule, hResInfo))) 400 { 401 TRACE("Second LoadResource failed, error %ld\n", GetLastError()); 385 402 goto error2; 403 } 386 404 if (!(pIcon = LockResource(hResData))) 405 { 406 TRACE("Second LockResource failed, error %ld\n", GetLastError()); 387 407 goto error3; 408 } 388 409 389 410 if(!SaveIconResAsXPM(pIcon, szXPMFileName)) 411 { 412 TRACE("Failed saving icon as XPM, error %ld\n", GetLastError()); 390 413 goto error3; 414 } 391 415 392 416 FreeResource(hResData); … … 461 485 inline static char *get_unix_file_name( const char *dos ) 462 486 { 463 DOS_FULL_NAME path;464 465 if (! DOSFS_GetFullName( dos, FALSE, &path)) return NULL;466 return HEAP_strdupA( GetProcessHeap(), 0, path.long_name);487 char buffer[MAX_PATH]; 488 489 if (!wine_get_unix_file_name( dos, buffer, sizeof(buffer) )) return NULL; 490 return HEAP_strdupA( GetProcessHeap(), 0, buffer ); 467 491 } 468 492 … … 491 515 return NULL; 492 516 } 493 #endif //#ifndef __WIN32OS2__ 494 517 #endif //__WIN32OS2__ 495 518 496 519 static HRESULT WINAPI IPersistFile_fnSave(IPersistFile* iface, LPCOLESTR pszFileName, BOOL fRemember) … … 505 528 char *work_dir = NULL; 506 529 BOOL bDesktop; 530 HKEY hkey; 507 531 508 532 _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); … … 522 546 return NOERROR; 523 547 #else 524 PROFILE_GetWineIniString( "wine", "ShellLinker", "", buffer, sizeof(buffer) ); 548 buffer[0] = 0; 549 if (!RegOpenKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\Wine", 550 0, KEY_ALL_ACCESS, &hkey )) 551 { 552 DWORD type, count = sizeof(buffer); 553 if (RegQueryValueExA( hkey, "ShellLinker", 0, &type, buffer, &count )) buffer[0] = 0; 554 RegCloseKey( hkey ); 555 } 525 556 if (!*buffer) return NOERROR; 526 557 shell_link_app = HEAP_strdupA( GetProcessHeap(), 0, buffer ); … … 571 602 572 603 /* extract the icon */ 573 if (!(icon_name = extract_icon( This->sIcoPath ? This->sIcoPath : This->sPath, 574 This->iIcoNdx ))) goto done; 604 if (!(icon_name = extract_icon( This->sIcoPath && strlen(This->sIcoPath) ? 605 This->sIcoPath : This->sPath, 606 This->iIcoNdx ))) goto done; 607 575 608 576 609 TRACE("linker app='%s' link='%s' mode=%s path='%s' args='%s' icon='%s' workdir='%s' descr='%s'\n", … … 590 623 argv[pos++] = path_name; 591 624 argv[pos++] = bDesktop ? "--desktop" : "--menu"; 592 if (This->sArgs )625 if (This->sArgs && strlen(This->sArgs)) 593 626 { 594 627 argv[pos++] = "--args"; … … 600 633 argv[pos++] = icon_name; 601 634 } 602 if (This->sWorkDir )635 if (This->sWorkDir && strlen(This->sWorkDir)) 603 636 { 604 637 argv[pos++] = "--workdir"; 605 638 argv[pos++] = This->sWorkDir; 606 639 } 607 if (This->sDescription )640 if (This->sDescription && strlen(This->sDescription)) 608 641 { 609 642 argv[pos++] = "--descr"; … … 633 666 HeapFree( GetProcessHeap(), 0, work_dir ); 634 667 return ret; 635 #endif //__WIN32OS2__668 #endif 636 669 } 637 670 … … 1020 1053 ICOM_THIS(IShellLinkImpl, iface); 1021 1054 1022 FIXME("(%p)->()\n",This); 1023 lstrcpynA(pszDir,"c:\\", cchMaxPath); 1055 TRACE("(%p)->(%p len=%u)\n", This, pszDir, cchMaxPath); 1056 1057 lstrcpynA( pszDir, This->sWorkDir ? This->sWorkDir : "", cchMaxPath ); 1058 1024 1059 return NOERROR; 1025 1060 } … … 1041 1076 ICOM_THIS(IShellLinkImpl, iface); 1042 1077 1043 FIXME("(%p)->(%p len=%u)\n",This, pszArgs, cchMaxPath); 1044 lstrcpynA(pszArgs, "", cchMaxPath); 1078 TRACE("(%p)->(%p len=%u)\n", This, pszArgs, cchMaxPath); 1079 1080 lstrcpynA( pszArgs, This->sArgs ? This->sArgs : "", cchMaxPath ); 1081 1045 1082 return NOERROR; 1046 1083 } … … 1097 1134 ICOM_THIS(IShellLinkImpl, iface); 1098 1135 1099 FIXME("(%p)->(%p len=%u iicon=%p)\n",This, pszIconPath, cchIconPath, piIcon); 1100 lstrcpynA(pszIconPath,"shell32.dll",cchIconPath); 1101 *piIcon=1; 1136 TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon); 1137 1138 lstrcpynA( pszIconPath, This->sIcoPath ? This->sIcoPath : "", cchIconPath ); 1139 *piIcon = This->iIcoNdx; 1140 1102 1141 return NOERROR; 1103 1142 } … … 1215 1254 1216 1255 FIXME("(%p)->(pfile=%p len=%u find_data=%p flags=%lu)\n",This, pszFile, cchMaxPath, pfd, fFlags); 1217 lstrcpynAtoW(pszFile,"c:\\foo.bar", cchMaxPath);1256 MultiByteToWideChar( CP_ACP, 0, "c:\\foo.bar", -1, pszFile, cchMaxPath ); 1218 1257 return NOERROR; 1219 1258 } … … 1241 1280 1242 1281 FIXME("(%p)->(%p len=%u)\n",This, pszName, cchMaxName); 1243 lstrcpynAtoW(pszName,"Description, FIXME",cchMaxName);1282 MultiByteToWideChar( CP_ACP, 0, "Description, FIXME", -1, pszName, cchMaxName ); 1244 1283 return NOERROR; 1245 1284 } … … 1263 1302 _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); 1264 1303 1265 FIXME("(%p)->()\n",This); 1266 lstrcpynAtoW(pszDir,"c:\\", cchMaxPath); 1304 TRACE("(%p)->(%p len %u)\n", This, pszDir, cchMaxPath); 1305 1306 MultiByteToWideChar( CP_ACP, 0, This->sWorkDir ? This->sWorkDir : "", -1, pszDir, cchMaxPath ); 1307 1267 1308 return NOERROR; 1268 1309 } … … 1286 1327 _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); 1287 1328 1288 FIXME("(%p)->(%p len=%u)\n",This, pszArgs, cchMaxPath); 1289 lstrcpynAtoW(pszArgs, "", cchMaxPath); 1329 TRACE("(%p)->(%p len=%u)\n", This, pszArgs, cchMaxPath); 1330 1331 MultiByteToWideChar( CP_ACP, 0, This->sArgs ? This->sArgs : "", -1, pszArgs, cchMaxPath ); 1332 1290 1333 return NOERROR; 1291 1334 } … … 1343 1386 _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); 1344 1387 1345 FIXME("(%p)->(%p len=%u iicon=%p)\n",This, pszIconPath, cchIconPath, piIcon); 1346 lstrcpynAtoW(pszIconPath,"shell32.dll",cchIconPath); 1347 *piIcon=1; 1388 TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon); 1389 1390 MultiByteToWideChar( CP_ACP, 0, This->sIcoPath ? This->sIcoPath : "", -1, pszIconPath, cchIconPath ); 1391 *piIcon = This->iIcoNdx; 1392 1348 1393 return NOERROR; 1349 1394 } -
TabularUnified trunk/src/shell32/shellole.c ¶
r4121 r5618 1 /* $Id: shellole.c,v 1.1 2000-08-30 13:52:56 sandervl Exp $ */2 1 /* 3 2 * handling of SHELL32.DLL OLE-Objects … … 7 6 * 8 7 */ 9 #ifdef __WIN32OS2__10 #define ICOM_CINTERFACE 111 #include <odin.h>12 #include <winnls.h>13 #endif14 8 15 9 #include <stdlib.h> 16 10 #include <string.h> 17 11 18 #include "wine/obj_base.h" 19 #include "wine/obj_shelllink.h" 20 #include "wine/obj_shellfolder.h" 21 #include "wine/obj_shellbrowser.h" 22 #include "wine/obj_contextmenu.h" 23 #include "wine/obj_shellextinit.h" 24 #include "wine/obj_extracticon.h" 25 12 #include "shlobj.h" 13 #include "shellapi.h" 26 14 #include "shlguid.h" 27 15 #include "winreg.h" 16 #include "wine/unicode.h" 28 17 #include "winerror.h" 29 18 #include "debugtools.h" … … 159 148 { 160 149 TRACE("(%p)\n", lpmal); 161 return CoGetMalloc( 0,lpmal);150 return CoGetMalloc(MEMCTX_TASK, lpmal); 162 151 } 163 152 … … 359 348 typedef HRESULT (* CALLBACK LPFNCREATEINSTANCE)(IUnknown* pUnkOuter, REFIID riid, LPVOID* ppvObject); 360 349 #else 361 typedef HRESULT (CALLBACK *LPFNCREATEINSTANCE)(IUnknown* pUnkOuter, REFIID riid, LPVOID* ppvObject);350 typedef HRESULT CALLBACK (*LPFNCREATEINSTANCE)(IUnknown* pUnkOuter, REFIID riid, LPVOID* ppvObject); 362 351 #endif 363 352 … … 504 493 REFIID riid, 505 494 LPVOID* ppv, 506 LPFNCREATEINSTANCE lpfnCI, /* create instance callback entry */507 PLONG pcRefDll, /* ref count of the dll */508 REFIID riidInst) /* optional interface to the instance */495 LPFNCREATEINSTANCE lpfnCI, /* [in] create instance callback entry */ 496 PLONG pcRefDll, /* [in/out] ref count of the dll */ 497 REFIID riidInst) /* [in] optional interface to the instance */ 509 498 { 510 499 TRACE("\n\tIID:\t%s %p %p %p \n\tIIDIns:\t%s\n", … … 554 543 BOOL WINAPI DragQueryPoint(HDROP hDrop, POINT *p) 555 544 { 556 LPDROPFILESTRUCT lpDropFileStruct; 545 DROPFILES *lpDropFileStruct; 557 546 BOOL bRet; 558 547 559 548 TRACE("\n"); 560 549 561 lpDropFileStruct = ( LPDROPFILESTRUCT) GlobalLock(hDrop);562 563 memcpy(p,&lpDropFileStruct->ptMousePos,sizeof(POINT));564 bRet = lpDropFileStruct->f InNonClientArea;550 lpDropFileStruct = (DROPFILES *) GlobalLock(hDrop); 551 552 *p = lpDropFileStruct->pt; 553 bRet = lpDropFileStruct->fNC; 565 554 566 555 GlobalUnlock(hDrop); … … 579 568 LPSTR lpDrop; 580 569 UINT i = 0; 581 LPDROPFILESTRUCT lpDropFileStruct = (LPDROPFILESTRUCT) GlobalLock(hDrop);570 DROPFILES *lpDropFileStruct = (DROPFILES *) GlobalLock(hDrop); 582 571 583 572 TRACE("(%08x, %x, %p, %u)\n", hDrop,lFile,lpszFile,lLength); … … 585 574 if(!lpDropFileStruct) goto end; 586 575 587 lpDrop = (LPSTR) lpDropFileStruct + lpDropFileStruct-> lSize;576 lpDrop = (LPSTR) lpDropFileStruct + lpDropFileStruct->pFiles; 588 577 589 578 while (i++ < lFile) … … 618 607 LPWSTR lpwDrop; 619 608 UINT i = 0; 620 LPDROPFILESTRUCT lpDropFileStruct = (LPDROPFILESTRUCT) GlobalLock(hDrop);609 DROPFILES *lpDropFileStruct = (DROPFILES *) GlobalLock(hDrop); 621 610 622 611 TRACE("(%08x, %x, %p, %u)\n", hDrop,lFile,lpszwFile,lLength); … … 624 613 if(!lpDropFileStruct) goto end; 625 614 626 lpwDrop = (LPWSTR) lpDropFileStruct + lpDropFileStruct-> lSize;615 lpwDrop = (LPWSTR) lpDropFileStruct + lpDropFileStruct->pFiles; 627 616 628 617 i = 0; … … 637 626 } 638 627 639 i = lstrlenW(lpwDrop);628 i = strlenW(lpwDrop); 640 629 i++; 641 630 if ( !lpszwFile) goto end; /* needed buffer size */ -
TabularUnified trunk/src/shell32/shellord.c ¶
r4561 r5618 1 /* $Id: shellord.c,v 1.2 2000-11-06 10:20:56 sandervl Exp $ */2 1 /* 3 2 * The parameters of many functions changes between different OS versions … … 7 6 * 1998 Jürgen Schmied 8 7 */ 9 #ifdef __WIN32OS2__10 #define ICOM_CINTERFACE 111 #include <odin.h>12 #endif13 8 #include <string.h> 14 9 #include <stdio.h> … … 122 117 * the registry path are for win98 (tested) 123 118 * and possibly are the same in nt40 124 */ 125 void WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask, DWORD dwx) 119 * 120 */ 121 VOID WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask) 126 122 { 127 123 HKEY hKey; … … 129 125 DWORD dwDataSize = sizeof (DWORD); 130 126 131 TRACE("(%p 0x%08lx 0x%08lx)\n",lpsfs,dwMask, dwx);127 TRACE("(%p 0x%08lx)\n",lpsfs,dwMask); 132 128 133 129 if (RegCreateKeyExA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", … … 232 228 ...) 233 229 { 234 WCHAR szText[100],szTitle[100] ,szTemp[256];235 LPCWSTR pszText = szText, pszTitle = szTitle;230 WCHAR szText[100],szTitle[100]; 231 LPCWSTR pszText = szText, pszTitle = szTitle, pszTemp; 236 232 va_list args; 233 int ret; 234 237 235 va_start(args, uType); 238 236 /* wvsprintfA(buf,fmt, args); */ … … 242 240 243 241 if (!HIWORD(lpCaption)) 244 LoadStringW(hInstance, (DWORD)lpCaption, szTitle, 100);242 LoadStringW(hInstance, (DWORD)lpCaption, szTitle, sizeof(szTitle)/sizeof(szTitle[0])); 245 243 else 246 244 pszTitle = lpCaption; 247 245 248 246 if (!HIWORD(lpText)) 249 LoadStringW(hInstance, (DWORD)lpText, szText, 100);247 LoadStringW(hInstance, (DWORD)lpText, szText, sizeof(szText)/sizeof(szText[0])); 250 248 else 251 249 pszText = lpText; 252 250 253 FormatMessageW(FORMAT_MESSAGE_ FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY,254 szText, 0, 0, szTemp, 256, (LPDWORD)args);251 FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, 252 pszText, 0, 0, (LPWSTR)&pszTemp, 0, &args); 255 253 256 254 va_end(args); 257 255 258 return MessageBoxW(hWnd,szTemp,szTitle,uType); 256 ret = MessageBoxW(hWnd,pszTemp,pszTitle,uType); 257 LocalFree((HLOCAL)pszTemp); 258 return ret; 259 259 } 260 260 … … 270 270 ...) 271 271 { 272 char szText[100],szTitle[100] ,szTemp[256];273 LPCSTR pszText = szText, pszTitle = szTitle;272 char szText[100],szTitle[100]; 273 LPCSTR pszText = szText, pszTitle = szTitle, pszTemp; 274 274 va_list args; 275 int ret; 276 275 277 va_start(args, uType); 276 278 /* wvsprintfA(buf,fmt, args); */ … … 280 282 281 283 if (!HIWORD(lpCaption)) 282 LoadStringA(hInstance, (DWORD)lpCaption, szTitle, 100);284 LoadStringA(hInstance, (DWORD)lpCaption, szTitle, sizeof(szTitle)); 283 285 else 284 286 pszTitle = lpCaption; 285 287 286 288 if (!HIWORD(lpText)) 287 LoadStringA(hInstance, (DWORD)lpText, szText, 100);289 LoadStringA(hInstance, (DWORD)lpText, szText, sizeof(szText)); 288 290 else 289 291 pszText = lpText; 290 292 291 FormatMessageA(FORMAT_MESSAGE_ FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY,292 szText, 0, 0, szTemp, 256, (LPDWORD)args);293 FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, 294 pszText, 0, 0, (LPSTR)&pszTemp, 0, &args); 293 295 294 296 va_end(args); 295 297 296 return MessageBoxA(hWnd,szTemp,szTitle,uType); 298 ret = MessageBoxA(hWnd,pszTemp,pszTitle,uType); 299 LocalFree((HLOCAL)pszTemp); 300 return ret; 297 301 } 298 302 … … 456 460 */ 457 461 HRESULT WINAPI SHCreateShellFolderViewEx( 458 LPCSHELLFOLDERVIEWINFO psvcbi, /* [in ] shelltemplate struct*/459 LPSHELLVIEW* ppv) /* [out] IShellView pointer*/462 LPCSHELLFOLDERVIEWINFO psvcbi, /* [in] shelltemplate struct */ 463 LPSHELLVIEW* ppv) /* [out] IShellView pointer */ 460 464 { 461 465 IShellView * psf; … … 878 882 return 0; 879 883 } 880 /*************************************************************************881 * Control_FillCache_RunDLL [SHELL32.8]882 *883 */884 HRESULT WINAPI Control_FillCache_RunDLL(HWND hWnd, HANDLE hModule, DWORD w, DWORD x)885 { FIXME("0x%04x 0x%04x 0x%04lx 0x%04lx stub\n",hWnd, hModule,w,x);886 return 0;887 }888 /*************************************************************************889 * RunDLL_CallEntry16 [SHELL32.122]890 * the name is propably wrong891 */892 HRESULT WINAPI RunDLL_CallEntry16(DWORD v, DWORD w, DWORD x, DWORD y, DWORD z)893 { FIXME("0x%04lx 0x%04lx 0x%04lx 0x%04lx 0x%04lx stub\n",v,w,x,y,z);894 return 0;895 }896 884 897 885 /************************************************************************ … … 980 968 return 0; 981 969 } 970 971 /************************************************************************* 972 * SHAddFromPropSheetExtArray [SHELL32] 973 */ 974 DWORD WINAPI SHAddFromPropSheetExtArray(DWORD a, DWORD b, DWORD c) 975 { 976 FIXME("(%08lx,%08lx,%08lx)stub\n", a, b, c); 977 return 0; 978 } 979 980 /************************************************************************* 981 * SHCreatePropSheetExtArray [SHELL32] 982 */ 983 DWORD WINAPI SHCreatePropSheetExtArray(DWORD a, LPCSTR b, DWORD c) 984 { 985 FIXME("(%08lx,%s,%08lx)stub\n", a, debugstr_a(b), c); 986 return 0; 987 } 988 989 /************************************************************************* 990 * SHReplaceFromPropSheetExtArray [SHELL] 991 */ 992 DWORD WINAPI SHReplaceFromPropSheetExtArray(DWORD a, DWORD b, DWORD c, DWORD d) 993 { 994 FIXME("(%08lx,%08lx,%08lx,%08lx)stub\n", a, b, c, d); 995 return 0; 996 } 997 998 /************************************************************************* 999 * SHDestroyPropSheetExtArray [SHELL32] 1000 */ 1001 DWORD WINAPI SHDestroyPropSheetExtArray(DWORD a) 1002 { 1003 FIXME("(%08lx)stub\n", a); 1004 return 0; 1005 } -
TabularUnified trunk/src/shell32/shellpath.c ¶
r5461 r5618 1 /* $Id: shellpath.c,v 1.4 2001-04-03 18:42:42 sandervl Exp $ */2 1 /* 3 2 * Path Functions … … 6 5 * 7 6 */ 8 #ifdef __WIN32OS2__9 #define ICOM_CINTERFACE 110 #include <odin.h>11 #endif12 13 7 #include <string.h> 14 8 #include <ctype.h> 15 9 #include "debugtools.h" 10 #include "windef.h" 16 11 #include "winnls.h" 17 12 #include "winreg.h" … … 19 14 #include "shlobj.h" 20 15 #include "shell32_main.h" 21 #include "windef.h"22 #include "options.h"23 #include "wine/winestring.h"24 16 #include "wine/undocshell.h" 25 17 #include "wine/unicode.h" … … 28 20 DEFAULT_DEBUG_CHANNEL(shell); 29 21 30 #define isSlash(x) ((x)=='\\' || (x)=='/')31 22 /* 32 23 ########## Combining and Constructing paths ########## … … 347 338 348 339 for(i=0; lpszExtensions[i]; i++) 340 #ifdef __WIN32OS2__ 349 341 if (!lstrcmpiW(lpszExtension,lpszExtensions[i])) return TRUE; 350 342 #else 343 if (!strcmpiW(lpszExtension,lpszExtensions[i])) return TRUE; 344 #endif 351 345 return FALSE; 352 346 } … … 485 479 486 480 #ifdef __WIN32OS2__ 487 /************************************************************************* 488 * PathYetAnotherMakeUniqueNameA [SHELL32.75] 489 * 490 * NOTES 491 * exported by ordinal 492 */ 481 493 482 BOOL WINAPI PathYetAnotherMakeUniqueNameW( 494 483 LPWSTR lpszBuffer, … … 497 486 LPCWSTR lpszLongName) 498 487 { 499 FIXME(" (%p,%p, %p ,%p):stub.\n",488 FIXME("PathYetAnotherMakeUniqueNameW (%p,%p, %p ,%p):stub.\n", 500 489 lpszBuffer, lpszPathName, lpszShortName, lpszLongName); 501 490 return TRUE; … … 514 503 #endif 515 504 505 516 506 /* 517 507 ########## cleaning and resolving paths ########## … … 531 521 * PathCleanupSpecAW [SHELL32] 532 522 */ 533 DWORD WINAPI PathCleanupSpecAW (LP VOID x, LPVOID y)523 DWORD WINAPI PathCleanupSpecAW (LPCVOID x, LPVOID y) 534 524 { 535 525 FIXME("(%p, %p) stub\n",x,y); … … 668 658 */ 669 659 670 static char * szSHFolders = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"; 671 static char * szSHUserFolders = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders"; 660 static const char * const szSHFolders = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"; 661 static const char * const szSHUserFolders = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders"; 662 static const char * const szSetup = "Software\\Microsoft\\Windows\\CurrentVersion\\Setup"; 663 static const char * const szCurrentVersion = "Software\\Microsoft\\Windows\\CurrentVersion"; 672 664 #if 0 673 static c har *szEnvUserProfile = "%USERPROFILE%";674 static c har *szEnvSystemRoot = "%SYSTEMROOT%";665 static const char * const szEnvUserProfile = "%USERPROFILE%"; 666 static const char * const szEnvSystemRoot = "%SYSTEMROOT%"; 675 667 #endif 668 669 typedef struct 670 { 671 DWORD dwFlags; 672 HKEY hRootKey; 673 LPCSTR szValueName; 674 LPCSTR szDefaultPath; /* fallback string; sub dir of windows directory */ 675 } CSIDL_DATA; 676 677 #define CSIDL_MYFLAG_SHFOLDER 1 678 #define CSIDL_MYFLAG_SETUP 2 679 #define CSIDL_MYFLAG_CURRVER 4 680 #define CSIDL_MYFLAG_RELATIVE 8 681 682 #define HKLM HKEY_LOCAL_MACHINE 683 #define HKCU HKEY_CURRENT_USER 684 static const CSIDL_DATA CSIDL_Data[] = 685 { 686 { /* CSIDL_DESKTOP */ 687 9, HKCU, 688 "Desktop", 689 "Desktop" 690 }, 691 { /* CSIDL_INTERNET (??) */ 692 0, 1, /* FIXME */ 693 NULL, 694 NULL, 695 }, 696 { /* CSIDL_PROGRAMS */ 697 9, HKCU, 698 "Programs", 699 "Start Menu\\Programs" 700 }, 701 { /* CSIDL_CONTROLS (.CPL files) */ 702 10, HKLM, 703 "SysDir", 704 "SYSTEM" 705 }, 706 { /* CSIDL_PRINTERS */ 707 10, HKLM, 708 "SysDir", 709 "SYSTEM" 710 }, 711 { /* CSIDL_PERSONAL */ 712 1, HKCU, 713 "Personal", 714 "My Documents" 715 }, 716 { /* CSIDL_FAVORITES */ 717 9, HKCU, 718 "Favorites", 719 "Favorites" 720 }, 721 { /* CSIDL_STARTUP */ 722 9, HKCU, 723 "StartUp", 724 "Start Menu\\Programs\\StartUp" 725 }, 726 { /* CSIDL_RECENT */ 727 9, HKCU, 728 "Recent", 729 "Recent" 730 }, 731 { /* CSIDL_SENDTO */ 732 9, HKCU, 733 "SendTo", 734 "SendTo" 735 }, 736 { /* CSIDL_BITBUCKET (is this c:\recycled ?) */ 737 0, 1, /* FIXME */ 738 NULL, 739 "recycled" 740 }, 741 { /* CSIDL_STARTMENU */ 742 9, HKCU, 743 "Start Menu", 744 "Start Menu" 745 }, 746 { /* not known */ 747 0, 0, 748 NULL, 749 NULL, 750 }, 751 { /* not known */ 752 0, 0, 753 NULL, 754 NULL, 755 }, 756 { /* not known */ 757 0, 0, 758 NULL, 759 NULL, 760 }, 761 { /* not known */ 762 0, 0, 763 NULL, 764 NULL, 765 }, 766 { /* CSIDL_DESKTOPDIRECTORY */ 767 9, HKCU, 768 "Desktop", 769 "Desktop" 770 }, 771 { /* CSIDL_DRIVES */ 772 0, 1, /* FIXME */ 773 NULL, 774 "My Computer" 775 }, 776 { /* CSIDL_NETWORK */ 777 0, 1, /* FIXME */ 778 NULL, 779 "Network Neighborhood" 780 }, 781 { /* CSIDL_NETHOOD */ 782 9, HKCU, 783 "NetHood", 784 "NetHood" 785 }, 786 { /* CSIDL_FONTS */ 787 9, HKCU, 788 "Fonts", 789 "Fonts" 790 }, 791 { /* CSIDL_TEMPLATES */ 792 9, HKCU, 793 "Templates", 794 "ShellNew" 795 }, 796 { /* CSIDL_COMMON_STARTMENU */ 797 9, HKLM, 798 "Common Start Menu", 799 "Start Menu" 800 }, 801 { /* CSIDL_COMMON_PROGRAMS */ 802 9, HKLM, 803 "Common Programs", 804 "" 805 }, 806 { /* CSIDL_COMMON_STARTUP */ 807 9, HKLM, 808 "Common StartUp", 809 "All Users\\Start Menu\\Programs\\StartUp" 810 }, 811 { /* CSIDL_COMMON_DESKTOPDIRECTORY */ 812 9, HKLM, 813 "Common Desktop", 814 "Desktop" 815 }, 816 { /* CSIDL_APPDATA */ 817 9, HKCU, 818 "AppData", 819 "Application Data" 820 }, 821 { /* CSIDL_PRINTHOOD */ 822 9, HKCU, 823 "PrintHood", 824 "PrintHood" 825 }, 826 { /* not known */ 827 0, 0, 828 NULL, 829 NULL, 830 }, 831 { /* CSIDL_ALTSTARTUP */ 832 0, 1, /* FIXME */ 833 NULL, 834 NULL 835 }, 836 { /* CSIDL_COMMON_ALTSTARTUP */ 837 0, 1, /* FIXME */ 838 NULL, 839 NULL 840 }, 841 { /* CSIDL_COMMON_FAVORITES */ 842 9, HKCU, 843 "Favorites", 844 "Favorites" 845 }, 846 { /* CSIDL_INTERNET_CACHE */ 847 9, HKCU, 848 "Cache", 849 "Temporary Internet Files" 850 }, 851 { /* CSIDL_COOKIES */ 852 9, HKCU, 853 "Cookies", 854 "Cookies" 855 }, 856 { /* CSIDL_HISTORY */ 857 9, HKCU, 858 "History", 859 "History" 860 }, 861 { /* CSIDL_COMMON_APPDATA */ 862 9, HKLM, 863 "Common AppData", 864 "All Users\\Application Data" 865 }, 866 { /* CSIDL_WINDOWS */ 867 2, HKLM, 868 "WinDir", 869 "Windows" 870 }, 871 { /* CSIDL_SYSTEM */ 872 10, HKLM, 873 "SysDir", 874 "SYSTEM" 875 }, 876 { /* CSIDL_PROGRAM_FILES */ 877 4, HKLM, 878 "ProgramFilesDir", 879 "Program Files" 880 }, 881 { /* CSIDL_MYPICTURES */ 882 1, HKCU, 883 "My Pictures", 884 "My Documents\\My Pictures" 885 }, 886 { /* CSIDL_PROFILE */ 887 10, HKLM, 888 "WinDir", /* correct ? */ 889 "" 890 }, 891 { /* CSIDL_SYSTEMX86 */ 892 10, HKLM, 893 "SysDir", 894 "SYSTEM" 895 }, 896 { /* CSIDL_PROGRAM_FILESX86 */ 897 4, HKLM, 898 "ProgramFilesDir", 899 "Program Files" 900 }, 901 { /* CSIDL_PROGRAM_FILES_COMMON */ 902 4, HKLM, 903 "CommonFilesDir", 904 "Program Files\\Common Files" /* ? */ 905 }, 906 { /* CSIDL_PROGRAM_FILES_COMMONX86 */ 907 4, HKLM, 908 "CommonFilesDir", 909 "Program Files\\Common Files" /* ? */ 910 }, 911 { /* CSIDL_COMMON_TEMPLATES */ 912 0, 1, /* FIXME */ 913 NULL, 914 NULL 915 }, 916 { /* CSIDL_COMMON_DOCUMENTS */ 917 0, 1, /* FIXME */ 918 NULL, 919 NULL 920 }, 921 { /* CSIDL_COMMON_ADMINTOOLS */ 922 0, 1, /* FIXME */ 923 NULL, 924 NULL 925 }, 926 { /* CSIDL_ADMINTOOLS */ 927 9, HKCU, 928 "Administrative Tools", 929 "Start Menu\\Programs\\Administrative Tools" 930 }, 931 { /* CSIDL_CONNECTIONS */ 932 0, 1, /* FIXME */ 933 NULL, 934 NULL 935 } 936 }; 937 #undef HKCU 938 #undef HKLM 939 940 /**********************************************************************/ 676 941 677 942 BOOL WINAPI SHGetSpecialFolderPathA ( … … 681 946 BOOL bCreate) 682 947 { 683 CHAR szValueName[MAX_PATH], szDefaultPath[MAX_PATH] ;948 CHAR szValueName[MAX_PATH], szDefaultPath[MAX_PATH], szBuildPath[MAX_PATH]; 684 949 HKEY hRootKey, hKey; 685 BOOL bRelative = TRUE;950 DWORD dwFlags; 686 951 DWORD dwType, dwDisp, dwPathLen = MAX_PATH; 952 DWORD folder = csidl & CSIDL_FOLDER_MASK; 953 CHAR *p; 687 954 688 955 TRACE("0x%04x,%p,csidl=%lu,0x%04x\n", hwndOwner,szPath,csidl,bCreate); 689 956 690 /* build default values */ 691 switch(csidl) 957 if ((folder > CSIDL_CONNECTIONS) || (CSIDL_Data[folder].hRootKey == 0)) 692 958 { 693 case CSIDL_APPDATA:694 hRootKey = HKEY_CURRENT_USER;695 strcpy (szValueName, "AppData");696 strcpy (szDefaultPath, "AppData");697 break;698 699 case CSIDL_COOKIES:700 hRootKey = HKEY_CURRENT_USER;701 strcpy (szValueName, "Cookies");702 strcpy(szDefaultPath, "Cookies");703 break;704 705 case CSIDL_DESKTOPDIRECTORY:706 hRootKey = HKEY_CURRENT_USER;707 strcpy(szValueName, "Desktop");708 strcpy(szDefaultPath, "Desktop");709 break;710 711 case CSIDL_COMMON_DESKTOPDIRECTORY:712 hRootKey = HKEY_LOCAL_MACHINE;713 strcpy(szValueName, "Common Desktop");714 strcpy(szDefaultPath, "Desktop");715 break;716 717 case CSIDL_FAVORITES:718 hRootKey = HKEY_CURRENT_USER;719 strcpy(szValueName, "Favorites");720 strcpy(szDefaultPath, "Favorites");721 break;722 723 case CSIDL_FONTS:724 hRootKey = HKEY_CURRENT_USER;725 strcpy(szValueName, "Fonts");726 strcpy(szDefaultPath, "Fonts");727 break;728 729 case CSIDL_HISTORY:730 hRootKey = HKEY_CURRENT_USER;731 strcpy(szValueName, "History");732 strcpy(szDefaultPath, "History");733 break;734 735 case CSIDL_NETHOOD:736 hRootKey = HKEY_CURRENT_USER;737 strcpy(szValueName, "NetHood");738 strcpy(szDefaultPath, "NetHood");739 break;740 741 case CSIDL_INTERNET_CACHE:742 hRootKey = HKEY_CURRENT_USER;743 strcpy(szValueName, "Cache");744 strcpy(szDefaultPath, "Temporary Internet Files");745 break;746 747 case CSIDL_PERSONAL:748 hRootKey = HKEY_CURRENT_USER;749 strcpy(szValueName, "Personal");750 strcpy(szDefaultPath, "My Own Files");751 bRelative = FALSE;752 break;753 754 case CSIDL_PRINTHOOD:755 hRootKey = HKEY_CURRENT_USER;756 strcpy(szValueName, "PrintHood");757 strcpy(szDefaultPath, "PrintHood");758 break;759 760 case CSIDL_PROGRAMS:761 hRootKey = HKEY_CURRENT_USER;762 strcpy(szValueName, "Programs");763 strcpy(szDefaultPath, "Start Menu\\Programs");764 break;765 766 case CSIDL_COMMON_PROGRAMS:767 hRootKey = HKEY_LOCAL_MACHINE;768 strcpy(szValueName, "Common Programs");769 strcpy(szDefaultPath, "");770 break;771 772 case CSIDL_RECENT:773 hRootKey = HKEY_CURRENT_USER;774 strcpy(szValueName, "Recent");775 strcpy(szDefaultPath, "Recent");776 break;777 778 case CSIDL_SENDTO:779 hRootKey = HKEY_CURRENT_USER;780 strcpy(szValueName, "SendTo");781 strcpy(szDefaultPath, "SendTo");782 break;783 784 case CSIDL_STARTMENU:785 hRootKey = HKEY_CURRENT_USER;786 strcpy(szValueName, "Start Menu");787 strcpy(szDefaultPath, "Start Menu");788 break;789 790 case CSIDL_COMMON_STARTMENU:791 hRootKey = HKEY_LOCAL_MACHINE;792 strcpy(szValueName, "Common Start Menu");793 strcpy(szDefaultPath, "Start Menu");794 break;795 796 case CSIDL_STARTUP:797 hRootKey = HKEY_CURRENT_USER;798 strcpy(szValueName, "StartUp");799 strcpy(szDefaultPath, "Start Menu\\Programs\\StartUp");800 break;801 802 case CSIDL_COMMON_STARTUP:803 hRootKey = HKEY_LOCAL_MACHINE;804 strcpy(szValueName, "Common StartUp");805 strcpy(szDefaultPath, "Start Menu\\Programs\\StartUp");806 break;807 808 case CSIDL_TEMPLATES:809 hRootKey = HKEY_CURRENT_USER;810 strcpy(szValueName, "Templates");811 strcpy(szDefaultPath, "ShellNew");812 break;813 814 default:815 959 ERR("folder unknown or not allowed\n"); 816 960 return FALSE; 817 961 } 818 819 /* user shell folders */ 820 if (RegCreateKeyExA(hRootKey,szSHUserFolders,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,&dwDisp)) return FALSE; 821 822 if (RegQueryValueExA(hKey,szValueName,NULL,&dwType,(LPBYTE)szPath,&dwPathLen)) 962 if (CSIDL_Data[folder].hRootKey == 1) 823 963 { 964 FIXME("folder unknown, please add.\n"); 965 return FALSE; 966 } 967 968 dwFlags = CSIDL_Data[folder].dwFlags; 969 hRootKey = CSIDL_Data[folder].hRootKey; 970 strcpy(szValueName, CSIDL_Data[folder].szValueName); 971 strcpy(szDefaultPath, CSIDL_Data[folder].szDefaultPath); 972 973 if (dwFlags & CSIDL_MYFLAG_SHFOLDER) 974 { 975 /* user shell folders */ 976 if (RegCreateKeyExA(hRootKey,szSHUserFolders,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,&dwDisp)) return FALSE; 977 978 if (RegQueryValueExA(hKey,szValueName,NULL,&dwType,(LPBYTE)szPath,&dwPathLen)) 979 { 980 RegCloseKey(hKey); 981 982 /* shell folders */ 983 if (RegCreateKeyExA(hRootKey,szSHFolders,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,&dwDisp)) return FALSE; 984 985 if (RegQueryValueExA(hKey,szValueName,NULL,&dwType,(LPBYTE)szPath,&dwPathLen)) 986 { 987 988 /* value not existing */ 989 if (dwFlags & CSIDL_MYFLAG_RELATIVE) 990 { 991 GetWindowsDirectoryA(szPath, MAX_PATH); 992 PathAddBackslashA(szPath); 993 strcat(szPath, szDefaultPath); 994 } 995 else 996 { 997 strcpy(szPath, "C:\\"); /* FIXME ??? */ 998 strcat(szPath, szDefaultPath); 999 } 1000 RegSetValueExA(hKey,szValueName,0,REG_SZ,(LPBYTE)szPath,strlen(szPath)+1); 1001 } 1002 } 824 1003 RegCloseKey(hKey); 825 826 /* shell folders */ 827 if (RegCreateKeyExA(hRootKey,szSHFolders,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,&dwDisp)) return FALSE; 828 829 if (RegQueryValueExA(hKey,szValueName,NULL,&dwType,(LPBYTE)szPath,&dwPathLen)) 1004 } 1005 else 1006 { 1007 LPCSTR pRegPath; 1008 1009 if (dwFlags & CSIDL_MYFLAG_SETUP) 1010 pRegPath = szSetup; 1011 else 1012 if (dwFlags & CSIDL_MYFLAG_CURRVER) 1013 pRegPath = szCurrentVersion; 1014 else 830 1015 { 831 1016 ERR("folder settings broken, please correct !\n"); 1017 return FALSE; 1018 } 1019 1020 if (RegCreateKeyExA(hRootKey,pRegPath,0,NULL,0,KEY_ALL_ACCESS,NULL,&hKey,&dwDisp)) return FALSE; 1021 1022 if (RegQueryValueExA(hKey,szValueName,NULL,&dwType,(LPBYTE)szPath,&dwPathLen)) 1023 { 832 1024 /* value not existing */ 833 if ( bRelative)1025 if (dwFlags & CSIDL_MYFLAG_RELATIVE) 834 1026 { 835 1027 GetWindowsDirectoryA(szPath, MAX_PATH); … … 839 1031 else 840 1032 { 841 strcpy(szPath, "C:\\"); /* fixme??? */1033 strcpy(szPath, "C:\\"); /* FIXME ??? */ 842 1034 strcat(szPath, szDefaultPath); 843 1035 } 844 1036 RegSetValueExA(hKey,szValueName,0,REG_SZ,(LPBYTE)szPath,strlen(szPath)+1); 845 1037 } 1038 RegCloseKey(hKey); 846 1039 } 847 RegCloseKey(hKey);848 1040 849 1041 /* expand paths like %USERPROFILE% */ … … 854 1046 } 855 1047 856 /* if we don't care about existing director ys we are ready */1048 /* if we don't care about existing directories we are ready */ 857 1049 if(csidl & CSIDL_FLAG_DONT_VERIFY) return TRUE; 858 1050 859 1051 if (PathFileExistsA(szPath)) return TRUE; 860 1052 861 /* not existing but we not allowed to create it */1053 /* not existing but we are not allowed to create it */ 862 1054 if (!bCreate) return FALSE; 863 864 if (!CreateDirectoryA(szPath,NULL)) 1055 1056 /* create directory/directories */ 1057 strcpy(szBuildPath, szPath); 1058 p = strchr(szBuildPath, '\\'); 1059 while (p) 865 1060 { 866 ERR("Failed to create directory '%s'.\n", szPath); 867 return FALSE; 1061 *p = 0; 1062 if (!PathFileExistsA(szBuildPath)) 1063 { 1064 if (!CreateDirectoryA(szBuildPath,NULL)) 1065 { 1066 ERR("Failed to create directory '%s'.\n", szPath); 1067 return FALSE; 1068 } 1069 } 1070 *p = '\\'; 1071 p = strchr(p+1, '\\'); 868 1072 } 869 1073 … … 885 1089 if (SHGetSpecialFolderPathA(hwndOwner, szTemp, csidl, bCreate)) 886 1090 { 887 lstrcpynAtoW(szPath, szTemp, MAX_PATH); 888 } 1091 if (!MultiByteToWideChar( CP_ACP, 0, szTemp, -1, szPath, MAX_PATH )) 1092 szPath[MAX_PATH-1] = 0; 1093 } 889 1094 890 1095 TRACE("0x%04x,%p,csidl=%lu,0x%04x\n", hwndOwner,szPath,csidl,bCreate); … … 914 1119 HWND hwndOwner, 915 1120 int nFolder, 916 HANDLE hToken, /* FIXME: get paths for specific user */917 DWORD dwFlags, /* FIXME: SHGFP_TYPE_CURRENT|SHGFP_TYPE_DEFAULT */1121 HANDLE hToken, /* [in] FIXME: get paths for specific user */ 1122 DWORD dwFlags, /* [in] FIXME: SHGFP_TYPE_CURRENT|SHGFP_TYPE_DEFAULT */ 918 1123 LPSTR pszPath) 919 1124 { -
TabularUnified trunk/src/shell32/shellreg.c ¶
r4121 r5618 1 /* $Id: shellreg.c,v 1.1 2000-08-30 13:52:56 sandervl Exp $ */2 1 /* 3 2 Shell Registry Access 4 3 */ 5 #ifdef __WIN32OS2__6 #define ICOM_CINTERFACE 17 #include <odin.h>8 #endif9 4 #include <string.h> 10 5 #include <stdio.h> … … 13 8 #include "debugtools.h" 14 9 #include "winnls.h" 15 #include "heap.h"16 10 17 11 #include "shellapi.h" … … 101 95 } 102 96 103 #ifndef __WIN32OS2__104 97 /************************************************************************* 105 98 * SHRegDeleteKeyA [SHELL32] … … 110 103 { 111 104 FIXME("hkey=0x%08x, %s\n", hkey, debugstr_a(pszSubKey)); 105 #ifdef __WIN32OS2__ 106 return RegDeleteKeyA(hkey,pszSubKey); 107 #else 112 108 return 0; 113 }114 109 #endif 110 } 115 111 116 112 /************************************************************************* … … 122 118 { 123 119 FIXME("hkey=0x%08x, %s\n", hkey, debugstr_w(pszSubKey)); 120 #ifdef __WIN32OS2__ 121 return RegDeleteKeyW(hkey,pszSubKey); 122 #else 124 123 return 0; 124 #endif 125 125 } 126 126 … … 134 134 return RegCloseKey( hkey ); 135 135 } 136 137 #ifndef __WIN32OS2__ 138 139 /* 16-bit functions */ 140 141 /* 0 and 1 are valid rootkeys in win16 shell.dll and are used by 142 * some programs. Do not remove those cases. -MM 143 */ 144 static inline void fix_win16_hkey( HKEY *hkey ) 145 { 146 if (*hkey == 0 || *hkey == 1) *hkey = HKEY_CLASSES_ROOT; 147 } 148 149 /****************************************************************************** 150 * RegOpenKey16 [SHELL.1] 151 */ 152 DWORD WINAPI RegOpenKey16( HKEY hkey, LPCSTR name, LPHKEY retkey ) 153 { 154 fix_win16_hkey( &hkey ); 155 return RegOpenKeyA( hkey, name, retkey ); 156 } 157 158 /****************************************************************************** 159 * RegCreateKey16 [SHELL.2] 160 */ 161 DWORD WINAPI RegCreateKey16( HKEY hkey, LPCSTR name, LPHKEY retkey ) 162 { 163 fix_win16_hkey( &hkey ); 164 return RegCreateKeyA( hkey, name, retkey ); 165 } 166 167 /****************************************************************************** 168 * RegCloseKey16 [SHELL.3] 169 */ 170 DWORD WINAPI RegCloseKey16( HKEY hkey ) 171 { 172 fix_win16_hkey( &hkey ); 173 return RegCloseKey( hkey ); 174 } 175 176 /****************************************************************************** 177 * RegDeleteKey16 [SHELL.4] 178 */ 179 DWORD WINAPI RegDeleteKey16( HKEY hkey, LPCSTR name ) 180 { 181 fix_win16_hkey( &hkey ); 182 return RegDeleteKeyA( hkey, name ); 183 } 184 185 /****************************************************************************** 186 * RegSetValue16 [SHELL.5] 187 */ 188 DWORD WINAPI RegSetValue16( HKEY hkey, LPCSTR name, DWORD type, LPCSTR data, DWORD count ) 189 { 190 fix_win16_hkey( &hkey ); 191 return RegSetValueA( hkey, name, type, data, count ); 192 } 193 194 /****************************************************************************** 195 * RegQueryValue16 [SHELL.6] 196 * 197 * NOTES 198 * Is this HACK still applicable? 199 * 200 * HACK 201 * The 16bit RegQueryValue doesn't handle selectorblocks anyway, so we just 202 * mask out the high 16 bit. This (not so much incidently) hopefully fixes 203 * Aldus FH4) 204 */ 205 DWORD WINAPI RegQueryValue16( HKEY hkey, LPCSTR name, LPSTR data, LPDWORD count ) 206 { 207 fix_win16_hkey( &hkey ); 208 if (count) *count &= 0xffff; 209 return RegQueryValueA( hkey, name, data, count ); 210 } 211 212 /****************************************************************************** 213 * RegEnumKey16 [SHELL.7] 214 */ 215 DWORD WINAPI RegEnumKey16( HKEY hkey, DWORD index, LPSTR name, DWORD name_len ) 216 { 217 fix_win16_hkey( &hkey ); 218 return RegEnumKeyA( hkey, index, name, name_len ); 219 } 220 #endif //__WIN32OS2__ -
TabularUnified trunk/src/shell32/shellstring.c ¶
r4121 r5618 1 /* $Id: shellstring.c,v 1.1 2000-08-30 13:52:56 sandervl Exp $ */2 #ifdef __WIN32OS2__3 #define ICOM_CINTERFACE 14 #include <odin.h>5 #endif6 1 #include <string.h> 7 2 #include <stdio.h> … … 14 9 #include "heap.h" 15 10 11 #include "shlobj.h" 12 #include "shlwapi.h" 16 13 #include "shellapi.h" 17 14 #include "shell32_main.h" … … 31 28 * the pidl is for STRRET OFFSET 32 29 */ 33 HRESULT WINAPI StrRetToStrNA (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLISTpidl)30 HRESULT WINAPI StrRetToStrNA (LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) 34 31 { 35 32 return StrRetToBufA( src, pidl, dest, len ); 36 33 } 37 34 38 HRESULT WINAPI StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLISTpidl)35 HRESULT WINAPI StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) 39 36 { 40 37 return StrRetToBufW( src, pidl, dest, len ); 41 38 } 42 39 43 HRESULT WINAPI StrRetToStrNAW (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLISTpidl)40 HRESULT WINAPI StrRetToStrNAW (LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) 44 41 { 45 42 if(SHELL_OsIsUnicode()) -
TabularUnified trunk/src/shell32/shellstub.cpp ¶
r5544 r5618 1 /* $Id: shellstub.cpp,v 1. 2 2001-04-19 08:32:18sandervl Exp $ */1 /* $Id: shellstub.cpp,v 1.3 2001-04-28 13:33:47 sandervl Exp $ */ 2 2 3 3 /* … … 100 100 } 101 101 102 ODINFUNCTION2(DWORD, ILSaveToStream, DWORD, x1, DWORD, x2)103 {104 dprintf(("STUB!"));105 return 0;106 }107 108 102 ODINFUNCTION1(DWORD, InvalidateDriveType, DWORD, x1) 109 103 { -
TabularUnified trunk/src/shell32/shlfolder.c ¶
r4121 r5618 1 /* $Id: shlfolder.c,v 1.1 2000-08-30 13:52:57 sandervl Exp $ */2 1 /* 3 2 * Shell Folder stuff … … 10 9 */ 11 10 #ifdef __WIN32OS2__ 12 #define ICOM_CINTERFACE 113 # include <odin.h>11 #define WINE_LARGE_INTEGER 12 #define snprintf(a,b,c,d) sprintf(a,c,d) 14 13 #endif 15 16 14 #include <stdlib.h> 17 15 #include <string.h> … … 20 18 #include "debugtools.h" 21 19 #include "winerror.h" 20 #include "winbase.h" 22 21 23 22 #include "oleidl.h" … … 32 31 #include "shresdef.h" 33 32 #include "shlwapi.h" 34 35 #define INITGUID36 #include "initguid.h"37 33 #include "shellfolder.h" 38 34 39 40 DEFAULT_DEBUG_CHANNEL(shell) 35 DEFAULT_DEBUG_CHANNEL(shell); 41 36 42 37 … … 347 342 348 343 /************************************************************************** 349 * we need a sep erate IUnknown to handle aggregation344 * we need a separate IUnknown to handle aggregation 350 345 * (inner IUnknown) 351 346 */ … … 616 611 * 617 612 * NOTES 618 * every folder tr ys to parse only it's own (the leftmost) pidl and creates a613 * every folder tries to parse only its own (the leftmost) pidl and creates a 619 614 * subfolder to evaluate the remaining parts 620 615 * now we can parse into namespaces implemented by shell extensions … … 658 653 659 654 /* build the full pathname to the element */ 660 lstrcpynWtoA(szTempA, szElement, lstrlenW(szElement) + 1);655 WideCharToMultiByte( CP_ACP, 0, szElement, -1, szTempA, MAX_PATH, NULL, NULL ); 661 656 strcpy(szPath, This->sMyPath); 662 657 PathAddBackslashA(szPath); … … 691 686 } 692 687 693 *ppidl = pidlTemp; 688 if (!hr) 689 *ppidl = pidlTemp; 690 else 691 *ppidl = NULL; 694 692 695 693 TRACE("(%p)->(-- pidl=%p ret=0x%08lx)\n", This, ppidl? *ppidl:0, hr); … … 1188 1186 PathAddBackslashA(szDest); 1189 1187 len = strlen (szDest); 1190 lstrcpynWtoA(szDest+len, lpName, MAX_PATH-len);1191 1188 WideCharToMultiByte( CP_ACP, 0, lpName, -1, szDest+len, MAX_PATH-len, NULL, NULL ); 1189 szDest[MAX_PATH-1] = 0; 1192 1190 TRACE("src=%s dest=%s\n", szSrc, szDest); 1193 1191 if ( MoveFileA(szSrc, szDest) ) … … 1498 1496 int i; 1499 1497 char szPath[MAX_PATH]; 1498 BOOL bConfirm = TRUE; 1500 1499 1501 1500 TRACE("(%p)(%u %p)\n", This, cidl, apidl); 1502 1501 1502 /* deleting multiple items so give a slightly different warning */ 1503 if(cidl != 1) 1504 { 1505 char tmp[8]; 1506 snprintf(tmp, sizeof(tmp), "%d", cidl); 1507 if(!SHELL_WarnItemDelete(ASK_DELETE_MULTIPLE_ITEM, tmp)) 1508 return E_FAIL; 1509 bConfirm = FALSE; 1510 } 1511 1503 1512 for(i=0; i< cidl; i++) 1504 1513 { … … 1510 1519 { 1511 1520 LPITEMIDLIST pidl; 1512 1513 MESSAGE("delete %s\n", szPath); 1514 if (! SHELL_DeleteDirectoryA(szPath, TRUE)) return E_FAIL; 1521 TRACE("delete %s\n", szPath); 1522 if (! SHELL_DeleteDirectoryA(szPath, bConfirm)) 1523 { 1524 TRACE("delete %s failed, bConfirm=%d", szPath, bConfirm); 1525 return E_FAIL; 1526 } 1515 1527 pidl = ILCombine(This->absPidl, apidl[i]); 1516 1528 SHChangeNotifyA(SHCNE_RMDIR, SHCNF_IDLIST, pidl, NULL); … … 1521 1533 LPITEMIDLIST pidl; 1522 1534 1523 MESSAGE("delete %s\n", szPath); 1524 if (! DeleteFileA(szPath)) return E_FAIL; 1535 TRACE("delete %s\n", szPath); 1536 if (! SHELL_DeleteFileA(szPath, bConfirm)) 1537 { 1538 TRACE("delete %s failed, bConfirm=%d", szPath, bConfirm); 1539 return E_FAIL; 1540 } 1525 1541 pidl = ILCombine(This->absPidl, apidl[i]); 1526 1542 SHChangeNotifyA(SHCNE_DELETE, SHCNF_IDLIST, pidl, NULL); … … 2133 2149 { 2134 2150 szNext = GetNextElementW(lpszDisplayName, szElement, MAX_PATH); 2135 lstrcpynWtoA(szTempA, szElement, lstrlenW(szElement) + 1);2151 WideCharToMultiByte( CP_ACP, 0, szElement, -1, szTempA, MAX_PATH, NULL, NULL ); 2136 2152 pidlTemp = _ILCreateDrive(szTempA); 2137 2153 … … 2498 2514 _ILSimpleGetText(pidl, szPath, MAX_PATH); 2499 2515 GetDiskFreeSpaceExA(szPath, NULL, &ulBytes, NULL); 2500 #ifdef __WIN32OS2__2501 StrFormatByteSizeA(ulBytes.LowPart, psd->str.u.cStr, MAX_PATH);2502 #else2503 2516 StrFormatByteSizeA(ulBytes.s.LowPart, psd->str.u.cStr, MAX_PATH); 2504 #endif2505 2517 } 2506 2518 break; … … 2510 2522 _ILSimpleGetText(pidl, szPath, MAX_PATH); 2511 2523 GetDiskFreeSpaceExA(szPath, &ulBytes, NULL, NULL); 2512 #ifdef __WIN32OS2__2513 StrFormatByteSizeA(ulBytes.LowPart, psd->str.u.cStr, MAX_PATH);2514 #else2515 2524 StrFormatByteSizeA(ulBytes.s.LowPart, psd->str.u.cStr, MAX_PATH); 2516 #endif2517 2525 } 2518 2526 break; -
TabularUnified trunk/src/shell32/shlmenu.c ¶
r4121 r5618 1 /* $Id: shlmenu.c,v 1.1 2000-08-30 13:52:59 sandervl Exp $ */2 1 /* 3 2 * see www.geocities.com/SiliconValley/4942/filemenu.html 4 3 */ 5 #ifdef __WIN32OS2__6 #define ICOM_CINTERFACE 17 #include <odin.h>8 #endif9 4 #include <string.h> 10 5 6 #include "shlobj.h" 11 7 #include "wine/obj_base.h" 12 8 #include "wine/obj_enumidlist.h" 13 9 #include "wine/obj_shellfolder.h" 14 10 #include "wine/undocshell.h" 15 11 #include "shlwapi.h" 16 12 #include "heap.h" 17 13 #include "debugtools.h" … … 52 48 #define CCH_MAXITEMTEXT 256 53 49 54 DEFAULT_DEBUG_CHANNEL(shell) 50 DEFAULT_DEBUG_CHANNEL(shell); 55 51 56 52 LPFMINFO FM_GetMenuInfo(HMENU hmenu) … … 359 355 360 356 } 357 358 /**********************************************************************/ 359 361 360 BOOL WINAPI FileMenu_AppendItemAW( 362 361 HMENU hMenu, … … 603 602 604 603 Shell_GetImageList(0, &hImageList); 605 pImageList_Draw(hImageList, pMyItem->iIconIndex, lpdis->hDC, xi, yi, ILD_NORMAL);604 ImageList_Draw(hImageList, pMyItem->iIconIndex, lpdis->hDC, xi, yi, ILD_NORMAL); 606 605 607 606 TRACE("-- 0x%04x 0x%04x 0x%04x 0x%04x\n", TextRect.left, TextRect.top, TextRect.right, TextRect.bottom); … … 691 690 692 691 GetMenuItemInfoA(hMenu, uID, FALSE, &mii ); 693 if ( mii.hSubMenu ); 692 if ( mii.hSubMenu ) 693 { 694 /* FIXME: Do what? */ 695 } 694 696 695 697 DeleteMenu(hMenu, MF_BYCOMMAND, uID); … … 711 713 712 714 GetMenuItemInfoA(hMenu, uPos, TRUE, &mii ); 713 if ( mii.hSubMenu ); 715 if ( mii.hSubMenu ) 716 { 717 /* FIXME: Do what? */ 718 } 714 719 715 720 DeleteMenu(hMenu, MF_BYPOSITION, uPos); … … 820 825 return(FALSE); 821 826 } 827 828 /**********************************************************************/ 822 829 823 830 HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags) -
TabularUnified trunk/src/shell32/shlview.c ¶
r4121 r5618 1 /* $Id: shlview.c,v 1.1 2000-08-30 13:52:59 sandervl Exp $ */2 1 /* 3 2 * ShellView … … 23 22 * Release() ??? 24 23 */ 25 #ifdef __WIN32OS2__26 #define ICOM_CINTERFACE 127 #include <odin.h>28 #endif29 24 30 25 #include <stdlib.h> 31 26 #include <string.h> 32 27 28 #include "windef.h" 29 #include "winerror.h" 30 #include "winnls.h" 33 31 #include "servprov.h" 34 32 #include "shlguid.h" 35 #include "wine/obj_base.h" 36 #include "wine/obj_shellfolder.h" 37 #include "wine/obj_shellview.h" 38 #include "wine/obj_oleview.h" 39 #include "wine/obj_commdlgbrowser.h" 40 #include "wine/obj_shellbrowser.h" 41 #include "wine/obj_dockingwindowframe.h" 42 #include "wine/obj_extracticon.h" 43 #include "wine/obj_dragdrop.h" 33 #include "shlobj.h" 44 34 #include "wine/undocshell.h" 45 35 #include "shresdef.h" 46 36 #include "debugtools.h" 47 #include "winerror.h"48 #include "wine/winestring.h"49 37 50 38 #include "docobj.h" 51 39 #include "pidl.h" 52 40 #include "shell32_main.h" 41 #include "shellfolder.h" 53 42 54 43 DEFAULT_DEBUG_CHANNEL(shell); … … 118 107 #define SHV_CHANGE_NOTIFY WM_USER + 0x1111 119 108 120 #define TOOLBAR_ID (L"SHELLDLL_DefView")121 109 /*windowsx.h */ 122 110 #define GET_WM_COMMAND_ID(wp, lp) LOWORD(wp) 123 111 #define GET_WM_COMMAND_HWND(wp, lp) (HWND)(lp) 124 112 #define GET_WM_COMMAND_CMD(wp, lp) HIWORD(wp) 125 /* winuser.h */ 126 #define WM_SETTINGCHANGE WM_WININICHANGE 113 127 114 extern void WINAPI _InsertMenuItem (HMENU hmenu, UINT indexMenu, BOOL fByPosition, 128 115 UINT wID, UINT fType, LPSTR dwTypeData, UINT fState); … … 152 139 typedef void (* CALLBACK PFNSHGETSETTINGSPROC)(LPSHELLFLAGSTATE lpsfs, DWORD dwMask); 153 140 #else 154 typedef void (CALLBACK*PFNSHGETSETTINGSPROC)(LPSHELLFLAGSTATE lpsfs, DWORD dwMask);141 typedef void CALLBACK (*PFNSHGETSETTINGSPROC)(LPSHELLFLAGSTATE lpsfs, DWORD dwMask); 155 142 #endif 156 143 … … 1259 1246 1260 1247 pidl = (LPITEMIDLIST)lpdi->item.lParam; 1261 lstrcpynAtoW(wszNewName, lpdi->item.pszText, MAX_PATH); 1248 if (!MultiByteToWideChar( CP_ACP, 0, lpdi->item.pszText, -1, wszNewName, MAX_PATH )) 1249 wszNewName[MAX_PATH-1] = 0; 1262 1250 hr = IShellFolder_SetNameOf(This->pSFParent, 0, pidl, wszNewName, SHGDN_INFOLDER, &pidl); 1263 1251 … … 1285 1273 1286 1274 LPNMLVKEYDOWN plvKeyDown = (LPNMLVKEYDOWN) lpnmh; 1275 1276 /* initiate a rename of the selected file or directory */ 1277 if(plvKeyDown->wVKey == VK_F2) 1278 { 1279 /* see how many files are selected */ 1280 int i = ListView_GetSelectedCount(This->hWndList); 1281 1282 /* get selected item */ 1283 if(i == 1) 1284 { 1285 /* get selected item */ 1286 i = ListView_GetNextItem(This->hWndList, -1, 1287 LVNI_SELECTED); 1288 1289 ListView_EnsureVisible(This->hWndList, i, 0); 1290 ListView_EditLabelA(This->hWndList, i); 1291 } 1292 } 1287 1293 #if 0 1288 1294 TranslateAccelerator(This->hWnd, This->hAccel, &msg) 1289 1295 #endif 1290 FIXME("LVN_KEYDOWN key=0x%08x\n",plvKeyDown->wVKey); 1296 else if(plvKeyDown->wVKey == VK_DELETE) 1297 { 1298 int i, item_index; 1299 LVITEMA item; 1300 LPITEMIDLIST* pItems; 1301 ISFHelper *psfhlp; 1302 1303 IShellFolder_QueryInterface(This->pSFParent, &IID_ISFHelper, 1304 (LPVOID*)&psfhlp); 1305 1306 if(!(i = ListView_GetSelectedCount(This->hWndList))) 1307 break; 1308 1309 /* allocate memory for the pidl array */ 1310 pItems = HeapAlloc(GetProcessHeap(), 0, 1311 sizeof(LPITEMIDLIST) * i); 1312 1313 /* retrieve all selected items */ 1314 i = 0; 1315 item_index = -1; 1316 while(ListView_GetSelectedCount(This->hWndList) > i) 1317 { 1318 /* get selected item */ 1319 item_index = ListView_GetNextItem(This->hWndList, 1320 item_index, LVNI_SELECTED); 1321 item.iItem = item_index; 1322 ListView_GetItemA(This->hWndList, &item); 1323 1324 /* get item pidl */ 1325 pItems[i] = (LPITEMIDLIST)item.lParam; 1326 1327 i++; 1328 } 1329 1330 /* perform the item deletion */ 1331 ISFHelper_DeleteItems(psfhlp, i, pItems); 1332 1333 /* free pidl array memory */ 1334 HeapFree(GetProcessHeap(), 0, pItems); 1335 } 1336 else 1337 FIXME("LVN_KEYDOWN key=0x%08x\n",plvKeyDown->wVKey); 1291 1338 } 1292 1339 break; 1340 1293 1341 default: 1294 1342 TRACE("-- %p WM_COMMAND %x unhandled\n", This, lpnmh->code); -
TabularUnified trunk/src/shell32/shpolicy.c ¶
r4121 r5618 1 /* $Id: shpolicy.c,v 1.1 2000-08-30 13:53:00 sandervl Exp $ */2 1 /* 3 2 * shpolicy.c - Data for shell/system policies. … … 14 13 * Up to date as of SHELL32 v4.72 (Win98, Win95 with MSIE 5) 15 14 */ 16 #ifdef __WIN32OS2__17 #define ICOM_CINTERFACE 118 #include <odin.h>19 #endif20 15 21 16 #include <stdlib.h> -
TabularUnified trunk/src/shell32/shpolicy.h ¶
r4121 r5618 1 /* $Id: shpolicy.h,v 1.3 2000-08-30 13:51:08 sandervl Exp $ */ 2 /* 1 /* 3 2 * shpolicy.h - contains defs of policy data for SHRestricted 4 * 3 * 5 4 * Created 1999 by Ian Schmidt, <ischmidt@cfl.rr.com> 6 5 * Up to date as of SHELL32 v4.72 (Win98, Win95 with MSIE 5) 7 *8 * Corel WINE 20000324 level9 6 */ 10 7 -
TabularUnified trunk/src/shell32/shres.orc ¶
r5576 r5618 1 /* $Id: shres.orc,v 1.1 2 2001-04-23 10:47:23sandervl Exp $ */1 /* $Id: shres.orc,v 1.13 2001-04-28 13:33:48 sandervl Exp $ */ 2 2 /* 3 3 * Top level resource file for Common Dialogs … … 104 104 DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP 105 105 PUSHBUTTON "Cancel", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP 106 LTEXT "", IDD_TITLE, 4, 4, 18 , 12107 LTEXT "", IDD_STATUS, 4, 25, 18 , 12106 LTEXT "", IDD_TITLE, 4, 4, 180, 12 107 LTEXT "", IDD_STATUS, 4, 25, 180, 12 108 108 CONTROL "Tree1",IDD_TREEVIEW,"SysTreeView32", 109 109 TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | 110 WS_BORDER | WS_TABSTOP, 110 WS_BORDER | WS_TABSTOP, 111 111 4, 40, 180, 120 112 112 } 113 113 114 114 115 /* -
TabularUnified trunk/src/shell32/shv_bg_cmenu.c ¶
r4121 r5618 1 /* $Id: shv_bg_cmenu.c,v 1.1 2000-08-30 13:53:00 sandervl Exp $ */2 1 /* 3 2 * IContextMenu … … 6 5 * Copyright 1999 Juergen Schmied <juergen.schmied@metronet.de> 7 6 */ 8 #ifdef __WIN32OS2__9 #define ICOM_CINTERFACE 110 #include <odin.h>11 #endif12 7 #include <string.h> 13 8 … … 22 17 #include "shell32_main.h" 23 18 #include "shellfolder.h" 24 #include "shell.h" /* DROPFILESTRUCT */25 19 #include "wine/undocshell.h" 26 20 27 DEFAULT_DEBUG_CHANNEL(shell) 21 DEFAULT_DEBUG_CHANNEL(shell); 28 22 29 23 /************************************************************************** … … 201 195 TRACE("\n"); 202 196 203 if(SUCCEEDED(pOleGetClipboard(&pda))) ;197 if(SUCCEEDED(pOleGetClipboard(&pda))) 204 198 { 205 199 STGMEDIUM medium; … … 370 364 TRACE("(%p)->(idcom=%x flags=%x %p name=%p len=%x)\n",This, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); 371 365 372 /* test the exist ance of the menu items, the file dialog enables366 /* test the existence of the menu items, the file dialog enables 373 367 the buttons according to this */ 374 368 if (uFlags == GCS_VALIDATEA) -
TabularUnified trunk/src/shell32/shv_item_cmenu.c ¶
r4121 r5618 1 /* $Id: shv_item_cmenu.c,v 1.1 2000-08-30 13:53:01 sandervl Exp $ */2 1 /* 3 2 * IContextMenu for items in the shellview … … 5 4 * 1998, 2000 Juergen Schmied <juergen.schmied@debitel.net> 6 5 */ 7 #ifdef __WIN32OS2__8 #define ICOM_CINTERFACE 19 #include <odin.h>10 #endif11 6 #include <string.h> 12 7 … … 24 19 #include "shell32_main.h" 25 20 #include "shellfolder.h" 26 #include "shell.h" /* DROPFILESTRUCT */ 27 28 DEFAULT_DEBUG_CHANNEL(shell) 21 22 DEFAULT_DEBUG_CHANNEL(shell); 29 23 30 24 /************************************************************************** … … 491 485 switch(idCommand) 492 486 { case FCIDM_SHVIEW_RENAME: 493 lstrcpyAtoW((LPWSTR)lpszName, "rename");487 MultiByteToWideChar( CP_ACP, 0, "rename", -1, (LPWSTR)lpszName, uMaxNameLen ); 494 488 hr = NOERROR; 495 489 break; -
TabularUnified trunk/src/shell32/systray.c ¶
r4121 r5618 1 /* $Id: systray.c,v 1.1 2000-08-30 13:53:01 sandervl Exp $ */2 1 /* 3 2 * Systray … … 10 9 * 11 10 */ 12 #ifdef __WIN32OS2__ 13 #define ICOM_CINTERFACE 1 14 #include <odin.h> 15 #else 11 12 #ifndef __WIN32OS2__ 16 13 #include <unistd.h> 17 14 #endif … … 19 16 #include <string.h> 20 17 21 #ifndef __WIN32OS2__ 22 #include "heap.h" 23 #endif 18 #include "winnls.h" 19 #include "shlobj.h" 24 20 #include "shellapi.h" 25 21 #include "shell32_main.h" 26 #include "windows.h"27 22 #include "commctrl.h" 28 23 #include "debugtools.h" 24 #include "heap.h" 29 25 #include "config.h" 30 26 31 DEFAULT_DEBUG_CHANNEL(shell) 27 DEFAULT_DEBUG_CHANNEL(shell); 32 28 33 29 typedef struct SystrayItem { … … 186 182 return FALSE; 187 183 #else 184 188 185 /* Initialize the window size. */ 189 186 rect.left = 0; … … 215 212 } 216 213 return TRUE; 217 #endif //__WIN32OS2__214 #endif 218 215 } 219 216 … … 221 218 static void SYSTRAY_ItemTerm(SystrayItem *ptrayItem) 222 219 { 220 if(ptrayItem->notifyIcon.hIcon) 221 DestroyIcon(ptrayItem->notifyIcon.hIcon); 223 222 if(ptrayItem->hWndToolTip) 224 223 DestroyWindow(ptrayItem->hWndToolTip); … … 237 236 void SYSTRAY_ItemSetIcon(SystrayItem *ptrayItem, HICON hIcon) 238 237 { 239 ptrayItem->notifyIcon.hIcon = hIcon; /* do we need a copy? */238 ptrayItem->notifyIcon.hIcon = CopyIcon(hIcon); 240 239 InvalidateRect(ptrayItem->hWnd, NULL, TRUE); 241 240 } … … 346 345 347 346 /************************************************************************* 348 * Shell_NotifyIconA [SHELL32.297] 347 * Shell_NotifyIconA [SHELL32.297][SHELL32.296] 349 348 */ 350 349 BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid ) … … 368 367 369 368 /************************************************************************* 370 * Shell_NotifyIconW [SHELL32.29 7]369 * Shell_NotifyIconW [SHELL32.298] 371 370 */ 372 371 BOOL WINAPI Shell_NotifyIconW (DWORD dwMessage, PNOTIFYICONDATAW pnid ) … … 376 375 PNOTIFYICONDATAA p = HeapAlloc(GetProcessHeap(),0,sizeof(NOTIFYICONDATAA)); 377 376 memcpy(p, pnid, sizeof(NOTIFYICONDATAA)); 378 if (*(pnid->szTip)) 379 lstrcpynWtoA (p->szTip, pnid->szTip, 64 );377 WideCharToMultiByte( CP_ACP, 0, pnid->szTip, -1, p->szTip, sizeof(p->szTip), NULL, NULL ); 378 p->szTip[sizeof(p->szTip)-1] = 0; 380 379 381 380 ret = Shell_NotifyIconA(dwMessage, p ); … … 384 383 return ret; 385 384 } 386 387 /*************************************************************************388 * Shell_NotifyIcon [SHELL32.296]389 */390 BOOL WINAPI Shell_NotifyIcon(DWORD dwMessage, PNOTIFYICONDATAA pnid)391 {392 return Shell_NotifyIconA(dwMessage, pnid);393 } -
TabularUnified trunk/src/shlwapi/makefile ¶
r4719 r5618 1 # $Id: makefile,v 1.2 0 2000-12-02 23:57:08 birdExp $1 # $Id: makefile,v 1.21 2001-04-28 13:32:19 sandervl Exp $ 2 2 3 3 # … … 21 21 $(OBJDIR)\shlstub.obj \ 22 22 $(OBJDIR)\url.obj \ 23 $(OBJDIR)\url_odin.obj \ 23 24 $(OBJDIR)\reg_odin.obj \ 24 25 $(OBJDIR)\reg.obj \ … … 30 31 $(OBJDIR)\shlwapirsrc.obj \ 31 32 $(OBJDIR)\ordinal.obj \ 33 $(OBJDIR)\ordinal_odin.obj \ 32 34 $(DLLENTRY) 33 35 -
TabularUnified trunk/src/shlwapi/path.c ¶
r4081 r5618 1 1 /* 2 2 * Path Functions 3 * 4 * Note: Odin changes marked by #ifdef __WIN32OS2__ 5 */ 6 3 */ 7 4 #ifdef __WIN32OS2__ 8 5 #include <odin.h> … … 17 14 18 15 #include <heapstring.h> 16 #include <wine\undocshell.h> 19 17 #endif 20 18 … … 24 22 #include "winerror.h" 25 23 #include "wine/unicode.h" 26 #include "wine/undocshell.h" 24 #include "winbase.h" 25 #include "wingdi.h" 26 #include "winuser.h" 27 27 #include "shlwapi.h" 28 28 #include "debugtools.h" 29 29 30 30 31 DEFAULT_DEBUG_CHANNEL(shell); … … 211 212 LPWSTR WINAPI PathBuildRootW(LPWSTR lpszPath, int drive) 212 213 { 214 lpszPath[0] = 'A' + drive; 215 lpszPath[1] = ':'; 216 lpszPath[2] = '\\'; 217 lpszPath[3] = 0; 213 218 TRACE("%p %i\n",debugstr_w(lpszPath), drive); 214 215 lstrcpyAtoW(lpszPath,"A:\\");216 lpszPath[0]+=drive;217 219 return lpszPath; 218 220 } … … 1070 1072 BOOL WINAPI PathMatchSpecW(LPCWSTR name, LPCWSTR mask) 1071 1073 { 1072 WCHAR stemp[4];1074 static const WCHAR stemp[] = { '*','.','*',0 }; 1073 1075 TRACE("%s %s\n",debugstr_w(name),debugstr_w(mask)); 1074 1076 1075 lstrcpyAtoW(stemp,"*.*");1076 1077 if (!lstrcmpW( mask, stemp )) return 1; /* we don't require a period */ 1077 1078 -
TabularUnified trunk/src/shlwapi/reg.c ¶
r4081 r5618 1 1 /* 2 2 * SHLWAPI registry functions 3 * Note: Odin changes marked by __WIN32OS2__4 */ 5 3 */ 4 5 #include <string.h> 6 6 #include "windef.h" 7 #include "winbase.h" 8 #include "wingdi.h" 9 #include "winuser.h" 7 10 #include "winerror.h" 8 11 #include "winreg.h" 9 #include "wine/undocshell.h"10 12 #include "debugtools.h" 13 #include "shlwapi.h" 14 #include "wine/unicode.h" 11 15 12 16 DEFAULT_DEBUG_CHANNEL(shell); 17 18 static const char *lpszContentTypeA = "Content Type"; 19 static const WCHAR lpszContentTypeW[] = { 'C','o','n','t','e','n','t',' ','T','y','p','e','\0'}; 13 20 14 21 /************************************************************************* … … 50 57 } 51 58 59 /************************************************************************* 60 * SHRegOpenUSKeyA [SHLWAPI.@] 61 * 62 * Openss a user-specific registry key 63 */ 64 LONG WINAPI SHRegOpenUSKeyA( 65 LPCSTR Path, 66 REGSAM AccessType, 67 HKEY hRelativeUSKey, 68 HKEY hNewUSKey, 69 BOOL fIgnoreHKCU) 70 { 71 FIXME("stub!\n"); 72 return ERROR_SUCCESS; /* return success */ 73 } 74 75 /************************************************************************* 76 * SHRegOpenUSKeyW [SHLWAPI.@] 77 * 78 * Openss a user-specific registry key 79 */ 80 LONG WINAPI SHRegOpenUSKeyW( 81 LPCSTR Path, 82 REGSAM AccessType, 83 HKEY hRelativeUSKey, 84 HKEY hNewUSKey, 85 BOOL fIgnoreHKCU) 86 { 87 FIXME("stub!\n"); 88 return ERROR_SUCCESS; /* return success */ 89 } 90 52 91 #ifndef __WIN32OS2__ 53 92 /************************************************************************* … … 82 121 */ 83 122 LONG WINAPI SHRegQueryUSValueA( 84 HKEY /*HUSKEY*/ hUSKey,123 HKEY hUSKey, /* [in] FIXME: HUSKEY */ 85 124 LPCSTR pszValue, 86 125 LPDWORD pdwType, … … 96 135 97 136 /************************************************************************* 137 * SHRegQueryUSValueA [SHLWAPI] 138 */ 139 LONG WINAPI SHRegQueryUSValueW( 140 HKEY hUSKey, /* [in] FIXME: HUSKEY */ 141 LPCSTR pszValue, 142 LPDWORD pdwType, 143 void *pvData, 144 LPDWORD pcbData, 145 BOOL fIgnoreHKCU, 146 void *pvDefaultData, 147 DWORD dwDefaultDataSize) 148 { 149 FIXME("%s stub\n",pszValue); 150 return 1; 151 } 152 153 /************************************************************************* 98 154 * SHRegGetPathA [SHLWAPI.@] 99 155 */ … … 138 194 HKEY hSubKey; 139 195 DWORD res; 140 196 141 197 TRACE("(%s %s)\n", pSubKey, pValue); 142 198 143 199 if((res = RegOpenKeyA(hkey, pSubKey, &hSubKey))) return res; 144 200 res = RegQueryValueExA(hSubKey, pValue, 0, pwType, pvData, pbData); 145 201 RegCloseKey( hSubKey ); 146 202 147 203 return res; 148 204 } … … 163 219 HKEY hSubKey; 164 220 DWORD res; 165 221 166 222 TRACE("(%s %s)\n", debugstr_w(pSubKey), debugstr_w(pValue)); 167 223 168 224 if((res = RegOpenKeyW(hkey, pSubKey, &hSubKey))) return res; 169 225 res = RegQueryValueExW(hSubKey, pValue, 0, pwType, pvData, pbData); 170 226 RegCloseKey( hSubKey ); 171 227 172 228 return res; 173 229 } … … 176 232 * SHSetValueA [SHLWAPI.@] 177 233 */ 178 DWORDWINAPI SHSetValueA(234 HRESULT WINAPI SHSetValueA( 179 235 HKEY hkey, 180 236 LPCSTR pszSubKey, … … 184 240 DWORD cbData) 185 241 { 186 FIXME("(%s %s)stub\n",pszSubKey, pszValue); 187 return 1; 242 HKEY subkey; 243 HRESULT hres; 244 245 hres = RegCreateKeyA(hkey,pszSubKey,&subkey); 246 if (!hres) 247 return hres; 248 hres = RegSetValueExA(subkey,pszValue,0,dwType,pvData,cbData); 249 RegCloseKey(subkey); 250 return hres; 251 } 252 253 /************************************************************************* 254 * SHSetValueW [SHLWAPI.@] 255 */ 256 HRESULT WINAPI SHSetValueW( 257 HKEY hkey, 258 LPCWSTR pszSubKey, 259 LPCWSTR pszValue, 260 DWORD dwType, 261 LPCVOID pvData, 262 DWORD cbData) 263 { 264 HKEY subkey; 265 HRESULT hres; 266 267 hres = RegCreateKeyW(hkey,pszSubKey,&subkey); 268 if (!hres) 269 return hres; 270 hres = RegSetValueExW(subkey,pszValue,0,dwType,pvData,cbData); 271 RegCloseKey(subkey); 272 return hres; 188 273 } 189 274 … … 210 295 * FIXME 211 296 * if the datatype REG_EXPAND_SZ then expand the string and change 212 * *pdwType to REG_SZ. 297 * *pdwType to REG_SZ. 213 298 */ 214 299 HRESULT WINAPI SHQueryValueExW ( … … 227 312 /************************************************************************* 228 313 * SHDeleteKeyA [SHLWAPI.@] 314 * 315 * It appears this function is made available to account for the differences 316 * between the Win9x and WinNT/2k RegDeleteKeyA functions. 317 * 318 * According to docs, Win9x RegDeleteKeyA will delete all subkeys, whereas 319 * WinNt/2k will only delete the key if empty. 229 320 */ 230 321 HRESULT WINAPI SHDeleteKeyA( 231 HKEY hkey, 232 LPCSTR pszSubKey) 233 { 234 FIXME("hkey=0x%08x, %s\n", hkey, debugstr_a(pszSubKey)); 235 return 0; 322 HKEY hKey, 323 LPCSTR lpszSubKey) 324 { 325 DWORD r, dwKeyCount, dwSize, i, dwMaxSubkeyLen; 326 HKEY hSubKey; 327 LPSTR lpszName; 328 329 TRACE("hkey=0x%08x, %s\n", hKey, debugstr_a(lpszSubKey)); 330 331 hSubKey = 0; 332 r = RegOpenKeyExA(hKey, lpszSubKey, 0, KEY_READ, &hSubKey); 333 if(r != ERROR_SUCCESS) 334 return r; 335 336 /* find how many subkeys there are */ 337 dwKeyCount = 0; 338 dwMaxSubkeyLen = 0; 339 r = RegQueryInfoKeyA(hSubKey, NULL, NULL, NULL, &dwKeyCount, 340 &dwMaxSubkeyLen, NULL, NULL, NULL, NULL, NULL, NULL); 341 if(r != ERROR_SUCCESS) 342 { 343 RegCloseKey(hSubKey); 344 return r; 345 } 346 347 /* alloc memory for the longest string terminating 0 */ 348 dwMaxSubkeyLen++; 349 lpszName = HeapAlloc(GetProcessHeap(), 0, dwMaxSubkeyLen*sizeof(CHAR)); 350 if(!lpszName) 351 { 352 RegCloseKey(hSubKey); 353 return ERROR_NOT_ENOUGH_MEMORY; 354 } 355 356 /* recursively delete all the subkeys */ 357 for(i=0; i<dwKeyCount; i++) 358 { 359 dwSize = dwMaxSubkeyLen; 360 r = RegEnumKeyExA(hSubKey, i, lpszName, &dwSize, NULL, NULL, NULL, NULL); 361 if(r != ERROR_SUCCESS) 362 break; 363 r = SHDeleteKeyA(hSubKey, lpszName); 364 if(r != ERROR_SUCCESS) 365 break; 366 } 367 368 HeapFree(GetProcessHeap(), 0, lpszName); 369 370 RegCloseKey(hSubKey); 371 372 if(r == ERROR_SUCCESS) 373 r = RegDeleteKeyA(hKey, lpszSubKey); 374 375 return r; 236 376 } 237 377 238 378 /************************************************************************* 239 379 * SHDeleteKeyW [SHLWAPI.@] 380 * 381 * It appears this function is made available to account for the differences 382 * between the Win9x and WinNT/2k RegDeleteKeyA functions. 383 * 384 * According to docs, Win9x RegDeleteKeyA will delete all subkeys, whereas 385 * WinNt/2k will only delete the key if empty. 240 386 */ 241 387 HRESULT WINAPI SHDeleteKeyW( … … 246 392 return 0; 247 393 } 394 395 /************************************************************************* 396 * SHDeleteValueA [SHLWAPI.@] 397 * 398 * Function opens the key, get/set/delete the value, then close the key. 399 */ 400 HRESULT WINAPI SHDeleteValueA(HKEY hkey, LPCSTR pszSubKey, LPCSTR pszValue) { 401 HKEY subkey; 402 HRESULT hres; 403 404 hres = RegOpenKeyA(hkey,pszSubKey,&subkey); 405 if (hres) 406 return hres; 407 hres = RegDeleteValueA(subkey,pszValue); 408 RegCloseKey(subkey); 409 return hres; 410 } 411 412 /************************************************************************* 413 * SHDeleteValueW [SHLWAPI.@] 414 * 415 * Function opens the key, get/set/delete the value, then close the key. 416 */ 417 HRESULT WINAPI SHDeleteValueW(HKEY hkey, LPCWSTR pszSubKey, LPCWSTR pszValue) { 418 HKEY subkey; 419 HRESULT hres; 420 421 hres = RegOpenKeyW(hkey,pszSubKey,&subkey); 422 if (hres) 423 return hres; 424 hres = RegDeleteValueW(subkey,pszValue); 425 RegCloseKey(subkey); 426 return hres; 427 } 428 429 /************************************************************************* 430 * SHDeleteEmptyKeyA [SHLWAPI.@] 431 * 432 * It appears this function is made available to account for the differences 433 * between the Win9x and WinNT/2k RegDeleteKeyA functions. 434 * 435 * According to docs, Win9x RegDeleteKeyA will delete all subkeys, whereas 436 * WinNt/2k will only delete the key if empty. 437 */ 438 DWORD WINAPI SHDeleteEmptyKeyA(HKEY hKey, LPCSTR lpszSubKey) 439 { 440 DWORD r, dwKeyCount; 441 HKEY hSubKey; 442 443 TRACE("hkey=0x%08x, %s\n", hKey, debugstr_a(lpszSubKey)); 444 445 hSubKey = 0; 446 r = RegOpenKeyExA(hKey, lpszSubKey, 0, KEY_READ, &hSubKey); 447 if(r != ERROR_SUCCESS) 448 return r; 449 450 dwKeyCount = 0; 451 r = RegQueryInfoKeyA(hSubKey, NULL, NULL, NULL, &dwKeyCount, 452 NULL, NULL, NULL, NULL, NULL, NULL, NULL); 453 if(r != ERROR_SUCCESS) 454 return r; 455 456 RegCloseKey(hSubKey); 457 458 if(dwKeyCount) 459 return ERROR_KEY_HAS_CHILDREN; 460 461 r = RegDeleteKeyA(hKey, lpszSubKey); 462 463 return r; 464 } 465 466 /************************************************************************* 467 * SHDeleteEmptyKeyW [SHLWAPI.@] 468 * 469 * It appears this function is made available to account for the differences 470 * between the Win9x and WinNT/2k RegDeleteKeyA functions. 471 * 472 * According to docs, Win9x RegDeleteKeyA will delete all subkeys, whereas 473 * WinNt/2k will only delete the key if empty. 474 */ 475 DWORD WINAPI SHDeleteEmptyKeyW(HKEY hKey, LPCWSTR lpszSubKey) 476 { 477 FIXME("hkey=0x%08x, %s\n", hKey, debugstr_w(lpszSubKey)); 478 return 0; 479 } 480 481 /************************************************************************* 482 * SHLWAPI_205 [SHLWAPI.205] 483 * 484 * Wrapper for SHGetValueA in case machine is in safe mode. 485 */ 486 DWORD WINAPI SHLWAPI_205(HKEY hkey, LPCSTR pSubKey, LPCSTR pValue, 487 LPDWORD pwType, LPVOID pvData, LPDWORD pbData) 488 { 489 if (GetSystemMetrics(SM_CLEANBOOT)) 490 return ERROR_INVALID_FUNCTION; 491 return SHGetValueA(hkey, pSubKey, pValue, pwType, pvData, pbData); 492 } 493 494 /************************************************************************* 495 * SHLWAPI_206 [SHLWAPI.206] 496 * 497 * Unicode version of SHLWAPI_205. 498 */ 499 DWORD WINAPI SHLWAPI_206(HKEY hkey, LPCWSTR pSubKey, LPCWSTR pValue, 500 LPDWORD pwType, LPVOID pvData, LPDWORD pbData) 501 { 502 if (GetSystemMetrics(SM_CLEANBOOT)) 503 return ERROR_INVALID_FUNCTION; 504 return SHGetValueW(hkey, pSubKey, pValue, pwType, pvData, pbData); 505 } 506 507 /************************************************************************* 508 * SHLWAPI_320 [SHLWAPI.320] 509 * 510 */ 511 BOOL WINAPI SHLWAPI_320(LPCSTR lpszSubKey, LPCSTR lpszValue) 512 { 513 DWORD dwLen = strlen(lpszValue); 514 HRESULT ret = SHSetValueA(HKEY_CLASSES_ROOT, lpszSubKey, lpszContentTypeA, 515 REG_SZ, lpszValue, dwLen); 516 return ret ? FALSE : TRUE; 517 } 518 519 /************************************************************************* 520 * SHLWAPI_321 [SHLWAPI.321] 521 * 522 * Unicode version of SHLWAPI_320. 523 */ 524 BOOL WINAPI SHLWAPI_321(LPCWSTR lpszSubKey, LPCWSTR lpszValue) 525 { 526 DWORD dwLen = strlenW(lpszValue); 527 HRESULT ret = SHSetValueW(HKEY_CLASSES_ROOT, lpszSubKey, lpszContentTypeW, 528 REG_SZ, lpszValue, dwLen); 529 return ret ? FALSE : TRUE; 530 } 531 532 /************************************************************************* 533 * SHLWAPI_322 [SHLWAPI.322] 534 * 535 */ 536 BOOL WINAPI SHLWAPI_322(LPCSTR lpszSubKey) 537 { 538 HRESULT ret = SHDeleteValueA(HKEY_CLASSES_ROOT, lpszSubKey, lpszContentTypeA); 539 return ret ? FALSE : TRUE; 540 } 541 542 /************************************************************************* 543 * SHLWAPI_323 [SHLWAPI.323] 544 * 545 * Unicode version of SHLWAPI_322. 546 */ 547 BOOL WINAPI SHLWAPI_323(LPCWSTR lpszSubKey) 548 { 549 HRESULT ret = SHDeleteValueW(HKEY_CLASSES_ROOT, lpszSubKey, lpszContentTypeW); 550 return ret ? FALSE : TRUE; 551 } 552 -
TabularUnified trunk/src/shlwapi/shlwapi.def ¶
r4809 r5618 1 ; $Id: shlwapi.def,v 1. 19 2000-12-16 22:53:44 birdExp $1 ; $Id: shlwapi.def,v 1.20 2001-04-28 13:32:20 sandervl Exp $ 2 2 3 3 ; updated export ordinals to NT4 SP6 version of SHLWAPI.DLL … … 19 19 20 20 21 _SHLWAPI_1@8 @1 22 _SHLWAPI_2@8 @2 23 _SHLWAPI_3@8 @3 24 _SHLWAPI_4@8 @4 25 _SHLWAPI_5@12 @5 26 _SHLWAPI_6@12 @6 27 _SHLWAPI_7@12 @7 28 _SHLWAPI_8@8 @8 29 _SHLWAPI_9@4 @9 30 _SHLWAPI_10@8 @10 31 _SHLWAPI_11@20 @11 32 _SHLWAPI_12@8 @12 33 _SHLWAPI_13@8 @13 34 _SHLWAPI_14@8 @14 35 _SHLWAPI_15@8 @15 21 _SHLWAPI_1@8 @1 NONAME 22 _SHLWAPI_2@8 @2 NONAME 23 _SHLWAPI_3@8 @3 NONAME 24 _SHLWAPI_4@8 @4 NONAME 25 _SHLWAPI_5@12 @5 NONAME 26 _SHLWAPI_6@12 @6 NONAME 27 _SHLWAPI_7@12 @7 NONAME 28 _SHLWAPI_8@8 @8 NONAME 29 _SHLWAPI_9@4 @9 NONAME 30 _SHLWAPI_10@8 @10 NONAME 31 _SHLWAPI_11@20 @11 NONAME 32 _SHLWAPI_12@8 @12 NONAME 33 _SHLWAPI_13@8 @13 NONAME 34 _SHLWAPI_14@8 @14 NONAME 35 _SHLWAPI_15@8 @15 NONAME 36 36 SHCreateThread = _SHCreateThread@16 @16 37 _SHLWAPI_17@8 @17 38 _SHLWAPI_18@8 @18 39 _SHLWAPI_19@4 @19 40 _SHLWAPI_20@8 @20 41 _SHLWAPI_21@8 @21 42 _SHLWAPI_22@8 @22 43 _SHLWAPI_23@12 @23 44 _SHLWAPI_24@12 @24 45 _SHLWAPI_28@4 @28 46 _SHLWAPI_30@4 @30 47 48 _CallWindowProcW@20 @37 49 _CharLowerW@4 @38 50 _CharLowerBuffW@8 @39 51 _CharNextW@4 @40 52 _CharPrevW@8 @41 53 _CharToOemW@8 @42 54 _CharUpperW@4 @43 55 _CharUpperBuffW@8 @44 56 _CompareStringW@24 @45 57 _CopyAcceleratorTableW@12 @46 58 _CreateAcceleratorTableW@8 @47 59 _CreateDCW@16 @48 60 _CreateDialogParamW@20 @49 ; @@@PH imcomplete61 _CreateDirectoryW@8 @50 62 _CreateEventW@16 @51 63 _CreateFileW@28 @52 64 _CreateFontIndirectW@4 @53 65 _CreateICW@16 @54 66 _CreateWindowExW@48 @55 67 _DefWindowProcW@16 @56 68 _DeleteFileW@4 @57 69 _DialogBoxIndirectParamW@20 @58 ; @@@PH imcomplete70 _DialogBoxParamW@20 @59 ; @@@PH imcomplete71 _DispatchMessageW@4 @60 72 _DrawTextW@20 @61 73 _EnumFontFamiliesW@16 @62 74 _EnumFontFamiliesExW@20 @63 75 _EnumResourceNamesW@16 @64 76 _FindFirstFileW@8 @65 77 _FindResourceW@12 @66 78 _FindWindowW@8 @67 79 _FormatMessageW@28 @68 80 _GetClassInfoW@12 @69 81 _GetClassLongW@8 @70 82 _GetClassNameW@12 @71 83 _GetClipboardFormatNameW@12 @72 84 _GetCurrentDirectoryW@8 @73 85 _ GetDlgItemTextW@16 @7486 _GetFileAttributesW@4 @75 87 _GetFullPathNameW@16 @76 88 _GetLocaleInfoW@16 @77 89 _GetMenuItemInfoW@16 @78 90 _GetMessageW@16 @79 91 _GetModuleFileNameW@12 @80 92 _GetSystemDirectoryW@8 @81 93 _SearchPathW@24 @82 94 _GetModuleHandleW@4 @83 95 _GetObjectW@12 @84 96 _GetPrivateProfileIntW@16 @85 97 _GetProfileStringW@20 @86 98 _GetPropW@8 @87 99 _GetStringTypeExW@20 @88 100 _GetTempFileNameW@16 @89 101 _GetTempPathW@8 @90 102 _GetTextExtentPoint32W@16 @91 103 _GetTextFaceW@12 @92 104 _GetTextMetricsW@8 @93 105 _GetWindowLongW@8 @94 106 _GetWindowTextW@12 @95 107 _GetWindowTextLengthW@4 @96 108 _GetWindowsDirectoryW@8 @97 109 _InsertMenuW@20 @98 ; @@@PH incomplete110 _IsDialogMessageW@8 @99 111 _LoadAcceleratorsW@8 @100 112 _LoadBitmapW@8 @101 113 _LoadCursorW@8 @102 114 _LoadIconW@8 @103 115 _LoadImageW@24 @104 116 _LoadLibraryExW@12 @105 117 _LoadMenuW@8 @106 118 _LoadStringW@16 @107 119 _MessageBoxIndirectW@4 @108 120 _ModifyMenuW@20 @109 121 _GetCharWidth32W@16 @110 122 _GetCharacterPlacementW@24 @111 123 _CopyFileW@12 @112 124 _MoveFileW@8 @113 125 _OemToCharW@8 @114 126 _OutputDebugStringW@4 @115 127 _PeekMessageW@20 @116 128 _PostMessageW@16 @117 129 _PostThreadMessageW@16 @118 130 _RegCreateKeyW@12 @119 131 _RegCreateKeyExW@36 @120 132 _RegDeleteKeyW@8 @121 133 _RegEnumKeyW@16 @122 134 _RegEnumKeyExW@32 @123 135 _RegOpenKeyW@12 @124 136 _RegOpenKeyExW@20 @125 137 _RegQueryInfoKeyW@48 @126 138 _RegQueryValueW@16 @127 139 _RegQueryValueExW@24 @128 140 _RegSetValueW@20 @129 141 _RegSetValueExW@24 @130 142 _RegisterClassW@4 @131 143 _RegisterClipboardFormatW@4 @132 144 _RegisterWindowMessageW@4 @133 145 _RemovePropW@8 @134 146 _SendDlgItemMessageW@20 @135 147 _SendMessageW@16 @136 148 _SetCurrentDirectoryW@4 @137 37 _SHLWAPI_17@8 @17 NONAME 38 _SHLWAPI_18@8 @18 NONAME 39 _SHLWAPI_19@4 @19 NONAME 40 _SHLWAPI_20@8 @20 NONAME 41 _SHLWAPI_21@8 @21 NONAME 42 _SHLWAPI_22@8 @22 NONAME 43 _SHLWAPI_23@12 @23 NONAME 44 _SHLWAPI_24@12 @24 NONAME 45 _SHLWAPI_28@4 @28 NONAME 46 _SHLWAPI_30@4 @30 NONAME 47 _SHLWAPI_32@4 @32 NONAME 48 _CallWindowProcW@20 @37 NONAME 49 _CharLowerW@4 @38 NONAME 50 _CharLowerBuffW@8 @39 NONAME 51 _CharNextW@4 @40 NONAME 52 _CharPrevW@8 @41 NONAME 53 _CharToOemW@8 @42 NONAME 54 _CharUpperW@4 @43 NONAME 55 _CharUpperBuffW@8 @44 NONAME 56 _CompareStringW@24 @45 NONAME 57 _CopyAcceleratorTableW@12 @46 NONAME 58 _CreateAcceleratorTableW@8 @47 NONAME 59 _CreateDCW@16 @48 NONAME 60 _CreateDialogParamW@20 @49 NONAME ; @@@PH imcomplete 61 _CreateDirectoryW@8 @50 NONAME 62 _CreateEventW@16 @51 NONAME 63 _CreateFileW@28 @52 NONAME 64 _CreateFontIndirectW@4 @53 NONAME 65 _CreateICW@16 @54 NONAME 66 _CreateWindowExW@48 @55 NONAME 67 _DefWindowProcW@16 @56 NONAME 68 _DeleteFileW@4 @57 NONAME 69 _DialogBoxIndirectParamW@20 @58 NONAME ; @@@PH imcomplete 70 _DialogBoxParamW@20 @59 NONAME ; @@@PH imcomplete 71 _DispatchMessageW@4 @60 NONAME 72 _DrawTextW@20 @61 NONAME 73 _EnumFontFamiliesW@16 @62 NONAME 74 _EnumFontFamiliesExW@20 @63 NONAME 75 _EnumResourceNamesW@16 @64 NONAME 76 _FindFirstFileW@8 @65 NONAME 77 _FindResourceW@12 @66 NONAME 78 _FindWindowW@8 @67 NONAME 79 _FormatMessageW@28 @68 NONAME 80 _GetClassInfoW@12 @69 NONAME 81 _GetClassLongW@8 @70 NONAME 82 _GetClassNameW@12 @71 NONAME 83 _GetClipboardFormatNameW@12 @72 NONAME 84 _GetCurrentDirectoryW@8 @73 NONAME 85 _SHLWAPI_74@16 @74 NONAME 86 _GetFileAttributesW@4 @75 NONAME 87 _GetFullPathNameW@16 @76 NONAME 88 _GetLocaleInfoW@16 @77 NONAME 89 _GetMenuItemInfoW@16 @78 NONAME 90 _GetMessageW@16 @79 NONAME 91 _GetModuleFileNameW@12 @80 NONAME 92 _GetSystemDirectoryW@8 @81 NONAME 93 _SearchPathW@24 @82 NONAME 94 _GetModuleHandleW@4 @83 NONAME 95 _GetObjectW@12 @84 NONAME 96 _GetPrivateProfileIntW@16 @85 NONAME 97 _GetProfileStringW@20 @86 NONAME 98 _GetPropW@8 @87 NONAME 99 _GetStringTypeExW@20 @88 NONAME 100 _GetTempFileNameW@16 @89 NONAME 101 _GetTempPathW@8 @90 NONAME 102 _GetTextExtentPoint32W@16 @91 NONAME 103 _GetTextFaceW@12 @92 NONAME 104 _GetTextMetricsW@8 @93 NONAME 105 _GetWindowLongW@8 @94 NONAME 106 _GetWindowTextW@12 @95 NONAME 107 _GetWindowTextLengthW@4 @96 NONAME 108 _GetWindowsDirectoryW@8 @97 NONAME 109 _InsertMenuW@20 @98 NONAME 110 _IsDialogMessageW@8 @99 NONAME 111 _LoadAcceleratorsW@8 @100 NONAME 112 _LoadBitmapW@8 @101 NONAME 113 _LoadCursorW@8 @102 NONAME 114 _LoadIconW@8 @103 NONAME 115 _LoadImageW@24 @104 NONAME 116 _LoadLibraryExW@12 @105 NONAME 117 _LoadMenuW@8 @106 NONAME 118 _LoadStringW@16 @107 NONAME 119 _MessageBoxIndirectW@4 @108 NONAME 120 _ModifyMenuW@20 @109 NONAME 121 _GetCharWidth32W@16 @110 NONAME 122 _GetCharacterPlacementW@24 @111 NONAME 123 _CopyFileW@12 @112 NONAME 124 _MoveFileW@8 @113 NONAME 125 _OemToCharW@8 @114 NONAME 126 _OutputDebugStringW@4 @115 NONAME 127 _PeekMessageW@20 @116 NONAME 128 _PostMessageW@16 @117 NONAME 129 _PostThreadMessageW@16 @118 NONAME 130 _RegCreateKeyW@12 @119 NONAME 131 _RegCreateKeyExW@36 @120 NONAME 132 _RegDeleteKeyW@8 @121 NONAME 133 _RegEnumKeyW@16 @122 NONAME 134 _RegEnumKeyExW@32 @123 NONAME 135 _RegOpenKeyW@12 @124 NONAME 136 _RegOpenKeyExW@20 @125 NONAME 137 _RegQueryInfoKeyW@48 @126 NONAME 138 _RegQueryValueW@16 @127 NONAME 139 _RegQueryValueExW@24 @128 NONAME 140 _RegSetValueW@20 @129 NONAME 141 _RegSetValueExW@24 @130 NONAME 142 _RegisterClassW@4 @131 NONAME 143 _RegisterClipboardFormatW@4 @132 NONAME 144 _RegisterWindowMessageW@4 @133 NONAME 145 _RemovePropW@8 @134 NONAME 146 _SendDlgItemMessageW@20 @135 NONAME 147 _SendMessageW@16 @136 NONAME 148 _SetCurrentDirectoryW@4 @137 NONAME 149 149 _SetDlgItemTextW@12 @138 150 150 _SetMenuItemInfoW@16 @139 ; @@@PH imcomplete 151 _SetPropW@12 @140 152 _SetWindowLongW@12 @141 153 _SetWindowsHookExW@16 @142 154 _SetWindowTextW@8 @143 155 _StartDocW@8 @144 156 _SystemParametersInfoW@16 @145 157 _TranslateAcceleratorW@12 @146 158 _UnregisterClassW@8 @147 159 _VkKeyScanW@4 @148 160 _WinHelpW@16 @149 161 _wvsprintfW@12 @150 162 163 _SHLWAPI_156@8 @156 164 _SHLWAPI_158@8 @158 165 _SHLWAPI_160@8 @160 166 _SHLWAPI_169@4 @169 167 _SHLWAPI_170@4 @170 168 _SHLWAPI_185@24 @185 169 _SHLWAPI_191@24 @191 170 _SHLWAPI_193@0 @193 171 _SHLWAPI_197@12 @197 172 _SHLWAPI_219@16 @219 173 _SHLWAPI_222@4 @222 174 _SHLWAPI_223@4 @223 175 _SHLWAPI_237@4 @237 176 _SHLWAPI_240@16 @240 177 _SHLWAPI_241@0 @241 178 _SHLWAPI_243@20 @243 179 ; AssocCreate = _AssocCreate@20 @253 180 ; AssocQueryKeyA = _AssocQueryKeyA@20 @254 181 _SHLWAPI_266@16 @266 182 _SHLWAPI_267@16 @267 183 _SHLWAPI_268@8 @268 184 _SHLWAPI_276@0 @276 185 _SHLWAPI_309@4 @309 186 _RegisterClassExW@4 @314 187 _CallMsgFilterW@8 @332 188 _FindNextFileW@8 @341 189 _SHLWAPI_342@16 @342 190 _SHLWAPI_346@12 @346 191 _SHLWAPI_364@12 @364 192 _SHLWAPI_376@0 @376 193 _SHLWAPI_377@12 @377 151 _SetPropW@12 @140 NONAME 152 _SetWindowLongW@12 @141 NONAME 153 _SetWindowsHookExW@16 @142 NONAME 154 _SetWindowTextW@8 @143 NONAME 155 _StartDocW@8 @144 NONAME 156 _SystemParametersInfoW@16 @145 NONAME 157 _TranslateAcceleratorW@12 @146 NONAME 158 _UnregisterClassW@8 @147 NONAME 159 _VkKeyScanW@4 @148 NONAME 160 _WinHelpW@16 @149 NONAME 161 _wvsprintfW@12 @150 NONAME 162 _SHLWAPI_151@0 @151 NONAME 163 _SHLWAPI_152@12 @152 NONAME 164 _SHLWAPI_153@12 @153 NONAME 165 166 _SHLWAPI_156@8 @156 NONAME 167 _SHLWAPI_158@8 @158 NONAME 168 _CompareStringW@24 @159 NONAME 169 _SHLWAPI_160@8 @160 NONAME 170 _SHLWAPI_162@8 @162 NONAME 171 _SHLWAPI_165@16 @165 NONAME 172 _SHLWAPI_169@4 @169 NONAME 173 _SHLWAPI_170@4 @170 NONAME 174 _SHLWAPI_181@12 @181 NONAME 175 _SHLWAPI_183@4 @183 NONAME 176 _SHLWAPI_185@24 @185 NONAME 177 _SHLWAPI_191@24 @191 NONAME 178 _SHLWAPI_193@0 @193 NONAME 179 _SHLWAPI_197@12 @197 NONAME 180 _SHLWAPI_205@24 @205 NONAME 181 _SHLWAPI_206@24 @206 NONAME 182 _SHLWAPI_215@12 @215 NONAME 183 _SHLWAPI_217@12 @217 NONAME 184 _SHLWAPI_218@16 @218 NONAME 185 _SHLWAPI_219@16 @219 NONAME 186 _SHLWAPI_222@4 @222 NONAME 187 _SHLWAPI_223@4 @223 NONAME 188 _SHLWAPI_237@4 @237 NONAME 189 _SHLWAPI_240@16 @240 NONAME 190 _SHLWAPI_241@0 @241 NONAME 191 _SHLWAPI_243@20 @243 NONAME 192 ; AssocCreate = _AssocCreate@20 @253 ;by name 193 ; AssocQueryKeyA = _AssocQueryKeyA@20 @254 ;by name 194 ; AssocQueryKeyW = _AssocQueryKeyW@20 @255 ;by name 195 _SHLWAPI_266@16 @266 NONAME 196 _SHLWAPI_267@16 @267 NONAME 197 _SHLWAPI_268@8 @268 NONAME 198 _SHLWAPI_276@0 @276 NONAME 199 _SHLWAPI_278@24 @278 NONAME 200 _WritePrivateProfileStringW@16 @298 NONAME 201 202 _DrawTextExW@24 @301 NONAME 203 _GetMenuItemInfoW@16 @302 NONAME ; FIXME CreateFontW 204 _InsertMenuItemW@16 @303 NONAME 205 _CreateMetaFileW@4 @304 NONAME 206 _CreateMutexW@12 @305 NONAME 207 _ExpandEnvironmentStringsW@12 @306 NONAME 208 _CreateSemaphoreW@16 @307 NONAME 209 _IsBadStringPtrW@8 @308 NONAME 210 _LoadLibraryW@4 @309 NONAME 211 _GetTimeFormatW@24 @310 NONAME 212 _GetDateFormatW@24 @311 NONAME 213 _GetPrivateProfileStringW@24 @312 NONAME 214 _SHLWAPI_313@20 @313 NONAME 215 _RegisterClassExW@4 @314 NONAME 216 _GetClassInfoExW@12 @315 NONAME 217 218 _SHLWAPI_318@16 @318 NONAME 219 _FindWindowExW@16 @319 NONAME 220 221 _SHLWAPI_320@8 @320 NONAME 222 _SHLWAPI_321@8 @321 NONAME 223 _SHLWAPI_322@4 @322 NONAME 224 _SHLWAPI_323@4 @323 NONAME 225 226 _CallMsgFilterW@8 @332 NONAME 227 _SHLWAPI_333@4 @333 NONAME 228 _SHLWAPI_334@8 @334 NONAME 229 _SHLWAPI_335@4 @335 NONAME 230 _SHLWAPI_336@4 @336 NONAME 231 _SHLWAPI_337@20 @337 NONAME 232 _SetFileAttributesW@8 @338 NONAME 233 _GetNumberFormatW@24 @339 NONAME 234 _MessageBoxW@16 @340 NONAME 235 _FindNextFileW@8 @341 NONAME 236 _SHLWAPI_342@16 @342 NONAME 237 _SHLWAPI_346@12 @346 NONAME 238 _RegDeleteValueW@8 @347 NONAME 239 240 _SHLWAPI_357@20 @357 NONAME 241 _SHLWAPI_358@24 @358 NONAME 242 _OpenEventW@12 @359 NONAME 243 _RemoveDirectoryW@4 @360 NONAME 244 _GetShortPathNameW@12 @361 NONAME 245 246 _SHLWAPI_364@12 @364 NONAME 247 248 _RegEnumValueW@32 @366 NONAME 249 _WritePrivateProfileStructW@20 @367 NONAME 250 _GetPrivateProfileStructW@20 @368 NONAME 251 _CreateProcessW@40 @369 NONAME 252 _SHLWAPI_370@12 @370 NONAME 253 254 _SHLWAPI_364@12 @364 NONAME 255 _SHLWAPI_376@0 @376 NONAME ;kernel32.GetUserDefaultUILanguage 256 _SHLWAPI_377@12 @377 NONAME 257 _SHLWAPI_378@12 @378 NONAME 258 194 259 ; AssocQueryStringA = _AssocQueryStringA@20 @381 195 260 ; AssocQueryStringByKeyA = _AssocQueryStringByKeyA@20 @382 196 261 ChrCmpIA = _ChrCmpIA@8 @385 197 ; ChrCmpIW = _ChrCmpIW@? @386 198 199 ; _SHLWAPI_407@16 @407 200 ; _SHLWAPI_408@16 @408 201 ; _SHLWAPI_409@12 @409 202 ; _SHLWAPI_410@12 @410 203 204 _SHLWAPI_437@4 @437 262 ; ChrCmpIW = _ChrCmpIW@8 @386 263 264 _SHLWAPI_389@4 @389 NONAME 265 _SHLWAPI_390@8 @390 NONAME 266 _SHLWAPI_391@20 @391 NONAME 267 268 _SHLWAPI_401@4 @401 NONAME 269 _SHLWAPI_402@4 @402 NONAME 270 _SHLWAPI_403@4 @403 NONAME 271 ColorHLSToRGB = _ColorHLSToRGB@12 @404 NONAME 272 273 ; _SHLWAPI_407@16 @407 NONAME 274 ; _SHLWAPI_408@16 @408 NONAME 275 ; _SHLWAPI_409@12 @409 NONAME 276 ; _SHLWAPI_410@12 @410 NONAME 277 278 _SHLWAPI_431@4 @431 NONAME 279 280 _SendMessageTimeoutW@28 @434 NONAME 281 282 _SHLWAPI_437@4 @437 NONAME 283 284 _GetEnvironmentVariableW@12 @442 NONAME 285 _GetSystemWindowsDirectoryA@8 @443 NONAME 286 _GetSystemWindowsDirectoryW@8 @444 NONAME 287 ; ColorRGBToHLS @445 288 205 289 DllGetVersion = _DllGetVersion@4 @446 206 ; GetMenuPosFromID = _GetMenuPosFromID@?@447207 ;HashData = _HashData@16 @448290 GetMenuPosFromID = _GetMenuPosFromID@8 @447 291 HashData = _HashData@16 @448 208 292 ; IntlStrEqWorkerA = _StrIsIntlEqualA@16 @449 209 293 ; IntlStrEqWorkerW = _StrIsIntlEqualw@16 @450 … … 331 415 ; SHDeleteOrphanKeyA = _SHDeleteOrphanKeyA@? @571 332 416 ; SHDeleteOrphanKeyW = _SHDeleteOrphanKeyW@? @572 333 ; SHDeleteValueA = _SHDeleteValueA@?@573334 ; SHDeleteValueW = _SHDeleteValueW@?@574417 SHDeleteValueA = _SHDeleteValueA@12 @573 418 SHDeleteValueW = _SHDeleteValueW@12 @574 335 419 ; SHEnumKeyExA = _SHEnumKeyExA@? @575 336 420 ; SHEnumKeyExW = _SHEnumKeyExW@? @576 337 421 ; SHEnumValueA = _SHEnumValueA@? @577 338 422 ; SHEnumValueW = _SHEnumValueW@? @578 339 ; _SHGetInstanceExplorer@4 = ????@579340 ; SHGetInverseCMAP = _SHGetInverseCMAP@?@580423 _SHGetInstanceExplorer = __SHGetInstanceExplorer@4 @579 424 SHGetInverseCMAP = _SHGetInverseCMAP@8 @580 341 425 ; SHGetThreadRef = _SHGetThreadRef@? @581 342 426 SHGetValueA = _SHGetValueA@24 @582 … … 367 451 SHRegGetUSValueA = _SHRegGetUSValueA@32 @607 368 452 SHRegGetUSValueW = _SHRegGetUSValueW@32 @608 369 ; SHRegOpenUSKeyA = _SHRegOpenUSKeyA@?@609370 ; SHRegOpenUSKeyW = _SHRegOpenUSKeyW@?@610453 SHRegOpenUSKeyA = _SHRegOpenUSKeyA@20 @609 454 SHRegOpenUSKeyW = _SHRegOpenUSKeyW@20 @610 371 455 ; SHRegQueryInfoKeyA = _SHRegQueryInfoKeyA@? @611 372 456 ; SHRegQueryInfoKeyW = _SHRegQueryInfoKeyW@? @612 373 ; SHRegQueryUSValueA = _SHRegQueryUSValueA@?@613374 ; SHRegQueryUSValueW = _SHRegQueryUSValueW@?@614457 SHRegQueryUSValueA = _SHRegQueryUSValueA@32 @613 458 SHRegQueryUSValueW = _SHRegQueryUSValueW@32 @614 375 459 SHRegSetUSValueA = _SHRegSetUSValueA@24 @615 376 460 SHRegSetUSValueW = _SHRegSetUSValueW@24 @616 … … 389 473 StrCatBuffA = _StrCatBuffA@12 @629 390 474 StrCatBuffW = _StrCatBuffW@12 @630 391 ; StrCatA = _StrCatA@?; not exported ?392 ; StrCatW = _StrCatW@?@631475 ; StrCatA = _StrCatA@8 ; not exported ? 476 StrCatW = _StrCatW@8 @631 393 477 StrChrA = _StrChrA@8 @632 394 478 StrChrIA = _StrChrIA@8 @633 … … 415 499 ; IntlStrEqWorkerA = _StrIsIntlEqualA@16 @653 416 500 ; StrIsIntlEqualW = _StrIsIntlEqualW@? @654 417 ; StrNCatA = _StrNCatA@?@655418 ;StrNCatW = _StrNCatW@12 @656501 StrNCatA = _StrNCatA@12 @655 502 StrNCatW = _StrNCatW@12 @656 419 503 ; StrPBrkA = _StrPBrkA@? @657 420 504 ; StrPBrkW = _StrPBrkW@? @658 … … 425 509 ; StrRStrIA = _StrRStrIA@? @663 426 510 ; StrRStrIW = _StrRStrIW@? @664 427 ;StrRetToBufA = _StrRetToBufA@16 @665428 ;StrRetToBufW = _StrRetToBufW@16 @666511 StrRetToBufA = _StrRetToBufA@16 @665 512 StrRetToBufW = _StrRetToBufW@16 @666 429 513 ; StrRetToStrA = _StrRetToStrA@12 @667 430 514 ; StrRetToStrW = _StrRetToStrW@12 @668 … … 436 520 StrStrW = _StrStrW@8 @674 437 521 StrToIntA = _StrToIntA@4 @675 438 ; StrToIntExA = _StrToIntExA@?@676439 ; StrToIntExW = _StrToIntExW@?@677522 StrToIntExA = _StrToIntExA@12 @676 523 StrToIntExW = _StrToIntExW@12 @677 440 524 StrToIntW = _StrToIntW@4 @678 441 525 ; StrTrimA = _StrTrimA@? @679 … … 469 553 wnsprintfA = _wnsprintfA @707 470 554 wnsprintfW = _wnsprintfW @708 471 ; wvnsprintfA = _wvnsprintfA@16 @709 472 ; wvnsprintfW = _wvnsprintfW@16 @710 473 474 ;which ordinals?? 475 StrRetToBufA = _StrRetToBufA@16 @800 476 StrRetToBufW = _StrRetToBufW@16 @801 555 ; wvnsprintfA = _wvnsprintfA@16 @709 556 ; wvnsprintfW = _wvnsprintfW@16 @710 477 557 478 558 SHRegGetPathA = _SHRegGetPathA@20 @802 -
TabularUnified trunk/src/shlwapi/string.c ¶
r4081 r5618 14 14 #include <winnls.h> 15 15 #endif 16 17 16 #include <ctype.h> 18 17 #include <stdlib.h> … … 21 20 22 21 #include "winerror.h" 23 #include "wine/undocshell.h" 22 #include "windef.h" 23 #include "winbase.h" 24 #include "wingdi.h" 25 #include "winuser.h" 26 #include "shlwapi.h" 27 #include "shlobj.h" 24 28 #include "wine/unicode.h" 25 #include "heap.h"26 29 #include "debugtools.h" 27 30 … … 46 49 return strchrW(str, x); 47 50 } 51 #ifndef __WIN32OS2__ 52 /************************************************************************* 53 * StrCmpIW [SHLWAPI] 54 */ 55 int WINAPI StrCmpIW ( LPCWSTR wstr1, LPCWSTR wstr2 ) 56 { 57 TRACE("%s %s\n", debugstr_w(wstr1),debugstr_w(wstr2)); 58 return strcmpiW( wstr1, wstr2 ); 59 } 60 #endif 48 61 49 62 /************************************************************************* … … 84 97 85 98 /************************************************************************* 99 * StrCmpW [SHLWAPI] 100 */ 101 int WINAPI StrCmpW ( LPCWSTR wstr1, LPCWSTR wstr2 ) 102 { 103 TRACE("%s %s\n", debugstr_w(wstr1),debugstr_w(wstr2)); 104 return strcmpW( wstr1, wstr2 ); 105 } 106 107 /************************************************************************* 86 108 * StrCatW [SHLWAPI] 87 109 */ … … 98 120 { 99 121 return strcpyW( wstr1, wstr2 ); 122 } 123 124 125 /************************************************************************* 126 * StrCpyNW [SHLWAPI] 127 */ 128 LPWSTR WINAPI StrCpyNW( LPWSTR wstr1, LPCWSTR wstr2, int n ) 129 { 130 return lstrcpynW( wstr1, wstr2, n ); 100 131 } 101 132 … … 131 162 } 132 163 133 #ifndef __WIN32OS2__134 164 /************************************************************************* 135 165 * StrStrIA [SHLWAPI] … … 161 191 return NULL; 162 192 } 163 #endif164 193 165 194 /************************************************************************* … … 177 206 int WINAPI StrToIntW(LPCWSTR lpSrc) 178 207 { 179 int ret; 180 LPSTR lpStr = HEAP_strdupWtoA(GetProcessHeap(),0,lpSrc); 181 182 TRACE("%s\n", debugstr_w(lpSrc)); 183 184 ret = atol(lpStr); 185 HeapFree(GetProcessHeap(),0,lpStr); 186 return ret; 208 char buffer[32]; 209 210 TRACE("%s\n", debugstr_w(lpSrc)); 211 WideCharToMultiByte( CP_ACP, 0, lpSrc, -1, buffer, sizeof(buffer), NULL, NULL ); 212 buffer[sizeof(buffer)-1] = 0; 213 return atol(buffer); 214 } 215 216 /************************************************************************* 217 * StrToIntExA [SHLWAPI] 218 */ 219 BOOL WINAPI StrToIntExA( LPCSTR pszString, DWORD dwFlags, LPINT piRet) 220 { 221 TRACE("%s %ld stub !\n", debugstr_a(pszString), dwFlags); 222 piRet = (LPINT) StrToIntA(pszString); 223 return TRUE; 224 } 225 226 /************************************************************************* 227 * StrToIntExW [SHLWAPI] 228 */ 229 BOOL WINAPI StrToIntExW( LPCWSTR pszString, DWORD dwFlags, LPINT piRet) 230 { 231 TRACE("%s %ld stub !\n", debugstr_w(pszString), dwFlags); 232 piRet = (LPINT) StrToIntW(pszString); 233 return TRUE; 187 234 } 188 235 … … 348 395 * the pidl is for STRRET OFFSET 349 396 */ 350 HRESULT WINAPI StrRetToBufA (LPSTRRET src, LPITEMIDLISTpidl, LPSTR dest, DWORD len)397 HRESULT WINAPI StrRetToBufA (LPSTRRET src, const ITEMIDLIST *pidl, LPSTR dest, DWORD len) 351 398 { 352 399 TRACE("dest=0x%p len=0x%lx strret=0x%p pidl=%p stub\n",dest,len,src,pidl); … … 386 433 * the pidl is for STRRET OFFSET 387 434 */ 388 HRESULT WINAPI StrRetToBufW (LPSTRRET src, LPITEMIDLISTpidl, LPWSTR dest, DWORD len)435 HRESULT WINAPI StrRetToBufW (LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest, DWORD len) 389 436 { 390 437 TRACE("dest=0x%p len=0x%lx strret=0x%p pidl=%p stub\n",dest,len,src,pidl); … … 398 445 399 446 case STRRET_CSTRA: 400 lstrcpynAtoW((LPWSTR)dest, src->u.cStr, len); 447 if (!MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, dest, len ) && len) 448 dest[len-1] = 0; 401 449 break; 402 450 … … 404 452 if (pidl) 405 453 { 406 lstrcpynAtoW((LPWSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len); 454 if (!MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset, -1, 455 dest, len ) && len) 456 dest[len-1] = 0; 407 457 } 408 458 break; … … 425 475 TRACE("%lx %p %i\n", dw, pszBuf, cchBuf); 426 476 if ( dw<1024L ) 427 { sprintf (buf,"% 3.1f bytes", (FLOAT)dw);477 { sprintf (buf,"%ld bytes", dw); 428 478 } 429 479 else if ( dw<1048576L) … … 444 494 */ 445 495 LPWSTR WINAPI StrFormatByteSizeW ( DWORD dw, LPWSTR pszBuf, UINT cchBuf ) 446 { char buf[64]; 447 TRACE("%lx %p %i\n", dw, pszBuf, cchBuf); 448 if ( dw<1024L ) 449 { sprintf (buf,"%3.1f bytes", (FLOAT)dw); 450 } 451 else if ( dw<1048576L) 452 { sprintf (buf,"%3.1f KB", (FLOAT)dw/1024); 453 } 454 else if ( dw < 1073741824L) 455 { sprintf (buf,"%3.1f MB", (FLOAT)dw/1048576L); 456 } 457 else 458 { sprintf (buf,"%3.1f GB", (FLOAT)dw/1073741824L); 459 } 460 lstrcpynAtoW (pszBuf, buf, cchBuf); 461 return pszBuf; 496 { 497 char buf[64]; 498 StrFormatByteSizeA( dw, buf, sizeof(buf) ); 499 if (!MultiByteToWideChar( CP_ACP, 0, buf, -1, pszBuf, cchBuf ) && cchBuf) 500 pszBuf[cchBuf-1] = 0; 501 return pszBuf; 502 } 503 504 /************************************************************************* 505 * StrNCatA [SHLWAPI] 506 */ 507 LPSTR WINAPI StrNCatA(LPSTR front, LPCSTR back, INT cchMax) 508 { 509 TRACE("%s %s %i stub\n", debugstr_a(front),debugstr_a(back),cchMax); 510 return (front); 511 } 512 513 /************************************************************************* 514 * StrNCatW [SHLWAPI] 515 */ 516 LPWSTR WINAPI StrNCatW(LPWSTR front, LPCWSTR back, INT cchMax) 517 { 518 TRACE("%s %s %i stub\n", debugstr_w(front),debugstr_w(back),cchMax); 519 return (front); 462 520 } 463 521 -
TabularUnified trunk/src/shlwapi/string_odin.cpp ¶
r4081 r5618 1 /* $Id: string_odin.cpp,v 1. 1 2000-08-24 09:32:44sandervl Exp $ */1 /* $Id: string_odin.cpp,v 1.2 2001-04-28 13:32:21 sandervl Exp $ */ 2 2 3 3 /* … … 200 200 ODINFUNCTION2(LPSTR, StrChrIA, 201 201 LPCSTR, lpStart, 202 CHAR, wMatch)202 WORD, wMatch) 203 203 { 204 204 LPSTR lpRes; … … 250 250 251 251 /***************************************************************************** 252 * Name : StrStrIA253 * Purpose : Finds the first occurrence of a substring within a string. The254 * comparison is not case sensitive.255 * Parameters: LPCSTR lpFirst256 * LPCSTR lpSrch257 * Variables :258 * Result : Returns the address of the first occurrence of the matching259 * substring if successful, or NULL otherwise.260 * Remark : SHELL32.261 * Status : COMPLETELY IMPLEMENTED UNTESTED UNKNOWN262 *263 * Author : Patrick Haller [Wed, 1999/12/29 09:00]264 *****************************************************************************/265 266 ODINFUNCTION2(LPSTR, StrStrIA,267 LPCSTR, lpFirst,268 LPCSTR, lpSrch)269 {270 char ch = lpSrch[0]; // look for 1st character271 LONG lLen = lstrlenA(lpSrch); // length of search string272 int iRes; // comparsion result273 274 do275 {276 lpFirst = StrChrIA(lpFirst, // find first matching character277 ch);278 if (NULL == lpFirst) // not found279 return NULL;280 281 iRes = StrCmpNIA((LPSTR)lpFirst, // compare search string282 (LPSTR)lpSrch,283 lLen);284 285 if (0 == iRes) // Found!286 return (LPSTR)lpFirst;287 288 lpFirst = CharNextA(lpFirst); // skip to next character289 }290 while (*lpFirst != 0); // safe termination291 292 return NULL; // default result293 }294 295 296 297 /*****************************************************************************298 * Name : StrStrIW299 * Purpose : Finds the first occurrence of a substring within a string. The300 * comparison is not case sensitive.301 * Parameters: LPCWSTR lpFirst302 * LPCWSTR lpSrch303 * Variables :304 * Result : Returns the address of the first occurrence of the matching305 * substring if successful, or NULL otherwise.306 * Remark : SHELL32.307 * Status : COMPLETELY IMPLEMENTED UNTESTED UNKNOWN308 *309 * Author : Patrick Haller [Wed, 1999/12/29 09:00]310 *****************************************************************************/311 312 ODINFUNCTION2(LPWSTR, StrStrIW,313 LPCWSTR, lpFirst,314 LPCWSTR, lpSrch)315 {316 WCHAR ch = lpSrch[0]; // look for 1st character317 LONG lLen = lstrlenW(lpSrch); // length of search string318 int iRes; // comparsion result319 320 do321 {322 lpFirst = StrChrIW(lpFirst, // find first matching character323 ch);324 if (NULL == lpFirst) // not found325 return NULL;326 327 iRes = StrCmpNIW((LPWSTR)lpFirst, // compare search string328 (LPWSTR)lpSrch,329 lLen);330 331 if (0 == iRes) // Found!332 return (LPWSTR)lpFirst;333 334 lpFirst = CharNextW(lpFirst); // skip to next character335 }336 while (*lpFirst != 0); // safe termination337 338 return NULL; // default result339 }340 341 342 343 344 345 346 /*****************************************************************************347 252 * Name : StrCpyA 348 253 * Purpose : copy a string
Note:
See TracChangeset
for help on using the changeset viewer.