- Timestamp:
- Jun 7, 2002, 10:22:05 AM (23 years ago)
- Location:
- trunk/src/shell32
- Files:
-
- 1 added
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/dbgwrap.cpp
r8540 r8586 18 18 #include "shlwapi.h" 19 19 20 #include " wine/undocshell.h"20 #include "undocshell.h" 21 21 #include "shell32_main.h" 22 22 #include "shellapi.h" … … 48 48 DEBUGWRAP12(SHILCreateFromPathAW) 49 49 DEBUGWRAP4(PathIsRootAW) 50 NODEF_DEBUGWRAP8(PathBuildRootAW)50 DEBUGWRAP8(PathBuildRootAW) 51 51 DEBUGWRAP4(PathFindExtensionAW) 52 52 DEBUGWRAP4(PathAddBackslashAW) 53 NODEF_DEBUGWRAP4(PathRemoveBlanksAW)54 NODEF_DEBUGWRAP4(PathFindFileNameAW)55 NODEF_DEBUGWRAP4(PathRemoveFileSpecAW)56 NODEF_DEBUGWRAP8(PathAppendAW)53 DEBUGWRAP4(PathRemoveBlanksAW) 54 DEBUGWRAP4(PathFindFileNameAW) 55 DEBUGWRAP4(PathRemoveFileSpecAW) 56 DEBUGWRAP8(PathAppendAW) 57 57 DEBUGWRAP12(PathCombineAW) 58 NODEF_DEBUGWRAP4(PathStripPathAW)58 DEBUGWRAP4(PathStripPathAW) 59 59 DEBUGWRAP4(PathIsUNCAW) 60 60 DEBUGWRAP4(PathIsRelativeAW) 61 NODEF_DEBUGWRAP4(PathIsExeAW)61 DEBUGWRAP4(PathIsExeAW) 62 62 NODEF_DEBUGWRAP8(DoEnvironmentSubstA) 63 NODEF_DEBUGWRAP4(PathFileExistsAW)63 DEBUGWRAP4(PathFileExistsAW) 64 64 DEBUGWRAP8(PathMatchSpecAW) 65 NODEF_DEBUGWRAP20(PathMakeUniqueNameAW)66 NODEF_DEBUGWRAP12(PathSetDlgItemPathAW)65 DEBUGWRAP20(PathMakeUniqueNameAW) 66 DEBUGWRAP12(PathSetDlgItemPathAW) 67 67 DEBUGWRAP4(PathQualifyAW) 68 NODEF_DEBUGWRAP4(PathStripToRootAW)69 NODEF_DEBUGWRAP12(PathResolveAW)70 NODEF_DEBUGWRAP4(PathGetArgsAW)68 DEBUGWRAP4(PathStripToRootAW) 69 DEBUGWRAP12(PathResolveAW) 70 DEBUGWRAP4(PathGetArgsAW) 71 71 NODEF_DEBUGWRAP8(DoEnvironmentSubstAW) 72 72 DEBUGWRAP8_NORET(DragAcceptFiles) 73 73 DEBUGWRAP4(PathQuoteSpacesAW) 74 NODEF_DEBUGWRAP4(PathUnquoteSpacesAW)74 DEBUGWRAP4(PathUnquoteSpacesAW) 75 75 NODEF_DEBUGWRAP4(PathGetDriveNumberAW) 76 76 NODEF_DEBUGWRAP16(ParseFieldAW) … … 105 105 DEBUGWRAP8(SHFindFiles) 106 106 DEBUGWRAP8(SHFindComputer) 107 NODEF_DEBUGWRAP4(PathGetShortPathAW)107 DEBUGWRAP4(PathGetShortPathAW) 108 108 NODEF_DEBUGWRAP4(SHLogILFromFSIL) 109 109 DEBUGWRAP16(StrRetToStrNAW) … … 170 170 DEBUGWRAP4(ILCreateFromPathAW) 171 171 DEBUGWRAP12(PathGetExtensionAW) 172 NODEF_DEBUGWRAP4(PathIsDirectoryAW)172 DEBUGWRAP4(PathIsDirectoryAW) 173 173 NODEF_DEBUGWRAP8(SHRunControlPanel) 174 174 DEBUGWRAP4(SHSimpleIDListFromPathAW) … … 180 180 NODEF_DEBUGWRAP4(SHDestroyPropSheetExtArray) 181 181 NODEF_DEBUGWRAP16(SHReplaceFromPropSheetExtArray) 182 NODEF_DEBUGWRAP8(PathCleanupSpecAW)182 DEBUGWRAP8(PathCleanupSpecAW) 183 183 NODEF_DEBUGWRAP12(SHValidateUNC) 184 184 DEBUGWRAP8(SHCreateShellFolderViewEx) … … 210 210 NODEF_DEBUGWRAP24(RealShellExecuteW) 211 211 NODEF_DEBUGWRAP8(RegenerateUserEnvironment) 212 NODEF_DEBUGWRAP8(SHAddToRecentDocs)212 DEBUGWRAP8(SHAddToRecentDocs) 213 213 NODEF_DEBUGWRAP8(SHAppBarMessage) 214 NODEF_DEBUGWRAP4(SHBrowseForFolder) 215 NODEF_DEBUGWRAP4(SHBrowseForFolderA) 216 NODEF_DEBUGWRAP4(SHBrowseForFolderW) 214 DEBUGWRAP4(SHBrowseForFolderA) 215 DEBUGWRAP4(SHBrowseForFolderW) 217 216 NODEF_DEBUGWRAP16(SHChangeNotifyAW) 218 217 NODEF_DEBUGWRAP12(SHEmptyRecycleBinA) … … 223 222 NODEF_DEBUGWRAP16(SHFormatDrive) 224 223 NODEF_DEBUGWRAP4(SHFreeNameMappings) 225 NODEF_DEBUGWRAP20(SHGetDataFromIDListA)226 NODEF_DEBUGWRAP20(SHGetDataFromIDListW)227 NODEF_DEBUGWRAP4(PathParseIconLocationAW)228 NODEF_DEBUGWRAP4(PathRemoveExtensionAW)229 NODEF_DEBUGWRAP4(PathRemoveArgsAW)224 DEBUGWRAP20(SHGetDataFromIDListA) 225 DEBUGWRAP20(SHGetDataFromIDListW) 226 DEBUGWRAP4(PathParseIconLocationAW) 227 DEBUGWRAP4(PathRemoveExtensionAW) 228 DEBUGWRAP4(PathRemoveArgsAW) 230 229 DEBUGWRAP4(SHGetDesktopFolder) 231 230 DEBUGWRAP20(SHGetFileInfoA) 232 231 DEBUGWRAP20(SHGetFileInfoW) 233 232 NODEF_DEBUGWRAP4(SHGetInstanceExplorer) 234 NODEF_DEBUGWRAP4(SHGetMalloc)233 DEBUGWRAP4(SHGetMalloc) 235 234 NODEF_DEBUGWRAP20(SHGetNewLinkInfo) 236 235 DEBUGWRAP8(SHGetPathFromIDListA) 237 236 DEBUGWRAP8(SHGetPathFromIDListW) 238 NODEF_DEBUGWRAP12(SHGetSpecialFolderLocation)237 DEBUGWRAP12(SHGetSpecialFolderLocation) 239 238 NODEF_DEBUGWRAP16(SHHelpShortcuts_RunDLL) 240 239 NODEF_DEBUGWRAP16(SHHelpShortcuts_RunDLLA) … … 255 254 DEBUGWRAP16(ShellAboutW) 256 255 DEBUGWRAP24(ShellExecuteA) 257 NODEF_DEBUGWRAP4(ShellExecuteExA)258 NODEF_DEBUGWRAP4(ShellExecuteExW)256 DEBUGWRAP4(ShellExecuteExA) 257 DEBUGWRAP4(ShellExecuteExW) 259 258 DEBUGWRAP24(ShellExecuteW) 260 259 DEBUGWRAP8(Shell_NotifyIconA) … … 276 275 NODEF_DEBUGWRAP24(NTSHChangeNotifyRegister) 277 276 NODEF_DEBUGWRAP4(NTSHChangeNotifyDeregister) 278 NODEF_DEBUGWRAP8(PathIsSameRootAW)277 DEBUGWRAP8(PathIsSameRootAW) 279 278 NODEF_DEBUGWRAP8(ReadCabinetState) 280 279 NODEF_DEBUGWRAP4(WriteCabinetState) 281 NODEF_DEBUGWRAP16(PathProcessCommandAW)280 DEBUGWRAP16(PathProcessCommandAW) 282 281 DEBUGWRAP4(FileIconInit) 283 282 NODEF_DEBUGWRAP0(IsUserAdmin) 284 NODEF_DEBUGWRAP16(SHGetSpecialFolderPathA)285 NODEF_DEBUGWRAP8(SHGetSettings)286 DEBUGWRAP20(SHGetFolderPathA)283 DEBUGWRAP16(SHGetSpecialFolderPathA) 284 DEBUGWRAP8(SHGetSettings) 285 NODEF_DEBUGWRAP20(SHGetFolderPathA) 287 286 NODEF_DEBUGWRAP20(SHGetFolderPathW) 288 287 NODEF_DEBUGWRAP20(SHGetFolderLocation) -
trunk/src/shell32/enumidlist.c
r8048 r8586 1 /* $Id: enumidlist.c,v 1. 4 2002-03-08 11:00:59sandervl Exp $ */1 /* $Id: enumidlist.c,v 1.5 2002-06-07 08:21:43 sandervl Exp $ */ 2 2 /* 3 3 * IEnumIDList … … 16 16 #include "wine/obj_base.h" 17 17 #include "wine/obj_enumidlist.h" 18 #include " wine/undocshell.h"18 #include "undocshell.h" 19 19 #include "winerror.h" 20 #include "shlwapi.h" 20 21 21 22 #include "pidl.h" -
trunk/src/shell32/sh.cpp
r7960 r8586 1 /* $Id: sh.cpp,v 1.1 4 2002-02-19 12:53:38sandervl Exp $ */1 /* $Id: sh.cpp,v 1.15 2002-06-07 08:21:43 sandervl Exp $ */ 2 2 3 3 /* … … 49 49 50 50 51 /*****************************************************************************52 * Name : LPITEMIDLIST SHBrowseForFolder53 * Purpose :54 * Parameters: LPBROWSEINFOA lpbi55 * Variables :56 * Result :57 * Remark : SHELL32.23658 * Status : UNTESTED STUB59 *60 * Author : Patrick Haller [Tue, 1999/06/09 20:02]61 *****************************************************************************/62 63 LPITEMIDLIST WIN32API SHBrowseForFolder(LPBROWSEINFOA lpbi)64 {65 dprintf(("SHELL32: SHBrowseForFolder not implemented.\n"));66 67 //@@@PH automatically decide between A and W68 69 return(NULL);70 }71 51 72 52 -
trunk/src/shell32/shell32.def
r8048 r8586 1 ; $Id: shell32.def,v 1.3 7 2002-03-08 11:01:00sandervl Exp $1 ; $Id: shell32.def,v 1.38 2002-06-07 08:21:43 sandervl Exp $ 2 2 3 3 ; Based on Windows 95 … … 245 245 SHAddToRecentDocs = _SHAddToRecentDocs@8 @234 246 246 SHAppBarMessage = _SHAppBarMessage@8 @235 247 SHBrowseForFolder = _SHBrowseForFolder @4@236247 SHBrowseForFolder = _SHBrowseForFolderA@4 @236 248 248 SHBrowseForFolderA = _SHBrowseForFolderA@4 @237 249 249 SHBrowseForFolderW = _SHBrowseForFolderW@4 @238 -
trunk/src/shell32/shell32dbg.def
r8048 r8586 1 ; $Id: shell32dbg.def,v 1. 2 2002-03-08 11:01:01sandervl Exp $1 ; $Id: shell32dbg.def,v 1.3 2002-06-07 08:21:43 sandervl Exp $ 2 2 3 3 ; Based on Windows 95 … … 245 245 SHAddToRecentDocs = _DbgSHAddToRecentDocs@8 @234 246 246 SHAppBarMessage = _DbgSHAppBarMessage@8 @235 247 SHBrowseForFolder = _DbgSHBrowseForFolder @4@236247 SHBrowseForFolder = _DbgSHBrowseForFolderA@4 @236 248 248 SHBrowseForFolderA = _DbgSHBrowseForFolderA@4 @237 249 249 SHBrowseForFolderW = _DbgSHBrowseForFolderW@4 @238 -
trunk/src/shell32/shellord.c
r8048 r8586 2 2 * The parameters of many functions changes between different OS versions 3 3 * (NT uses Unicode strings, 95 uses ASCII strings) 4 * 4 * 5 5 * Copyright 1997 Marcus Meissner 6 6 * 1998 Jürgen Schmied 7 */ 8 9 /**************************************************************************** 10 * includes 11 ****************************************************************************/ 12 13 #include <odin.h> 14 #include <os2sel.h> 15 #include <odinwrap.h> 16 17 ODINDEBUGCHANNEL(SHELL32-SHELLORD) 18 19 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Lesser General Public 10 * License as published by the Free Software Foundation; either 11 * version 2.1 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public 19 * License along with this library; if not, write to the Free Software 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 */ 20 22 #include <string.h> 21 23 #include <stdio.h> 22 24 #include "winerror.h" 23 25 #include "winreg.h" 24 #include " debugtools.h"26 #include "wine/debug.h" 25 27 #include "winnls.h" 26 27 #ifdef __WIN32OS2__28 #include "heapstring.h"29 #else30 28 #include "heap.h" 31 #endif 32 33 #include "shlwapi.h" 29 30 #include "wine/obj_base.h" 34 31 #include "shellapi.h" 35 32 #include "shlguid.h" 36 33 #include "shlobj.h" 37 34 #include "shell32_main.h" 38 #ifdef __WIN32OS2__39 #include "wine\undocshell.h"40 #else41 35 #include "undocshell.h" 42 #endif43 36 #include "pidl.h" 44 37 #include "shlwapi.h" 45 38 #include "commdlg.h" 46 39 47 DEFAULT_DEBUG_CHANNEL(shell); 40 WINE_DEFAULT_DEBUG_CHANNEL(shell); 41 WINE_DECLARE_DEBUG_CHANNEL(pidl); 48 42 49 43 /************************************************************************* 50 44 * ParseFieldA [internal] 51 45 * 52 * cop ys a field from a ',' delimited string53 * 46 * copies a field from a ',' delimited string 47 * 54 48 * first field is nField = 1 55 49 */ … … 58 52 DWORD nField, 59 53 LPSTR dst, 60 DWORD len) 61 { 62 WARN("( '%s',0x%08lx,%p,%ld) semi-stub.\n",src,nField,dst,len);54 DWORD len) 55 { 56 WARN("(%s,0x%08lx,%p,%ld) semi-stub.\n",debugstr_a(src),nField,dst,len); 63 57 64 58 if (!src || !src[0] || !dst || !len) … … 74 68 /* copy part till the next ',' to dst */ 75 69 while ( *src!='\0' && *src!=',' && (len--)>0 ) *(dst++)=*(src++); 76 70 77 71 /* finalize the string */ 78 72 *dst=0x0; 79 73 80 74 return TRUE; 81 75 } … … 85 79 * 86 80 * copies a field from a ',' delimited string 87 * 81 * 88 82 * first field is nField = 1 89 83 */ 90 DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len) 84 DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len) 91 85 { 92 86 FIXME("(%s,0x%08lx,%p,%ld) stub\n", … … 98 92 * ParseField [SHELL32.58] 99 93 */ 100 DWORD WINAPI ParseFieldAW(LPCVOID src, DWORD nField, LPVOID dst, DWORD len) 94 DWORD WINAPI ParseFieldAW(LPCVOID src, DWORD nField, LPVOID dst, DWORD len) 101 95 { 102 96 if (SHELL_OsIsUnicode()) … … 107 101 /************************************************************************* 108 102 * GetFileNameFromBrowse [SHELL32.63] 109 * 103 * 110 104 */ 111 105 BOOL WINAPI GetFileNameFromBrowse( … … 116 110 LPCSTR lpstrDefExt, 117 111 LPCSTR lpstrFilter, 118 112 LPCSTR lpstrTitle) 119 113 { 120 114 HMODULE hmodule; … … 127 121 lpstrFilter, lpstrTitle); 128 122 129 /* OFN_HIDEREADONLY|OFN_NOCHANGEDIR|OFN_FILEMUSTEXIST|OFN_unknown */130 123 hmodule = LoadLibraryA("comdlg32.dll"); 131 124 if(!hmodule) return FALSE; … … 149 142 ofn.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_FILEMUSTEXIST; 150 143 ret = pGetOpenFileNameA(&ofn); 151 144 152 145 FreeLibrary(hmodule); 153 146 return ret; … … 164 157 /************************************************************************* 165 158 * SHGetSettings [SHELL32.@] 166 * 159 * 167 160 * NOTES 168 161 * the registry path are for win98 (tested) … … 177 170 178 171 TRACE("(%p 0x%08lx)\n",lpsfs,dwMask); 179 172 180 173 if (RegCreateKeyExA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", 181 174 0, 0, 0, KEY_ALL_ACCESS, 0, &hKey, 0)) 182 175 return; 183 176 184 177 if ( (SSF_SHOWEXTENSIONS & dwMask) && !RegQueryValueExA(hKey, "HideFileExt", 0, 0, (LPBYTE)&dwData, &dwDataSize)) 185 178 lpsfs->fShowExtensions = ((dwData == 0) ? 0 : 1); … … 223 216 * 224 217 * PARAMETERS 225 * hwndCabinet defines the explorer cabinet window that contains the 218 * hwndCabinet defines the explorer cabinet window that contains the 226 219 * shellview you need to communicate with 227 220 * uMsg identifying the SFVM enum to perform … … 235 228 */ 236 229 int WINAPI SHShellFolderView_Message( 237 HWND hwndCabinet, 230 HWND hwndCabinet, 238 231 DWORD dwMessage, 239 232 DWORD dwParam) … … 249 242 * hwnd [I] window handle 250 243 * y [I] flag ???? 251 * 244 * 252 245 * NOTES 253 246 * exported by ordinal … … 300 293 pszText = lpText; 301 294 302 FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, 295 FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, 303 296 pszText, 0, 0, (LPWSTR)&pszTemp, 0, &args); 304 297 … … 342 335 pszText = lpText; 343 336 344 FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, 337 FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, 345 338 pszText, 0, 0, (LPSTR)&pszTemp, 0, &args); 346 339 … … 360 353 */ 361 354 #define MEM_DEBUG 0 362 363 void WIN32API SHFree(LPVOID x) 355 void WINAPI SHFree(LPVOID x) 364 356 { 365 357 #if MEM_DEBUG … … 380 372 TRACE("%p\n",x); 381 373 #endif 382 383 #if __WIN32OS2__ 384 HEAP_free(x); 385 #else 386 HeapFree(GetProcessHeap(), 0, x); 387 #endif 374 HeapFree(GetProcessHeap(), 0, x); 388 375 } 389 376 … … 395 382 * exported by ordinal 396 383 */ 397 LPVOID WIN 32API SHAlloc(DWORD len)384 LPVOID WINAPI SHAlloc(DWORD len) 398 385 { 399 386 LPBYTE ret; 400 401 #ifdef __WIN32OS2__ 402 #if MEM_DEBUG 403 ret = (LPVOID) HEAP_malloc(len+6); 404 #else 405 ret = (LPVOID) HEAP_malloc(len); 406 #endif 407 #else 387 408 388 #if MEM_DEBUG 409 389 ret = (LPVOID) HeapAlloc(GetProcessHeap(),0,len+6); 410 390 #else 411 391 ret = (LPVOID) HeapAlloc(GetProcessHeap(),0,len); 412 #endif413 392 #endif 414 393 … … 471 450 /************************************************************************* 472 451 * ArrangeWindows [SHELL32.184] 473 * 452 * 474 453 */ 475 454 WORD WINAPI ArrangeWindows( … … 517 496 INT ret; 518 497 519 /* Get the key for the policies location in the registry 498 /* Get the key for the policies location in the registry 520 499 */ 521 500 if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, … … 526 505 "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", 527 506 0, KEY_READ, &Policy_basekey)) { 528 529 507 TRACE("No Explorer Policies location exists. Policy wanted=%s\n", 508 policy); 530 509 *len = 0; 531 510 return ERROR_FILE_NOT_FOUND; … … 575 554 LPSTR ptr; 576 555 INT wlen; 577 556 578 557 /*FIXME: Document: 579 558 * RecentDocs MRU data structure seems to be: 580 559 * +0h document file name w/ terminating 0h 581 560 * +nh short int w/ size of remaining 582 * +n+2h 02h 30h, or 01h 30h, or 00h 30h - unknown 561 * +n+2h 02h 30h, or 01h 30h, or 00h 30h - unknown 583 562 * +n+4h 10 bytes zeros - unknown 584 563 * +n+eh shortcut file name w/ terminating 0h … … 604 583 *len = ptr - buffer; 605 584 606 /* Add the new entry into the MRU list 585 /* Add the new entry into the MRU list 607 586 */ 608 587 return pAddMRUData(mruhandle, (LPCVOID)buffer, *len); … … 621 600 * FIXME: ?? MSDN shows this as a VOID 622 601 */ 623 DWORD WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv) 624 { 625 626 #ifndef __WIN32OS2__ 602 DWORD WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv) 603 { 604 627 605 /* FIXME: !!! move CREATEMRULIST and flags to header file !!! */ 628 606 /* !!! it is in both here and comctl32undoc.c !!! */ … … 649 627 * Need to check what return value means identical - 0? 650 628 */ 651 #endif 629 652 630 653 631 UINT olderrormode; … … 667 645 * +0h document file name w/ terminating 0h 668 646 * +nh short int w/ size of remaining 669 * +n+2h 02h 30h, or 01h 30h, or 00h 30h - unknown 647 * +n+2h 02h 30h, or 01h 30h, or 00h 30h - unknown 670 648 * +n+4h 10 bytes zeros - unknown 671 649 * +n+eh shortcut file name w/ terminating 0h … … 682 660 } 683 661 if (ret == ERROR_SUCCESS) { 684 if (!( (type == REG_DWORD) || 662 if (!( (type == REG_DWORD) || 685 663 ((type == REG_BINARY) && (datalen == 4)) )) { 686 664 ERR("Error policy data for \"NoRecentDocsHistory\" not formated correctly, type=%ld, len=%ld\n", … … 702 680 */ 703 681 if (RegCreateKeyExA(HKEY_CURRENT_USER, 704 705 0, 0, 0, KEY_READ, 0, &HCUbasekey ,0)) {706 707 682 "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer", 683 0, 0, 0, KEY_READ, 0, &HCUbasekey, 0)) { 684 ERR("Failed to create 'Software\\Microsoft\\Windows\\CurrentVersion\\Explorer'\n"); 685 return 0; 708 686 } 709 687 … … 711 689 */ 712 690 if(SUCCEEDED(SHGetMalloc(&ppM))) { 713 if (SUCCEEDED(SHGetSpecialFolderLocation(hwnd, CSIDL_RECENT, 691 if (SUCCEEDED(SHGetSpecialFolderLocation(hwnd, CSIDL_RECENT, 714 692 &pidl))) { 715 693 SHGetPathFromIDListA(pidl, link_dir); 716 694 IMalloc_Free(ppM, pidl); 717 695 } 718 719 720 721 722 723 696 else { 697 /* serious issues */ 698 link_dir[0] = 0; 699 ERR("serious issues 1\n"); 700 } 701 IMalloc_Release(ppM); 724 702 } 725 703 else { … … 761 739 * 1. Add document to MRU list in registry "HKCU\Software\ 762 740 * Microsoft\Windows\CurrentVersion\Explorer\RecentDocs". 763 * 2. Add shortcut to document in the user's Recent directory 741 * 2. Add shortcut to document in the user's Recent directory 764 742 * (CSIDL_RECENT). 765 743 * 3. Add shortcut to Start menu's Documents submenu. … … 775 753 } 776 754 TRACE("full document name %s\n", doc_name); 777 PathStripPathA(doc_name); ;755 PathStripPathA(doc_name); 778 756 TRACE("stripped document name %s\n", doc_name); 779 757 … … 781 759 /* *** JOB 1: Update registry for ...\Explorer\RecentDocs list *** */ 782 760 783 { /* on input needs: 784 * doc_name - pure file-spec, no path 761 { /* on input needs: 762 * doc_name - pure file-spec, no path 785 763 * link_dir - path to the user's Recent directory 786 764 * HCUbasekey - key of ...Windows\CurrentVersion\Explorer" node … … 788 766 * new_lnk_name- pure file-spec, no path for new .lnk file 789 767 * new_lnk_filepath 790 * - path and file name of new .lnk file 768 * - path and file name of new .lnk file 791 769 */ 792 770 CREATEMRULIST mymru; … … 816 794 pos = pFindMRUData(mruhandle, doc_name, len, 0); 817 795 818 /* Now get the MRU entry that will be replaced 819 * and delete the .lnk file for it 796 /* Now get the MRU entry that will be replaced 797 * and delete the .lnk file for it 820 798 */ 821 if ((bufused = pEnumMRUListA(mruhandle, (pos == -1) ? 14 : pos, 799 if ((bufused = pEnumMRUListA(mruhandle, (pos == -1) ? 14 : pos, 822 800 buffer, 2048)) != -1) { 823 801 ptr = buffer; … … 882 860 /* *** JOB 2: Create shortcut in user's "Recent" directory *** */ 883 861 884 { /* on input needs: 862 { /* on input needs: 885 863 * doc_name - pure file-spec, no path 886 864 * new_lnk_filepath 887 * - path and file name of new .lnk file 865 * - path and file name of new .lnk file 888 866 * uFlags[in] - flags on call to SHAddToRecentDocs 889 867 * pv[in] - document path/pidl on call to SHAddToRecentDocs … … 904 882 if(SUCCEEDED(hres)) { 905 883 906 hres = IShellLinkA_QueryInterface(psl, &IID_IPersistFile, 884 hres = IShellLinkA_QueryInterface(psl, &IID_IPersistFile, 907 885 (LPVOID *)&pPf); 908 886 if(FAILED(hres)) { … … 933 911 } 934 912 935 MultiByteToWideChar(CP_ACP, 0, new_lnk_filepath, -1, 913 MultiByteToWideChar(CP_ACP, 0, new_lnk_filepath, -1, 936 914 widelink, MAX_PATH); 937 915 /* create the short cut */ … … 947 925 IPersistFile_Release(pPf); 948 926 IShellLinkA_Release(psl); 949 TRACE("shortcut %s has been created, result=%08lx\n", 927 TRACE("shortcut %s has been created, result=%08lx\n", 950 928 new_lnk_filepath, hres); 951 929 } … … 975 953 IShellView * psf; 976 954 HRESULT hRes; 977 978 TRACE("sf=%p pidl=%p cb=%p mode=0x%08x parm=0x%08lx\n", 955 956 TRACE("sf=%p pidl=%p cb=%p mode=0x%08x parm=0x%08lx\n", 979 957 psvcbi->pshf, psvcbi->pidlFolder, psvcbi->lpfnCallback, 980 958 psvcbi->uViewMode, psvcbi->dwUser); 981 959 982 960 psf = IShellView_Constructor(psvcbi->pshf); 983 961 984 962 if (!psf) 985 963 return E_OUTOFMEMORY; … … 1035 1013 STARTUPINFOA startup; 1036 1014 PROCESS_INFORMATION info; 1037 1015 1038 1016 WARN("mask=0x%08lx hwnd=0x%04x verb=%s file=%s parm=%s dir=%s show=0x%08x class=%s incomplete\n", 1039 sei->fMask, sei->hwnd, sei->lpVerb, sei->lpFile, 1040 sei->lpParameters, sei->lpDirectory, sei->nShow, 1041 (sei->fMask & SEE_MASK_CLASSNAME) ? sei->lpClass : "not used"); 1017 sei->fMask, sei->hwnd, debugstr_a(sei->lpVerb), 1018 debugstr_a(sei->lpFile), debugstr_a(sei->lpParameters), 1019 debugstr_a(sei->lpDirectory), sei->nShow, 1020 (sei->fMask & SEE_MASK_CLASSNAME) ? debugstr_a(sei->lpClass) : "not used"); 1042 1021 1043 1022 ZeroMemory(szApplicationName,MAX_PATH); 1044 1023 if (sei->lpFile) 1045 1024 strcpy(szApplicationName, sei->lpFile); 1046 1025 1047 1026 ZeroMemory(szCommandline,MAX_PATH); 1048 1027 if (sei->lpParameters) 1049 1028 strcpy(szCommandline, sei->lpParameters); 1050 1029 1051 1030 if (sei->fMask & (SEE_MASK_CLASSKEY | SEE_MASK_INVOKEIDLIST | SEE_MASK_ICON | SEE_MASK_HOTKEY | 1052 1031 SEE_MASK_CONNECTNETDRV | SEE_MASK_FLAG_DDEWAIT | 1053 SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI | SEE_MASK_UNICODE | 1032 SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI | SEE_MASK_UNICODE | 1054 1033 SEE_MASK_NO_CONSOLE | SEE_MASK_ASYNCOK | SEE_MASK_HMONITOR )) 1055 1034 { 1056 1035 FIXME("flags ignored: 0x%08lx\n", sei->fMask); 1057 1036 } 1058 1037 1059 1038 /* launch a document by fileclass like 'Wordpad.Document.1' */ 1060 1039 if (sei->fMask & SEE_MASK_CLASSNAME) 1061 1062 1040 { 1041 /* FIXME: szCommandline should not be of a fixed size. Plus MAX_PATH is way too short! */ 1063 1042 /* the commandline contains 'c:\Path\wordpad.exe "%1"' */ 1064 1043 HCR_GetExecuteCommand(sei->lpClass, (sei->lpVerb) ? sei->lpVerb : "open", szCommandline, sizeof(szCommandline)); … … 1085 1064 sprintf(szPidl,":%p",pv ); 1086 1065 SHUnlockShared(pv); 1087 1066 1088 1067 gap = strlen(szPidl); 1089 1068 len = strlen(pos)-2; … … 1098 1077 1099 1078 if (szCommandline[0]) { 1100 1101 1079 strcat(szApplicationName, " "); 1080 strcat(szApplicationName, szCommandline); 1102 1081 } 1103 1082 … … 1106 1085 1107 1086 if (! CreateProcessA(NULL, szApplicationName, 1108 NULL, NULL, FALSE, 0, 1109 NULL, sei->lpDirectory, 1110 &startup, &info))1087 NULL, NULL, FALSE, 0, 1088 NULL, sei->lpDirectory, 1089 &startup, &info)) 1111 1090 { 1112 sei->hInstApp = GetLastError(); 1113 return FALSE; 1091 BOOL failed = TRUE; 1092 1093 if ((!sei->lpVerb)||(strcasecmp(sei->lpVerb,"open"))) 1094 { 1095 LPSTR ext = PathFindExtensionA(szApplicationName); 1096 CHAR key[1023]; 1097 CHAR buffer[1023]; 1098 CHAR cmdline[1023]; 1099 DWORD size; 1100 1101 sprintf(key,"Software\\Classes\\%s",ext); 1102 size = 1023; 1103 if (!RegQueryValueA(HKEY_LOCAL_MACHINE,key,buffer,&size)) 1104 { 1105 sprintf(key,"Software\\Classes\\%s\\shell\\%s\\command", buffer, 1106 (sei->lpVerb)?sei->lpVerb:"open"); 1107 size = 1023; 1108 if (!RegQueryValueA(HKEY_LOCAL_MACHINE,key,buffer,&size)) 1109 { 1110 sprintf(cmdline,"%s \"%s\"",buffer,szApplicationName); 1111 if (CreateProcessA(NULL,cmdline, NULL, NULL, FALSE, 0, 1112 NULL, sei->lpDirectory, &startup, &info)) 1113 failed = FALSE; 1114 } 1115 } 1116 } 1117 1118 if (failed) 1119 { 1120 sei->hInstApp = GetLastError(); 1121 return FALSE; 1122 } 1114 1123 } 1115 1124 1116 1125 sei->hInstApp = 33; 1117 1118 /* Give 30 seconds to the app to come up */ 1119 if ( WaitForInputIdle ( info.hProcess, 30000 ) == 0xFFFFFFFF ) 1120 ERR("WaitForInputIdle failed: Error %ld\n", GetLastError() ); 1121 1126 1122 1127 if(sei->fMask & SEE_MASK_NOCLOSEPROCESS) 1123 sei->hProcess = info.hProcess; 1128 sei->hProcess = info.hProcess; 1124 1129 else 1125 1130 CloseHandle( info.hProcess ); … … 1138 1143 1139 1144 memcpy(&seiA, sei, sizeof(SHELLEXECUTEINFOA)); 1140 1145 1141 1146 if (sei->lpVerb) 1142 1147 seiA.lpVerb = HEAP_strdupWtoA( GetProcessHeap(), 0, sei->lpVerb); … … 1155 1160 else 1156 1161 seiA.lpClass = NULL; 1157 1162 1158 1163 ret = ShellExecuteExA(&seiA); 1159 1164 … … 1278 1283 { HGLOBAL hmem; 1279 1284 LPVOID pmem; 1280 1285 1281 1286 TRACE("ptr=%p size=0x%04lx procID=0x%04lx\n",psrc,size,procID); 1282 1287 hmem = GlobalAlloc(GMEM_FIXED, size); 1283 1288 if (!hmem) 1284 1289 return 0; 1285 1290 1286 1291 pmem = GlobalLock (hmem); 1287 1292 1288 1293 if (! pmem) 1289 1294 return 0; 1290 1295 1291 1296 memcpy (pmem, psrc, size); 1292 GlobalUnlock(hmem); 1297 GlobalUnlock(hmem); 1293 1298 return hmem; 1294 1299 } … … 1299 1304 * parameter1 is return value from SHAllocShared 1300 1305 * parameter2 is return value from GetCurrentProcessId 1301 * the receiver of (WM_USER+2) tries to lock the HANDLE (?) 1306 * the receiver of (WM_USER+2) tries to lock the HANDLE (?) 1302 1307 * the return value seems to be a memory address 1303 1308 */ … … 1315 1320 { 1316 1321 TRACE("%p\n",pv); 1317 return GlobalUnlock((HANDLE)pv); 1322 return GlobalUnlock((HANDLE)pv); 1318 1323 } 1319 1324 /************************************************************************* … … 1389 1394 */ 1390 1395 BOOL WINAPI SHWaitForFileToOpen( 1391 LPCITEMIDLIST pidl, 1396 LPCITEMIDLIST pidl, 1392 1397 DWORD dwFlags, 1393 1398 DWORD dwTimeout) … … 1463 1468 /************************************************************************* 1464 1469 * @ [SHELL32.243] 1465 * 1470 * 1466 1471 * Win98+ by-ordinal routine. In Win98 this routine returns zero and 1467 1472 * does nothing else. Possibly this does something in NT or SHELL32 5.0? … … 1469 1474 */ 1470 1475 1471 BOOL WINAPI shell32_243(DWORD a, DWORD b) 1472 { 1473 return FALSE; 1476 BOOL WINAPI shell32_243(DWORD a, DWORD b) 1477 { 1478 return FALSE; 1474 1479 } 1475 1480 … … 1520 1525 1521 1526 /************************************************************************* 1522 * CIDLData_CreateFromIDArray[SHELL32.83]1523 *1524 * Create IDataObject from PIDLs??1525 */1527 * CIDLData_CreateFromIDArray [SHELL32.83] 1528 * 1529 * Create IDataObject from PIDLs?? 1530 */ 1526 1531 HRESULT WINAPI CIDLData_CreateFromIDArray( 1527 LPCITEMIDLIST pidlFolder, 1528 DWORD cpidlFiles, 1529 LPCITEMIDLIST *lppidlFiles, 1530 LPDATAOBJECT *ppdataObject) 1531 { 1532 INT i; 1533 HWND hwnd = 0; /*FIXME: who should be hwnd of owner? set to desktop */ 1534 BOOL boldpidl; 1535 1536 #ifndef __WIN32OS2__ 1537 if (TRACE_ON(shell)) { 1538 TRACE("(%p, %ld, %p, %p)\n", pidlFolder, cpidlFiles, 1539 lppidlFiles, ppdataObject); 1540 boldpidl = TRACE_ON(pidl); 1541 __SET_DEBUGGING(__DBCL_TRACE, __wine_dbch_shell, FALSE); 1542 __SET_DEBUGGING(__DBCL_TRACE, __wine_dbch_pidl, TRUE); 1543 pdump (pidlFolder); 1544 for (i=0; i<cpidlFiles; i++){ 1545 pdump (lppidlFiles[i]); 1532 LPCITEMIDLIST pidlFolder, 1533 DWORD cpidlFiles, 1534 LPCITEMIDLIST *lppidlFiles, 1535 LPDATAOBJECT *ppdataObject) 1536 { 1537 INT i; 1538 HWND hwnd = 0; /*FIXME: who should be hwnd of owner? set to desktop */ 1539 1540 TRACE("(%p, %ld, %p, %p)\n", pidlFolder, cpidlFiles, lppidlFiles, ppdataObject); 1541 if (TRACE_ON(pidl)) 1542 { 1543 pdump (pidlFolder); 1544 for (i=0; i<cpidlFiles; i++) pdump (lppidlFiles[i]); 1546 1545 } 1547 __SET_DEBUGGING(__DBCL_TRACE, __wine_dbch_shell, TRUE); 1548 __SET_DEBUGGING(__DBCL_TRACE, __wine_dbch_pidl, boldpidl); 1549 } 1550 #endif 1551 1552 *ppdataObject = IDataObject_Constructor( hwnd, pidlFolder, 1553 lppidlFiles, cpidlFiles); 1554 if (*ppdataObject) return S_OK; 1555 return E_OUTOFMEMORY; 1556 } 1546 *ppdataObject = IDataObject_Constructor( hwnd, pidlFolder, 1547 lppidlFiles, cpidlFiles); 1548 if (*ppdataObject) return S_OK; 1549 return E_OUTOFMEMORY; 1550 }
Note:
See TracChangeset
for help on using the changeset viewer.