Changeset 8586 for trunk/src


Ignore:
Timestamp:
Jun 7, 2002, 10:22:05 AM (23 years ago)
Author:
sandervl
Message:

some updates + resync for shellord

Location:
trunk/src/shell32
Files:
1 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/dbgwrap.cpp

    r8540 r8586  
    1818#include "shlwapi.h"
    1919
    20 #include "wine/undocshell.h"
     20#include "undocshell.h"
    2121#include "shell32_main.h"
    2222#include "shellapi.h"
     
    4848DEBUGWRAP12(SHILCreateFromPathAW)
    4949DEBUGWRAP4(PathIsRootAW)
    50 NODEF_DEBUGWRAP8(PathBuildRootAW)
     50DEBUGWRAP8(PathBuildRootAW)
    5151DEBUGWRAP4(PathFindExtensionAW)
    5252DEBUGWRAP4(PathAddBackslashAW)
    53 NODEF_DEBUGWRAP4(PathRemoveBlanksAW)
    54 NODEF_DEBUGWRAP4(PathFindFileNameAW)
    55 NODEF_DEBUGWRAP4(PathRemoveFileSpecAW)
    56 NODEF_DEBUGWRAP8(PathAppendAW)
     53DEBUGWRAP4(PathRemoveBlanksAW)
     54DEBUGWRAP4(PathFindFileNameAW)
     55DEBUGWRAP4(PathRemoveFileSpecAW)
     56DEBUGWRAP8(PathAppendAW)
    5757DEBUGWRAP12(PathCombineAW)
    58 NODEF_DEBUGWRAP4(PathStripPathAW)
     58DEBUGWRAP4(PathStripPathAW)
    5959DEBUGWRAP4(PathIsUNCAW)
    6060DEBUGWRAP4(PathIsRelativeAW)
    61 NODEF_DEBUGWRAP4(PathIsExeAW)
     61DEBUGWRAP4(PathIsExeAW)
    6262NODEF_DEBUGWRAP8(DoEnvironmentSubstA)
    63 NODEF_DEBUGWRAP4(PathFileExistsAW)
     63DEBUGWRAP4(PathFileExistsAW)
    6464DEBUGWRAP8(PathMatchSpecAW)
    65 NODEF_DEBUGWRAP20(PathMakeUniqueNameAW)
    66 NODEF_DEBUGWRAP12(PathSetDlgItemPathAW)
     65DEBUGWRAP20(PathMakeUniqueNameAW)
     66DEBUGWRAP12(PathSetDlgItemPathAW)
    6767DEBUGWRAP4(PathQualifyAW)
    68 NODEF_DEBUGWRAP4(PathStripToRootAW)
    69 NODEF_DEBUGWRAP12(PathResolveAW)
    70 NODEF_DEBUGWRAP4(PathGetArgsAW)
     68DEBUGWRAP4(PathStripToRootAW)
     69DEBUGWRAP12(PathResolveAW)
     70DEBUGWRAP4(PathGetArgsAW)
    7171NODEF_DEBUGWRAP8(DoEnvironmentSubstAW)
    7272DEBUGWRAP8_NORET(DragAcceptFiles)
    7373DEBUGWRAP4(PathQuoteSpacesAW)
    74 NODEF_DEBUGWRAP4(PathUnquoteSpacesAW)
     74DEBUGWRAP4(PathUnquoteSpacesAW)
    7575NODEF_DEBUGWRAP4(PathGetDriveNumberAW)
    7676NODEF_DEBUGWRAP16(ParseFieldAW)
     
    105105DEBUGWRAP8(SHFindFiles)
    106106DEBUGWRAP8(SHFindComputer)
    107 NODEF_DEBUGWRAP4(PathGetShortPathAW)
     107DEBUGWRAP4(PathGetShortPathAW)
    108108NODEF_DEBUGWRAP4(SHLogILFromFSIL)
    109109DEBUGWRAP16(StrRetToStrNAW)
     
    170170DEBUGWRAP4(ILCreateFromPathAW)
    171171DEBUGWRAP12(PathGetExtensionAW)
    172 NODEF_DEBUGWRAP4(PathIsDirectoryAW)
     172DEBUGWRAP4(PathIsDirectoryAW)
    173173NODEF_DEBUGWRAP8(SHRunControlPanel)
    174174DEBUGWRAP4(SHSimpleIDListFromPathAW)
     
    180180NODEF_DEBUGWRAP4(SHDestroyPropSheetExtArray)
    181181NODEF_DEBUGWRAP16(SHReplaceFromPropSheetExtArray)
    182 NODEF_DEBUGWRAP8(PathCleanupSpecAW)
     182DEBUGWRAP8(PathCleanupSpecAW)
    183183NODEF_DEBUGWRAP12(SHValidateUNC)
    184184DEBUGWRAP8(SHCreateShellFolderViewEx)
     
    210210NODEF_DEBUGWRAP24(RealShellExecuteW)
    211211NODEF_DEBUGWRAP8(RegenerateUserEnvironment)
    212 NODEF_DEBUGWRAP8(SHAddToRecentDocs)
     212DEBUGWRAP8(SHAddToRecentDocs)
    213213NODEF_DEBUGWRAP8(SHAppBarMessage)
    214 NODEF_DEBUGWRAP4(SHBrowseForFolder)
    215 NODEF_DEBUGWRAP4(SHBrowseForFolderA)
    216 NODEF_DEBUGWRAP4(SHBrowseForFolderW)
     214DEBUGWRAP4(SHBrowseForFolderA)
     215DEBUGWRAP4(SHBrowseForFolderW)
    217216NODEF_DEBUGWRAP16(SHChangeNotifyAW)
    218217NODEF_DEBUGWRAP12(SHEmptyRecycleBinA)
     
    223222NODEF_DEBUGWRAP16(SHFormatDrive)
    224223NODEF_DEBUGWRAP4(SHFreeNameMappings)
    225 NODEF_DEBUGWRAP20(SHGetDataFromIDListA)
    226 NODEF_DEBUGWRAP20(SHGetDataFromIDListW)
    227 NODEF_DEBUGWRAP4(PathParseIconLocationAW)
    228 NODEF_DEBUGWRAP4(PathRemoveExtensionAW)
    229 NODEF_DEBUGWRAP4(PathRemoveArgsAW)
     224DEBUGWRAP20(SHGetDataFromIDListA)
     225DEBUGWRAP20(SHGetDataFromIDListW)
     226DEBUGWRAP4(PathParseIconLocationAW)
     227DEBUGWRAP4(PathRemoveExtensionAW)
     228DEBUGWRAP4(PathRemoveArgsAW)
    230229DEBUGWRAP4(SHGetDesktopFolder)
    231230DEBUGWRAP20(SHGetFileInfoA)
    232231DEBUGWRAP20(SHGetFileInfoW)
    233232NODEF_DEBUGWRAP4(SHGetInstanceExplorer)
    234 NODEF_DEBUGWRAP4(SHGetMalloc)
     233DEBUGWRAP4(SHGetMalloc)
    235234NODEF_DEBUGWRAP20(SHGetNewLinkInfo)
    236235DEBUGWRAP8(SHGetPathFromIDListA)
    237236DEBUGWRAP8(SHGetPathFromIDListW)
    238 NODEF_DEBUGWRAP12(SHGetSpecialFolderLocation)
     237DEBUGWRAP12(SHGetSpecialFolderLocation)
    239238NODEF_DEBUGWRAP16(SHHelpShortcuts_RunDLL)
    240239NODEF_DEBUGWRAP16(SHHelpShortcuts_RunDLLA)
     
    255254DEBUGWRAP16(ShellAboutW)
    256255DEBUGWRAP24(ShellExecuteA)
    257 NODEF_DEBUGWRAP4(ShellExecuteExA)
    258 NODEF_DEBUGWRAP4(ShellExecuteExW)
     256DEBUGWRAP4(ShellExecuteExA)
     257DEBUGWRAP4(ShellExecuteExW)
    259258DEBUGWRAP24(ShellExecuteW)
    260259DEBUGWRAP8(Shell_NotifyIconA)
     
    276275NODEF_DEBUGWRAP24(NTSHChangeNotifyRegister)
    277276NODEF_DEBUGWRAP4(NTSHChangeNotifyDeregister)
    278 NODEF_DEBUGWRAP8(PathIsSameRootAW)
     277DEBUGWRAP8(PathIsSameRootAW)
    279278NODEF_DEBUGWRAP8(ReadCabinetState)
    280279NODEF_DEBUGWRAP4(WriteCabinetState)
    281 NODEF_DEBUGWRAP16(PathProcessCommandAW)
     280DEBUGWRAP16(PathProcessCommandAW)
    282281DEBUGWRAP4(FileIconInit)
    283282NODEF_DEBUGWRAP0(IsUserAdmin)
    284 NODEF_DEBUGWRAP16(SHGetSpecialFolderPathA)
    285 NODEF_DEBUGWRAP8(SHGetSettings)
    286 DEBUGWRAP20(SHGetFolderPathA)
     283DEBUGWRAP16(SHGetSpecialFolderPathA)
     284DEBUGWRAP8(SHGetSettings)
     285NODEF_DEBUGWRAP20(SHGetFolderPathA)
    287286NODEF_DEBUGWRAP20(SHGetFolderPathW)
    288287NODEF_DEBUGWRAP20(SHGetFolderLocation)
  • trunk/src/shell32/enumidlist.c

    r8048 r8586  
    1 /* $Id: enumidlist.c,v 1.4 2002-03-08 11:00:59 sandervl Exp $ */
     1/* $Id: enumidlist.c,v 1.5 2002-06-07 08:21:43 sandervl Exp $ */
    22/*
    33 *      IEnumIDList
     
    1616#include "wine/obj_base.h"
    1717#include "wine/obj_enumidlist.h"
    18 #include "wine/undocshell.h"
     18#include "undocshell.h"
    1919#include "winerror.h"
     20#include "shlwapi.h"
    2021
    2122#include "pidl.h"
  • trunk/src/shell32/sh.cpp

    r7960 r8586  
    1 /* $Id: sh.cpp,v 1.14 2002-02-19 12:53:38 sandervl Exp $ */
     1/* $Id: sh.cpp,v 1.15 2002-06-07 08:21:43 sandervl Exp $ */
    22
    33/*
     
    4949
    5050
    51 /*****************************************************************************
    52  * Name      : LPITEMIDLIST SHBrowseForFolder
    53  * Purpose   :
    54  * Parameters: LPBROWSEINFOA lpbi
    55  * Variables :
    56  * Result    :
    57  * Remark    : SHELL32.236
    58  * Status    : UNTESTED STUB
    59  *
    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 W
    68 
    69   return(NULL);
    70 }
    7151
    7252
  • trunk/src/shell32/shell32.def

    r8048 r8586  
    1 ; $Id: shell32.def,v 1.37 2002-03-08 11:01:00 sandervl Exp $
     1; $Id: shell32.def,v 1.38 2002-06-07 08:21:43 sandervl Exp $
    22
    33; Based on Windows 95
     
    245245    SHAddToRecentDocs                 = _SHAddToRecentDocs@8                  @234
    246246    SHAppBarMessage                   = _SHAppBarMessage@8                    @235
    247     SHBrowseForFolder                 = _SHBrowseForFolder@4                  @236
     247    SHBrowseForFolder                 = _SHBrowseForFolderA@4                 @236
    248248    SHBrowseForFolderA                = _SHBrowseForFolderA@4                 @237
    249249    SHBrowseForFolderW                = _SHBrowseForFolderW@4                 @238
  • trunk/src/shell32/shell32dbg.def

    r8048 r8586  
    1 ; $Id: shell32dbg.def,v 1.2 2002-03-08 11:01:01 sandervl Exp $
     1; $Id: shell32dbg.def,v 1.3 2002-06-07 08:21:43 sandervl Exp $
    22
    33; Based on Windows 95
     
    245245    SHAddToRecentDocs                 = _DbgSHAddToRecentDocs@8                  @234
    246246    SHAppBarMessage                   = _DbgSHAppBarMessage@8                    @235
    247     SHBrowseForFolder                 = _DbgSHBrowseForFolder@4                  @236
     247    SHBrowseForFolder                 = _DbgSHBrowseForFolderA@4                 @236
    248248    SHBrowseForFolderA                = _DbgSHBrowseForFolderA@4                 @237
    249249    SHBrowseForFolderW                = _DbgSHBrowseForFolderW@4                 @238
  • trunk/src/shell32/shellord.c

    r8048 r8586  
    22 * The parameters of many functions changes between different OS versions
    33 * (NT uses Unicode strings, 95 uses ASCII strings)
    4  * 
     4 *
    55 * Copyright 1997 Marcus Meissner
    66 *           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 */
    2022#include <string.h>
    2123#include <stdio.h>
    2224#include "winerror.h"
    2325#include "winreg.h"
    24 #include "debugtools.h"
     26#include "wine/debug.h"
    2527#include "winnls.h"
    26 
    27 #ifdef __WIN32OS2__
    28 #include "heapstring.h"
    29 #else
    3028#include "heap.h"
    31 #endif
    32 
    33 #include "shlwapi.h"
     29
     30#include "wine/obj_base.h"
    3431#include "shellapi.h"
    3532#include "shlguid.h"
    3633#include "shlobj.h"
    3734#include "shell32_main.h"
    38 #ifdef __WIN32OS2__
    39 #include "wine\undocshell.h"
    40 #else
    4135#include "undocshell.h"
    42 #endif
    4336#include "pidl.h"
    4437#include "shlwapi.h"
    4538#include "commdlg.h"
    4639
    47 DEFAULT_DEBUG_CHANNEL(shell);
     40WINE_DEFAULT_DEBUG_CHANNEL(shell);
     41WINE_DECLARE_DEBUG_CHANNEL(pidl);
    4842
    4943/*************************************************************************
    5044 * ParseFieldA                                  [internal]
    5145 *
    52  * copys a field from a ',' delimited string
    53  * 
     46 * copies a field from a ',' delimited string
     47 *
    5448 * first field is nField = 1
    5549 */
     
    5852        DWORD nField,
    5953        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);
    6357
    6458        if (!src || !src[0] || !dst || !len)
     
    7468        /* copy part till the next ',' to dst */
    7569        while ( *src!='\0' && *src!=',' && (len--)>0 ) *(dst++)=*(src++);
    76        
     70
    7771        /* finalize the string */
    7872        *dst=0x0;
    79        
     73
    8074        return TRUE;
    8175}
     
    8579 *
    8680 * copies a field from a ',' delimited string
    87  * 
     81 *
    8882 * first field is nField = 1
    8983 */
    90 DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len) 
     84DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len)
    9185{
    9286        FIXME("(%s,0x%08lx,%p,%ld) stub\n",
     
    9892 * ParseField                   [SHELL32.58]
    9993 */
    100 DWORD WINAPI ParseFieldAW(LPCVOID src, DWORD nField, LPVOID dst, DWORD len) 
     94DWORD WINAPI ParseFieldAW(LPCVOID src, DWORD nField, LPVOID dst, DWORD len)
    10195{
    10296        if (SHELL_OsIsUnicode())
     
    107101/*************************************************************************
    108102 * GetFileNameFromBrowse                        [SHELL32.63]
    109  * 
     103 *
    110104 */
    111105BOOL WINAPI GetFileNameFromBrowse(
     
    116110        LPCSTR lpstrDefExt,
    117111        LPCSTR lpstrFilter,
    118                                     LPCSTR lpstrTitle)
     112        LPCSTR lpstrTitle)
    119113{
    120114    HMODULE hmodule;
     
    127121          lpstrFilter, lpstrTitle);
    128122
    129     /* OFN_HIDEREADONLY|OFN_NOCHANGEDIR|OFN_FILEMUSTEXIST|OFN_unknown */
    130123    hmodule = LoadLibraryA("comdlg32.dll");
    131124    if(!hmodule) return FALSE;
     
    149142    ofn.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_FILEMUSTEXIST;
    150143    ret = pGetOpenFileNameA(&ofn);
    151    
     144
    152145    FreeLibrary(hmodule);
    153146    return ret;
     
    164157/*************************************************************************
    165158 * SHGetSettings                                [SHELL32.@]
    166  * 
     159 *
    167160 * NOTES
    168161 *  the registry path are for win98 (tested)
     
    177170
    178171        TRACE("(%p 0x%08lx)\n",lpsfs,dwMask);
    179        
     172
    180173        if (RegCreateKeyExA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
    181174                                 0, 0, 0, KEY_ALL_ACCESS, 0, &hKey, 0))
    182175          return;
    183        
     176
    184177        if ( (SSF_SHOWEXTENSIONS & dwMask) && !RegQueryValueExA(hKey, "HideFileExt", 0, 0, (LPBYTE)&dwData, &dwDataSize))
    185178          lpsfs->fShowExtensions  = ((dwData == 0) ?  0 : 1);
     
    223216 *
    224217 * PARAMETERS
    225  *  hwndCabinet defines the explorer cabinet window that contains the 
     218 *  hwndCabinet defines the explorer cabinet window that contains the
    226219 *              shellview you need to communicate with
    227220 *  uMsg        identifying the SFVM enum to perform
     
    235228 */
    236229int WINAPI SHShellFolderView_Message(
    237         HWND hwndCabinet, 
     230        HWND hwndCabinet,
    238231        DWORD dwMessage,
    239232        DWORD dwParam)
     
    249242 *      hwnd [I]  window handle
    250243 *      y    [I]  flag ????
    251  * 
     244 *
    252245 * NOTES
    253246 *     exported by ordinal
     
    300293          pszText = lpText;
    301294
    302         FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, 
     295        FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING,
    303296                       pszText, 0, 0, (LPWSTR)&pszTemp, 0, &args);
    304297
     
    342335          pszText = lpText;
    343336
    344         FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, 
     337        FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING,
    345338                       pszText, 0, 0, (LPSTR)&pszTemp, 0, &args);
    346339
     
    360353 */
    361354#define MEM_DEBUG 0
    362 
    363 void WIN32API SHFree(LPVOID x)
     355void WINAPI SHFree(LPVOID x)
    364356{
    365357#if MEM_DEBUG
     
    380372        TRACE("%p\n",x);
    381373#endif
    382  
    383 #if __WIN32OS2__
    384   HEAP_free(x);
    385 #else
    386   HeapFree(GetProcessHeap(), 0, x);
    387 #endif
     374        HeapFree(GetProcessHeap(), 0, x);
    388375}
    389376
     
    395382 *     exported by ordinal
    396383 */
    397 LPVOID WIN32API SHAlloc(DWORD len)
     384LPVOID WINAPI SHAlloc(DWORD len)
    398385{
    399386        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
    408388#if MEM_DEBUG
    409389        ret = (LPVOID) HeapAlloc(GetProcessHeap(),0,len+6);
    410390#else
    411391        ret = (LPVOID) HeapAlloc(GetProcessHeap(),0,len);
    412 #endif
    413392#endif
    414393
     
    471450/*************************************************************************
    472451 * ArrangeWindows                               [SHELL32.184]
    473  * 
     452 *
    474453 */
    475454WORD WINAPI ArrangeWindows(
     
    517496    INT ret;
    518497
    519     /* Get the key for the policies location in the registry 
     498    /* Get the key for the policies location in the registry
    520499     */
    521500    if (RegOpenKeyExA(HKEY_LOCAL_MACHINE,
     
    526505                          "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",
    527506                          0, KEY_READ, &Policy_basekey)) {
    528             TRACE("No Explorer Policies location exists. Policy wanted=%s\n",
    529                   policy);
     507            TRACE("No Explorer Policies location exists. Policy wanted=%s\n",
     508                  policy);
    530509            *len = 0;
    531510            return ERROR_FILE_NOT_FOUND;
     
    575554    LPSTR ptr;
    576555    INT wlen;
    577    
     556
    578557    /*FIXME: Document:
    579558     *  RecentDocs MRU data structure seems to be:
    580559     *    +0h   document file name w/ terminating 0h
    581560     *    +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
    583562     *    +n+4h 10 bytes zeros  -   unknown
    584563     *    +n+eh shortcut file name w/ terminating 0h
     
    604583    *len = ptr - buffer;
    605584
    606     /* Add the new entry into the MRU list 
     585    /* Add the new entry into the MRU list
    607586     */
    608587    return pAddMRUData(mruhandle, (LPCVOID)buffer, *len);
     
    621600 * FIXME: ?? MSDN shows this as a VOID
    622601 */
    623 DWORD WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)   
    624 {
    625 
    626 #ifndef __WIN32OS2__
     602DWORD WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)
     603{
     604
    627605/* FIXME: !!! move CREATEMRULIST and flags to header file !!! */
    628606/*        !!! it is in both here and comctl32undoc.c      !!! */
     
    649627 * Need to check what return value means identical - 0?
    650628 */
    651 #endif
     629
    652630
    653631    UINT olderrormode;
     
    667645     *    +0h   document file name w/ terminating 0h
    668646     *    +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
    670648     *    +n+4h 10 bytes zeros  -   unknown
    671649     *    +n+eh shortcut file name w/ terminating 0h
     
    682660    }
    683661    if (ret == ERROR_SUCCESS) {
    684         if (!( (type == REG_DWORD) || 
     662        if (!( (type == REG_DWORD) ||
    685663               ((type == REG_BINARY) && (datalen == 4)) )) {
    686664            ERR("Error policy data for \"NoRecentDocsHistory\" not formated correctly, type=%ld, len=%ld\n",
     
    702680     */
    703681    if (RegCreateKeyExA(HKEY_CURRENT_USER,
    704                   "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer",
    705                   0, 0, 0, KEY_READ, 0, &HCUbasekey ,0)) {
    706       ERR("Failed to create 'Software\\Microsoft\\Windows\\CurrentVersion\\Explorer'\n");
    707       return 0;
     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;
    708686    }
    709687
     
    711689     */
    712690    if(SUCCEEDED(SHGetMalloc(&ppM))) {
    713         if (SUCCEEDED(SHGetSpecialFolderLocation(hwnd, CSIDL_RECENT, 
     691        if (SUCCEEDED(SHGetSpecialFolderLocation(hwnd, CSIDL_RECENT,
    714692                                                 &pidl))) {
    715693            SHGetPathFromIDListA(pidl, link_dir);
    716694            IMalloc_Free(ppM, pidl);
    717695        }
    718         else {
    719             /* serious issues */
    720             link_dir[0] = 0;
    721             ERR("serious issues 1\n");
    722         }
    723         IMalloc_Release(ppM);
     696        else {
     697            /* serious issues */
     698            link_dir[0] = 0;
     699            ERR("serious issues 1\n");
     700        }
     701        IMalloc_Release(ppM);
    724702    }
    725703    else {
     
    761739     *   1. Add document to MRU list in registry "HKCU\Software\
    762740     *      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
    764742     *      (CSIDL_RECENT).
    765743     *   3. Add shortcut to Start menu's Documents submenu.
     
    775753    }
    776754    TRACE("full document name %s\n", doc_name);
    777     PathStripPathA(doc_name);;
     755    PathStripPathA(doc_name);
    778756    TRACE("stripped document name %s\n", doc_name);
    779757
     
    781759    /* ***  JOB 1: Update registry for ...\Explorer\RecentDocs list  *** */
    782760
    783     {  /* on input needs: 
    784         *      doc_name    -  pure file-spec, no path 
     761    {  /* on input needs:
     762        *      doc_name    -  pure file-spec, no path
    785763        *      link_dir    -  path to the user's Recent directory
    786764        *      HCUbasekey  -  key of ...Windows\CurrentVersion\Explorer" node
     
    788766        *      new_lnk_name-  pure file-spec, no path for new .lnk file
    789767        *      new_lnk_filepath
    790         *                  -  path and file name of new .lnk file 
     768        *                  -  path and file name of new .lnk file
    791769        */
    792770        CREATEMRULIST mymru;
     
    816794        pos = pFindMRUData(mruhandle, doc_name, len, 0);
    817795
    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
    820798         */
    821         if ((bufused = pEnumMRUListA(mruhandle, (pos == -1) ? 14 : pos, 
     799        if ((bufused = pEnumMRUListA(mruhandle, (pos == -1) ? 14 : pos,
    822800                                     buffer, 2048)) != -1) {
    823801            ptr = buffer;
     
    882860    /* ***  JOB 2: Create shortcut in user's "Recent" directory  *** */
    883861
    884     {  /* on input needs: 
     862    {  /* on input needs:
    885863        *      doc_name    -  pure file-spec, no path
    886864        *      new_lnk_filepath
    887         *                  -  path and file name of new .lnk file 
     865        *                  -  path and file name of new .lnk file
    888866        *      uFlags[in]  -  flags on call to SHAddToRecentDocs
    889867        *      pv[in]      -  document path/pidl on call to SHAddToRecentDocs
     
    904882        if(SUCCEEDED(hres)) {
    905883
    906             hres = IShellLinkA_QueryInterface(psl, &IID_IPersistFile, 
     884            hres = IShellLinkA_QueryInterface(psl, &IID_IPersistFile,
    907885                                             (LPVOID *)&pPf);
    908886            if(FAILED(hres)) {
     
    933911            }
    934912
    935             MultiByteToWideChar(CP_ACP, 0, new_lnk_filepath, -1, 
     913            MultiByteToWideChar(CP_ACP, 0, new_lnk_filepath, -1,
    936914                                widelink, MAX_PATH);
    937915            /* create the short cut */
     
    947925            IPersistFile_Release(pPf);
    948926            IShellLinkA_Release(psl);
    949             TRACE("shortcut %s has been created, result=%08lx\n", 
     927            TRACE("shortcut %s has been created, result=%08lx\n",
    950928                  new_lnk_filepath, hres);
    951929        }
     
    975953        IShellView * psf;
    976954        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",
    979957          psvcbi->pshf, psvcbi->pidlFolder, psvcbi->lpfnCallback,
    980958          psvcbi->uViewMode, psvcbi->dwUser);
    981959
    982960        psf = IShellView_Constructor(psvcbi->pshf);
    983        
     961
    984962        if (!psf)
    985963          return E_OUTOFMEMORY;
     
    10351013        STARTUPINFOA  startup;
    10361014        PROCESS_INFORMATION info;
    1037                        
     1015
    10381016        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");
    10421021
    10431022        ZeroMemory(szApplicationName,MAX_PATH);
    10441023        if (sei->lpFile)
    10451024          strcpy(szApplicationName, sei->lpFile);
    1046        
     1025
    10471026        ZeroMemory(szCommandline,MAX_PATH);
    10481027        if (sei->lpParameters)
    10491028          strcpy(szCommandline, sei->lpParameters);
    1050                        
     1029
    10511030        if (sei->fMask & (SEE_MASK_CLASSKEY | SEE_MASK_INVOKEIDLIST | SEE_MASK_ICON | SEE_MASK_HOTKEY |
    10521031                          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 |
    10541033                          SEE_MASK_NO_CONSOLE | SEE_MASK_ASYNCOK | SEE_MASK_HMONITOR ))
    10551034        {
    10561035          FIXME("flags ignored: 0x%08lx\n", sei->fMask);
    10571036        }
    1058        
     1037
    10591038        /* launch a document by fileclass like 'Wordpad.Document.1' */
    10601039        if (sei->fMask & SEE_MASK_CLASSNAME)
    1061         {
    1062         /* FIXME: szCommandline should not be of a fixed size. Plus MAX_PATH is way too short! */
     1040        {
     1041          /* FIXME: szCommandline should not be of a fixed size. Plus MAX_PATH is way too short! */
    10631042          /* the commandline contains 'c:\Path\wordpad.exe "%1"' */
    10641043          HCR_GetExecuteCommand(sei->lpClass, (sei->lpVerb) ? sei->lpVerb : "open", szCommandline, sizeof(szCommandline));
     
    10851064              sprintf(szPidl,":%p",pv );
    10861065              SHUnlockShared(pv);
    1087            
     1066
    10881067              gap = strlen(szPidl);
    10891068              len = strlen(pos)-2;
     
    10981077
    10991078        if (szCommandline[0]) {
    1100                 strcat(szApplicationName, " ");
    1101                 strcat(szApplicationName, szCommandline);
     1079          strcat(szApplicationName, " ");
     1080          strcat(szApplicationName, szCommandline);
    11021081        }
    11031082
     
    11061085
    11071086        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))
    11111090        {
    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        }
    11141123        }
    11151124
    11161125        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
    11221127        if(sei->fMask & SEE_MASK_NOCLOSEPROCESS)
    1123           sei->hProcess = info.hProcess;         
     1128          sei->hProcess = info.hProcess;
    11241129        else
    11251130          CloseHandle( info.hProcess );
     
    11381143
    11391144        memcpy(&seiA, sei, sizeof(SHELLEXECUTEINFOA));
    1140        
     1145
    11411146        if (sei->lpVerb)
    11421147          seiA.lpVerb = HEAP_strdupWtoA( GetProcessHeap(), 0, sei->lpVerb);
     
    11551160        else
    11561161          seiA.lpClass = NULL;
    1157                  
     1162
    11581163        ret = ShellExecuteExA(&seiA);
    11591164
     
    12781283{       HGLOBAL hmem;
    12791284        LPVOID pmem;
    1280        
     1285
    12811286        TRACE("ptr=%p size=0x%04lx procID=0x%04lx\n",psrc,size,procID);
    12821287        hmem = GlobalAlloc(GMEM_FIXED, size);
    12831288        if (!hmem)
    12841289          return 0;
    1285        
     1290
    12861291        pmem =  GlobalLock (hmem);
    12871292
    12881293        if (! pmem)
    12891294          return 0;
    1290          
     1295
    12911296        memcpy (pmem, psrc, size);
    1292         GlobalUnlock(hmem); 
     1297        GlobalUnlock(hmem);
    12931298        return hmem;
    12941299}
     
    12991304 *  parameter1 is return value from SHAllocShared
    13001305 *  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 (?)
    13021307 *  the return value seems to be a memory address
    13031308 */
     
    13151320{
    13161321        TRACE("%p\n",pv);
    1317         return GlobalUnlock((HANDLE)pv); 
     1322        return GlobalUnlock((HANDLE)pv);
    13181323}
    13191324/*************************************************************************
     
    13891394 */
    13901395BOOL WINAPI SHWaitForFileToOpen(
    1391         LPCITEMIDLIST pidl, 
     1396        LPCITEMIDLIST pidl,
    13921397        DWORD dwFlags,
    13931398        DWORD dwTimeout)
     
    14631468/*************************************************************************
    14641469 *      @                             [SHELL32.243]
    1465  * 
     1470 *
    14661471 * Win98+ by-ordinal routine.  In Win98 this routine returns zero and
    14671472 * does nothing else.  Possibly this does something in NT or SHELL32 5.0?
     
    14691474 */
    14701475
    1471 BOOL WINAPI shell32_243(DWORD a, DWORD b) 
    1472 { 
    1473   return FALSE; 
     1476BOOL WINAPI shell32_243(DWORD a, DWORD b)
     1477{
     1478  return FALSE;
    14741479}
    14751480
     
    15201525
    15211526/*************************************************************************
    1522 *      CIDLData_CreateFromIDArray[SHELL32.83]
    1523 *
    1524 *  Create IDataObject from PIDLs??
    1525 */
     1527 *      CIDLData_CreateFromIDArray      [SHELL32.83]
     1528 *
     1529 *  Create IDataObject from PIDLs??
     1530 */
    15261531HRESULT 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]);
    15461545    }
    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.