Changeset 5618 for trunk/src/shlwapi
- Timestamp:
 - Apr 28, 2001, 3:33:49 PM (25 years ago)
 - Location:
 - trunk/src/shlwapi
 - Files:
 - 
      
- 4 added
 - 2 deleted
 - 6 edited
 
- 
          
  makefile (modified) (3 diffs)
 - 
          
  ordinal.c (added)
 - 
          
  ordinal.cpp (deleted)
 - 
          
  ordinal_odin.cpp (added)
 - 
          
  path.c (modified) (5 diffs)
 - 
          
  reg.c (modified) (11 diffs)
 - 
          
  shlwapi.def (modified) (9 diffs)
 - 
          
  string.c (modified) (14 diffs)
 - 
          
  string_odin.cpp (modified) (3 diffs)
 - 
          
  url.c (added)
 - 
          
  url.cpp (deleted)
 - 
          
  url_odin.cpp (added)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
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  - 
      
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  - 
      
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  - 
      
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  - 
      
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  - 
      
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.
  