reactos/reactos/dll/win32/shell32/debughlp.c

426 lines
11 KiB
C
Raw Normal View History

/*
* Helper functions for debugging
*
* Copyright 1998, 2002 Juergen Schmied
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <precomp.h>
WINE_DEFAULT_DEBUG_CHANNEL(pidl);
static
LPITEMIDLIST _dbg_ILGetNext(LPCITEMIDLIST pidl)
{
WORD len;
if(pidl)
{
len = pidl->mkid.cb;
if (len)
{
return (LPITEMIDLIST) (((LPBYTE)pidl)+len);
}
}
return NULL;
}
static
BOOL _dbg_ILIsDesktop(LPCITEMIDLIST pidl)
{
return ( !pidl || (pidl && pidl->mkid.cb == 0x00) );
}
static
LPPIDLDATA _dbg_ILGetDataPointer(LPCITEMIDLIST pidl)
{
if(pidl && pidl->mkid.cb != 0x00)
return (LPPIDLDATA) &(pidl->mkid.abID);
return NULL;
}
static
LPSTR _dbg_ILGetTextPointer(LPCITEMIDLIST pidl)
{
LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl);
if (pdata)
{
switch (pdata->type)
{
case PT_GUID:
case PT_SHELLEXT:
case PT_YAGUID:
return NULL;
case PT_DRIVE:
case PT_DRIVE1:
case PT_DRIVE2:
case PT_DRIVE3:
return (LPSTR)&(pdata->u.drive.szDriveName);
case PT_FOLDER:
case PT_FOLDER1:
case PT_VALUE:
case PT_IESPECIAL1:
case PT_IESPECIAL2:
return (LPSTR)&(pdata->u.file.szNames);
case PT_WORKGRP:
case PT_COMP:
case PT_NETWORK:
case PT_NETPROVIDER:
case PT_SHARE:
return (LPSTR)&(pdata->u.network.szNames);
}
}
return NULL;
}
static
LPWSTR _dbg_ILGetTextPointerW(LPCITEMIDLIST pidl)
{
LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl);
if (pdata)
{
switch (pdata->type)
{
case PT_GUID:
case PT_SHELLEXT:
case PT_YAGUID:
return NULL;
case PT_DRIVE:
case PT_DRIVE1:
case PT_DRIVE2:
case PT_DRIVE3:
/* return (LPSTR)&(pdata->u.drive.szDriveName);*/
return NULL;
case PT_FOLDER:
case PT_FOLDER1:
case PT_VALUE:
case PT_IESPECIAL1:
case PT_IESPECIAL2:
/* return (LPSTR)&(pdata->u.file.szNames); */
return NULL;
case PT_WORKGRP:
case PT_COMP:
case PT_NETWORK:
case PT_NETPROVIDER:
case PT_SHARE:
/* return (LPSTR)&(pdata->u.network.szNames); */
return NULL;
case PT_VALUEW:
return (LPWSTR)&(pdata->u.file.szNames);
}
}
return NULL;
}
static
LPSTR _dbg_ILGetSTextPointer(LPCITEMIDLIST pidl)
{
LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl);
if (pdata)
{
switch (pdata->type)
{
case PT_FOLDER:
case PT_VALUE:
case PT_IESPECIAL1:
case PT_IESPECIAL2:
return (LPSTR)(pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1);
case PT_WORKGRP:
return (LPSTR)(pdata->u.network.szNames + strlen (pdata->u.network.szNames) + 1);
}
}
return NULL;
}
static
LPWSTR _dbg_ILGetSTextPointerW(LPCITEMIDLIST pidl)
{
LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl);
if (pdata)
{
switch (pdata->type)
{
case PT_FOLDER:
case PT_VALUE:
case PT_IESPECIAL1:
case PT_IESPECIAL2:
/*return (LPSTR)(pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1); */
return NULL;
case PT_WORKGRP:
/* return (LPSTR)(pdata->u.network.szNames + strlen (pdata->u.network.szNames) + 1); */
return NULL;
case PT_VALUEW:
return (LPWSTR)(pdata->u.file.szNames + wcslen ((LPWSTR)pdata->u.file.szNames) + 1);
}
}
return NULL;
}
static
IID* _dbg_ILGetGUIDPointer(LPCITEMIDLIST pidl)
{
LPPIDLDATA pdata =_ILGetDataPointer(pidl);
if (pdata)
{
switch (pdata->type)
{
case PT_SHELLEXT:
case PT_GUID:
Sync to Wine-20050419: Francois Gouget <fgouget@free.fr> - Assorted spelling fixes. Mike McCormack <mike@codeweavers.com> - Remove an unused function. - Eliminate casts of the return value of HeapAlloc. - Convert path to unicode, rearrange to remove forward declaration. - Remove forward declarations of interface methods. - Remove some dead code and some ifdefs. - Use api definitions, remove duplicate code. - Fix usage of STGM_ enumerations, remove forward declaration. - Fix up PIDL dumping code. - Fix a regression in the file open dialog. Jon Griffiths <jon_p_griffiths@yahoo.com> - Use LMEM_ flags for LocalAlloc(), not GMEM_ (GlobalAlloc). Huw Davies <huw@codeweavers.com> - Fix the icon resource ids (most were off by one). - Fix IExtractIcon_{GetIconLocation,Extract} to use -ve icon resource ids and fix bugs relating to confusion between resource ids and the system imagelist indicies. - Extend the system imagelist initialization hack to load both +ve and -ve resource ids. - Add a printer icon (that'll be used by an upcoming printer folder patch). - When we're hiding file extensions then SetNameOf should append the original extension if SHGDN_FORPARSING isn't set. - The flags passed to SetNameOf refer to the dst string not the src pidl. - If ICommDlgBrowser_OnDefaultCommand returns anything other than S_OK then we should call the default handler. - Directory items should have the SFGOA_FILESYSANCESTOR attribute. Add a test for this and cleanup the shlfolder test a bit. - Better icon handling for some special folders. - Identify and add defines for a bunch of shell icons. - Add a unicode pidl type. - Improve support for PT_YAGUID. - Improve IShellLink debugging. Steven Edwards <steven_ed4153@yahoo.com> - Register Shell Drag and Drop Helper. Juan Lang <juan_lang@yahoo.com> - Use Unicode string result from GetDisplayNameOf if it isn't representable using ANSI. - Correct registering shell folders (values in Shell Folders key weren't getting written). Martin Fuchs <martin-fuchs@gmx.net> - switch to correct shell desktop context menu - launch desk.cpl when activating the desktop context menu entry "properties" - don't send WM_COMMAND if we didn't get a shell view window - Correct comments of some export ordinals. Peter Berg Larsen <pebl@math.ku.dk> - Replace strncpy with memcpy or lstrcpyn. Troy Rollo <wine@troy.rollo.name> - Fix SEGV for non-fully-qualified destination paths. - Don't fail ShFileOperationW if FOF_ALLOWUNDO is passed. Filip Navara <xnavara@volny.cz> - _dbg_ILGetNext returns NULL if pidl->mkid.cb is zero, fix the loops accordingly. Aric Stewart <aric@codeweavers.com> - For ShellExecuteExA we need to copy out the hProcess value from the W structure. svn path=/trunk/; revision=15024
2005-05-05 22:16:20 +00:00
case PT_YAGUID:
return &(pdata->u.guid.guid);
}
}
return NULL;
}
static
Sync to Wine-20050930: Michael Jung <mjung@iss.tu-darmstadt.de> - Don't clone pidlLast in SHBindToParent. - Pass correct pointer to SHFree in case of failure in UNIXFS_path_to_pidl. - Return E_FAIL if we can't get the unix path in IPersistFolder3::InitializeEx. - Return E_NOAGGREGATION if non-NULL pUnkOuter is given to the constructor. Alexandre Julliard <julliard@winehq.org> - We are no longer generating .spec.c files. - Generate 16-bit spec files as assembly code too. - Use a more portable scheme for storing the name of a critical section. - Removed unused debug channels. - Specify 64-bit integers as double instead of long long in spec files so that we get the correct number of arguments. - We are no longer generating .dbg.c files. Milko Krachounov <milko@3mhz.net> - Bulgarian resources for mpr, msi, user, commdlg, oleaut32, shdocvw, shell32, comctl32, msrle32, mshtml, winspool, wineps, serialui, setupapi, wininet, regedit, uninstaller, notepad, winecfg and winhelp. Kevin Koltzau <kevin@plop.org> - Fix warnings in 64bit. Dmitry Timoshkov <dmitry@codeweavers.com> - Stop using a not initialized variable szTemp in _dbg_ILSimpleGetText, make _dbg_ILSimpleGetText return no value since nobody is using it. - Stop dereferencing a possible NULL in pdump since _dbg_ILGetDataPointer can potentially return NULL (for instance for root or desktop pidl). - Make shdebugstr_guid use standard wine_dbg_sprintf instead of the handmade solution. - Translate file name from unix to ANSI encoding in UnixFolder_IShellFolder2_GetDisplayNameOf. - Pass a locally modified version of SHELLEXECUTEINFO to IShellExecuteHookW_Execute, this should pass through at least sei_tmp.nShow retrieved from an .lnk file (fStartup). Alexander N. Sørnes <alex@thehandofagony.com> - Added Norwegian translation of comctl32 and shell32. Kimmo Myllyvirta <kimmo.myllyvirta@gmail.com> - Update Finnish resources. svn path=/trunk/; revision=18348
2005-10-08 17:41:41 +00:00
void _dbg_ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
{
LPSTR szSrc;
LPWSTR szSrcW;
GUID const * riid;
Sync to Wine-20050930: Michael Jung <mjung@iss.tu-darmstadt.de> - Don't clone pidlLast in SHBindToParent. - Pass correct pointer to SHFree in case of failure in UNIXFS_path_to_pidl. - Return E_FAIL if we can't get the unix path in IPersistFolder3::InitializeEx. - Return E_NOAGGREGATION if non-NULL pUnkOuter is given to the constructor. Alexandre Julliard <julliard@winehq.org> - We are no longer generating .spec.c files. - Generate 16-bit spec files as assembly code too. - Use a more portable scheme for storing the name of a critical section. - Removed unused debug channels. - Specify 64-bit integers as double instead of long long in spec files so that we get the correct number of arguments. - We are no longer generating .dbg.c files. Milko Krachounov <milko@3mhz.net> - Bulgarian resources for mpr, msi, user, commdlg, oleaut32, shdocvw, shell32, comctl32, msrle32, mshtml, winspool, wineps, serialui, setupapi, wininet, regedit, uninstaller, notepad, winecfg and winhelp. Kevin Koltzau <kevin@plop.org> - Fix warnings in 64bit. Dmitry Timoshkov <dmitry@codeweavers.com> - Stop using a not initialized variable szTemp in _dbg_ILSimpleGetText, make _dbg_ILSimpleGetText return no value since nobody is using it. - Stop dereferencing a possible NULL in pdump since _dbg_ILGetDataPointer can potentially return NULL (for instance for root or desktop pidl). - Make shdebugstr_guid use standard wine_dbg_sprintf instead of the handmade solution. - Translate file name from unix to ANSI encoding in UnixFolder_IShellFolder2_GetDisplayNameOf. - Pass a locally modified version of SHELLEXECUTEINFO to IShellExecuteHookW_Execute, this should pass through at least sei_tmp.nShow retrieved from an .lnk file (fStartup). Alexander N. Sørnes <alex@thehandofagony.com> - Added Norwegian translation of comctl32 and shell32. Kimmo Myllyvirta <kimmo.myllyvirta@gmail.com> - Update Finnish resources. svn path=/trunk/; revision=18348
2005-10-08 17:41:41 +00:00
if (!pidl) return;
if (szOut)
*szOut = 0;
if (_dbg_ILIsDesktop(pidl))
{
/* desktop */
Sync to Wine-20050419: Francois Gouget <fgouget@free.fr> - Assorted spelling fixes. Mike McCormack <mike@codeweavers.com> - Remove an unused function. - Eliminate casts of the return value of HeapAlloc. - Convert path to unicode, rearrange to remove forward declaration. - Remove forward declarations of interface methods. - Remove some dead code and some ifdefs. - Use api definitions, remove duplicate code. - Fix usage of STGM_ enumerations, remove forward declaration. - Fix up PIDL dumping code. - Fix a regression in the file open dialog. Jon Griffiths <jon_p_griffiths@yahoo.com> - Use LMEM_ flags for LocalAlloc(), not GMEM_ (GlobalAlloc). Huw Davies <huw@codeweavers.com> - Fix the icon resource ids (most were off by one). - Fix IExtractIcon_{GetIconLocation,Extract} to use -ve icon resource ids and fix bugs relating to confusion between resource ids and the system imagelist indicies. - Extend the system imagelist initialization hack to load both +ve and -ve resource ids. - Add a printer icon (that'll be used by an upcoming printer folder patch). - When we're hiding file extensions then SetNameOf should append the original extension if SHGDN_FORPARSING isn't set. - The flags passed to SetNameOf refer to the dst string not the src pidl. - If ICommDlgBrowser_OnDefaultCommand returns anything other than S_OK then we should call the default handler. - Directory items should have the SFGOA_FILESYSANCESTOR attribute. Add a test for this and cleanup the shlfolder test a bit. - Better icon handling for some special folders. - Identify and add defines for a bunch of shell icons. - Add a unicode pidl type. - Improve support for PT_YAGUID. - Improve IShellLink debugging. Steven Edwards <steven_ed4153@yahoo.com> - Register Shell Drag and Drop Helper. Juan Lang <juan_lang@yahoo.com> - Use Unicode string result from GetDisplayNameOf if it isn't representable using ANSI. - Correct registering shell folders (values in Shell Folders key weren't getting written). Martin Fuchs <martin-fuchs@gmx.net> - switch to correct shell desktop context menu - launch desk.cpl when activating the desktop context menu entry "properties" - don't send WM_COMMAND if we didn't get a shell view window - Correct comments of some export ordinals. Peter Berg Larsen <pebl@math.ku.dk> - Replace strncpy with memcpy or lstrcpyn. Troy Rollo <wine@troy.rollo.name> - Fix SEGV for non-fully-qualified destination paths. - Don't fail ShFileOperationW if FOF_ALLOWUNDO is passed. Filip Navara <xnavara@volny.cz> - _dbg_ILGetNext returns NULL if pidl->mkid.cb is zero, fix the loops accordingly. Aric Stewart <aric@codeweavers.com> - For ShellExecuteExA we need to copy out the hProcess value from the W structure. svn path=/trunk/; revision=15024
2005-05-05 22:16:20 +00:00
if (szOut) lstrcpynA(szOut, "Desktop", uOutSize);
}
else if (( szSrc = _dbg_ILGetTextPointer(pidl) ))
{
/* filesystem */
Sync to Wine-20050419: Francois Gouget <fgouget@free.fr> - Assorted spelling fixes. Mike McCormack <mike@codeweavers.com> - Remove an unused function. - Eliminate casts of the return value of HeapAlloc. - Convert path to unicode, rearrange to remove forward declaration. - Remove forward declarations of interface methods. - Remove some dead code and some ifdefs. - Use api definitions, remove duplicate code. - Fix usage of STGM_ enumerations, remove forward declaration. - Fix up PIDL dumping code. - Fix a regression in the file open dialog. Jon Griffiths <jon_p_griffiths@yahoo.com> - Use LMEM_ flags for LocalAlloc(), not GMEM_ (GlobalAlloc). Huw Davies <huw@codeweavers.com> - Fix the icon resource ids (most were off by one). - Fix IExtractIcon_{GetIconLocation,Extract} to use -ve icon resource ids and fix bugs relating to confusion between resource ids and the system imagelist indicies. - Extend the system imagelist initialization hack to load both +ve and -ve resource ids. - Add a printer icon (that'll be used by an upcoming printer folder patch). - When we're hiding file extensions then SetNameOf should append the original extension if SHGDN_FORPARSING isn't set. - The flags passed to SetNameOf refer to the dst string not the src pidl. - If ICommDlgBrowser_OnDefaultCommand returns anything other than S_OK then we should call the default handler. - Directory items should have the SFGOA_FILESYSANCESTOR attribute. Add a test for this and cleanup the shlfolder test a bit. - Better icon handling for some special folders. - Identify and add defines for a bunch of shell icons. - Add a unicode pidl type. - Improve support for PT_YAGUID. - Improve IShellLink debugging. Steven Edwards <steven_ed4153@yahoo.com> - Register Shell Drag and Drop Helper. Juan Lang <juan_lang@yahoo.com> - Use Unicode string result from GetDisplayNameOf if it isn't representable using ANSI. - Correct registering shell folders (values in Shell Folders key weren't getting written). Martin Fuchs <martin-fuchs@gmx.net> - switch to correct shell desktop context menu - launch desk.cpl when activating the desktop context menu entry "properties" - don't send WM_COMMAND if we didn't get a shell view window - Correct comments of some export ordinals. Peter Berg Larsen <pebl@math.ku.dk> - Replace strncpy with memcpy or lstrcpyn. Troy Rollo <wine@troy.rollo.name> - Fix SEGV for non-fully-qualified destination paths. - Don't fail ShFileOperationW if FOF_ALLOWUNDO is passed. Filip Navara <xnavara@volny.cz> - _dbg_ILGetNext returns NULL if pidl->mkid.cb is zero, fix the loops accordingly. Aric Stewart <aric@codeweavers.com> - For ShellExecuteExA we need to copy out the hProcess value from the W structure. svn path=/trunk/; revision=15024
2005-05-05 22:16:20 +00:00
if (szOut) lstrcpynA(szOut, szSrc, uOutSize);
}
else if (( szSrcW = _dbg_ILGetTextPointerW(pidl) ))
{
CHAR tmp[MAX_PATH];
/* unicode filesystem */
WideCharToMultiByte(CP_ACP,0,szSrcW, -1, tmp, MAX_PATH, NULL, NULL);
if (szOut) lstrcpynA(szOut, tmp, uOutSize);
}
else if (( riid = _dbg_ILGetGUIDPointer(pidl) ))
{
if (szOut)
sprintf( szOut, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
riid->Data1, riid->Data2, riid->Data3,
riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3],
riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] );
}
}
void pdump (LPCITEMIDLIST pidl)
{
LPCITEMIDLIST pidltemp = pidl;
if (!TRACE_ON(pidl)) return;
if (! pidltemp)
{
MESSAGE ("-------- pidl=NULL (Desktop)\n");
}
else
{
MESSAGE ("-------- pidl=%p\n", pidl);
if (pidltemp->mkid.cb)
{
do
{
if (_ILIsUnicode(pidltemp))
{
DWORD dwAttrib = 0;
LPPIDLDATA pData = _dbg_ILGetDataPointer(pidltemp);
DWORD type = pData ? pData->type : 0;
LPWSTR szLongName = _dbg_ILGetTextPointerW(pidltemp);
LPWSTR szShortName = _dbg_ILGetSTextPointerW(pidltemp);
char szName[MAX_PATH];
_dbg_ILSimpleGetText(pidltemp, szName, MAX_PATH);
if ( pData && (PT_FOLDER == type || PT_VALUE == type) )
dwAttrib = pData->u.file.uFileAttribs;
MESSAGE ("[%p] size=%04u type=%x attr=0x%08x name=%s (%s,%s)\n",
pidltemp, pidltemp->mkid.cb, type, dwAttrib,
debugstr_a(szName), debugstr_w(szLongName), debugstr_w(szShortName));
}
else
{
DWORD dwAttrib = 0;
LPPIDLDATA pData = _dbg_ILGetDataPointer(pidltemp);
DWORD type = pData ? pData->type : 0;
LPSTR szLongName = _dbg_ILGetTextPointer(pidltemp);
LPSTR szShortName = _dbg_ILGetSTextPointer(pidltemp);
char szName[MAX_PATH];
_dbg_ILSimpleGetText(pidltemp, szName, MAX_PATH);
if ( pData && (PT_FOLDER == type || PT_VALUE == type) )
dwAttrib = pData->u.file.uFileAttribs;
MESSAGE ("[%p] size=%04u type=%x attr=0x%08x name=%s (%s,%s)\n",
pidltemp, pidltemp->mkid.cb, type, dwAttrib,
debugstr_a(szName), debugstr_a(szLongName), debugstr_a(szShortName));
}
pidltemp = _dbg_ILGetNext(pidltemp);
Sync to Wine-20050419: Francois Gouget <fgouget@free.fr> - Assorted spelling fixes. Mike McCormack <mike@codeweavers.com> - Remove an unused function. - Eliminate casts of the return value of HeapAlloc. - Convert path to unicode, rearrange to remove forward declaration. - Remove forward declarations of interface methods. - Remove some dead code and some ifdefs. - Use api definitions, remove duplicate code. - Fix usage of STGM_ enumerations, remove forward declaration. - Fix up PIDL dumping code. - Fix a regression in the file open dialog. Jon Griffiths <jon_p_griffiths@yahoo.com> - Use LMEM_ flags for LocalAlloc(), not GMEM_ (GlobalAlloc). Huw Davies <huw@codeweavers.com> - Fix the icon resource ids (most were off by one). - Fix IExtractIcon_{GetIconLocation,Extract} to use -ve icon resource ids and fix bugs relating to confusion between resource ids and the system imagelist indicies. - Extend the system imagelist initialization hack to load both +ve and -ve resource ids. - Add a printer icon (that'll be used by an upcoming printer folder patch). - When we're hiding file extensions then SetNameOf should append the original extension if SHGDN_FORPARSING isn't set. - The flags passed to SetNameOf refer to the dst string not the src pidl. - If ICommDlgBrowser_OnDefaultCommand returns anything other than S_OK then we should call the default handler. - Directory items should have the SFGOA_FILESYSANCESTOR attribute. Add a test for this and cleanup the shlfolder test a bit. - Better icon handling for some special folders. - Identify and add defines for a bunch of shell icons. - Add a unicode pidl type. - Improve support for PT_YAGUID. - Improve IShellLink debugging. Steven Edwards <steven_ed4153@yahoo.com> - Register Shell Drag and Drop Helper. Juan Lang <juan_lang@yahoo.com> - Use Unicode string result from GetDisplayNameOf if it isn't representable using ANSI. - Correct registering shell folders (values in Shell Folders key weren't getting written). Martin Fuchs <martin-fuchs@gmx.net> - switch to correct shell desktop context menu - launch desk.cpl when activating the desktop context menu entry "properties" - don't send WM_COMMAND if we didn't get a shell view window - Correct comments of some export ordinals. Peter Berg Larsen <pebl@math.ku.dk> - Replace strncpy with memcpy or lstrcpyn. Troy Rollo <wine@troy.rollo.name> - Fix SEGV for non-fully-qualified destination paths. - Don't fail ShFileOperationW if FOF_ALLOWUNDO is passed. Filip Navara <xnavara@volny.cz> - _dbg_ILGetNext returns NULL if pidl->mkid.cb is zero, fix the loops accordingly. Aric Stewart <aric@codeweavers.com> - For ShellExecuteExA we need to copy out the hProcess value from the W structure. svn path=/trunk/; revision=15024
2005-05-05 22:16:20 +00:00
} while (pidltemp && pidltemp->mkid.cb);
}
else
{
MESSAGE ("empty pidl (Desktop)\n");
}
pcheck(pidl);
}
}
Sync to Wine-20050419: Francois Gouget <fgouget@free.fr> - Assorted spelling fixes. Mike McCormack <mike@codeweavers.com> - Remove an unused function. - Eliminate casts of the return value of HeapAlloc. - Convert path to unicode, rearrange to remove forward declaration. - Remove forward declarations of interface methods. - Remove some dead code and some ifdefs. - Use api definitions, remove duplicate code. - Fix usage of STGM_ enumerations, remove forward declaration. - Fix up PIDL dumping code. - Fix a regression in the file open dialog. Jon Griffiths <jon_p_griffiths@yahoo.com> - Use LMEM_ flags for LocalAlloc(), not GMEM_ (GlobalAlloc). Huw Davies <huw@codeweavers.com> - Fix the icon resource ids (most were off by one). - Fix IExtractIcon_{GetIconLocation,Extract} to use -ve icon resource ids and fix bugs relating to confusion between resource ids and the system imagelist indicies. - Extend the system imagelist initialization hack to load both +ve and -ve resource ids. - Add a printer icon (that'll be used by an upcoming printer folder patch). - When we're hiding file extensions then SetNameOf should append the original extension if SHGDN_FORPARSING isn't set. - The flags passed to SetNameOf refer to the dst string not the src pidl. - If ICommDlgBrowser_OnDefaultCommand returns anything other than S_OK then we should call the default handler. - Directory items should have the SFGOA_FILESYSANCESTOR attribute. Add a test for this and cleanup the shlfolder test a bit. - Better icon handling for some special folders. - Identify and add defines for a bunch of shell icons. - Add a unicode pidl type. - Improve support for PT_YAGUID. - Improve IShellLink debugging. Steven Edwards <steven_ed4153@yahoo.com> - Register Shell Drag and Drop Helper. Juan Lang <juan_lang@yahoo.com> - Use Unicode string result from GetDisplayNameOf if it isn't representable using ANSI. - Correct registering shell folders (values in Shell Folders key weren't getting written). Martin Fuchs <martin-fuchs@gmx.net> - switch to correct shell desktop context menu - launch desk.cpl when activating the desktop context menu entry "properties" - don't send WM_COMMAND if we didn't get a shell view window - Correct comments of some export ordinals. Peter Berg Larsen <pebl@math.ku.dk> - Replace strncpy with memcpy or lstrcpyn. Troy Rollo <wine@troy.rollo.name> - Fix SEGV for non-fully-qualified destination paths. - Don't fail ShFileOperationW if FOF_ALLOWUNDO is passed. Filip Navara <xnavara@volny.cz> - _dbg_ILGetNext returns NULL if pidl->mkid.cb is zero, fix the loops accordingly. Aric Stewart <aric@codeweavers.com> - For ShellExecuteExA we need to copy out the hProcess value from the W structure. svn path=/trunk/; revision=15024
2005-05-05 22:16:20 +00:00
static void dump_pidl_hex( LPCITEMIDLIST pidl )
{
Sync to Wine-20050419: Francois Gouget <fgouget@free.fr> - Assorted spelling fixes. Mike McCormack <mike@codeweavers.com> - Remove an unused function. - Eliminate casts of the return value of HeapAlloc. - Convert path to unicode, rearrange to remove forward declaration. - Remove forward declarations of interface methods. - Remove some dead code and some ifdefs. - Use api definitions, remove duplicate code. - Fix usage of STGM_ enumerations, remove forward declaration. - Fix up PIDL dumping code. - Fix a regression in the file open dialog. Jon Griffiths <jon_p_griffiths@yahoo.com> - Use LMEM_ flags for LocalAlloc(), not GMEM_ (GlobalAlloc). Huw Davies <huw@codeweavers.com> - Fix the icon resource ids (most were off by one). - Fix IExtractIcon_{GetIconLocation,Extract} to use -ve icon resource ids and fix bugs relating to confusion between resource ids and the system imagelist indicies. - Extend the system imagelist initialization hack to load both +ve and -ve resource ids. - Add a printer icon (that'll be used by an upcoming printer folder patch). - When we're hiding file extensions then SetNameOf should append the original extension if SHGDN_FORPARSING isn't set. - The flags passed to SetNameOf refer to the dst string not the src pidl. - If ICommDlgBrowser_OnDefaultCommand returns anything other than S_OK then we should call the default handler. - Directory items should have the SFGOA_FILESYSANCESTOR attribute. Add a test for this and cleanup the shlfolder test a bit. - Better icon handling for some special folders. - Identify and add defines for a bunch of shell icons. - Add a unicode pidl type. - Improve support for PT_YAGUID. - Improve IShellLink debugging. Steven Edwards <steven_ed4153@yahoo.com> - Register Shell Drag and Drop Helper. Juan Lang <juan_lang@yahoo.com> - Use Unicode string result from GetDisplayNameOf if it isn't representable using ANSI. - Correct registering shell folders (values in Shell Folders key weren't getting written). Martin Fuchs <martin-fuchs@gmx.net> - switch to correct shell desktop context menu - launch desk.cpl when activating the desktop context menu entry "properties" - don't send WM_COMMAND if we didn't get a shell view window - Correct comments of some export ordinals. Peter Berg Larsen <pebl@math.ku.dk> - Replace strncpy with memcpy or lstrcpyn. Troy Rollo <wine@troy.rollo.name> - Fix SEGV for non-fully-qualified destination paths. - Don't fail ShFileOperationW if FOF_ALLOWUNDO is passed. Filip Navara <xnavara@volny.cz> - _dbg_ILGetNext returns NULL if pidl->mkid.cb is zero, fix the loops accordingly. Aric Stewart <aric@codeweavers.com> - For ShellExecuteExA we need to copy out the hProcess value from the W structure. svn path=/trunk/; revision=15024
2005-05-05 22:16:20 +00:00
const unsigned char *p = (const unsigned char *)pidl;
const int max_bytes = 0x80;
#define max_line 0x10
Sync to Wine-20050419: Francois Gouget <fgouget@free.fr> - Assorted spelling fixes. Mike McCormack <mike@codeweavers.com> - Remove an unused function. - Eliminate casts of the return value of HeapAlloc. - Convert path to unicode, rearrange to remove forward declaration. - Remove forward declarations of interface methods. - Remove some dead code and some ifdefs. - Use api definitions, remove duplicate code. - Fix usage of STGM_ enumerations, remove forward declaration. - Fix up PIDL dumping code. - Fix a regression in the file open dialog. Jon Griffiths <jon_p_griffiths@yahoo.com> - Use LMEM_ flags for LocalAlloc(), not GMEM_ (GlobalAlloc). Huw Davies <huw@codeweavers.com> - Fix the icon resource ids (most were off by one). - Fix IExtractIcon_{GetIconLocation,Extract} to use -ve icon resource ids and fix bugs relating to confusion between resource ids and the system imagelist indicies. - Extend the system imagelist initialization hack to load both +ve and -ve resource ids. - Add a printer icon (that'll be used by an upcoming printer folder patch). - When we're hiding file extensions then SetNameOf should append the original extension if SHGDN_FORPARSING isn't set. - The flags passed to SetNameOf refer to the dst string not the src pidl. - If ICommDlgBrowser_OnDefaultCommand returns anything other than S_OK then we should call the default handler. - Directory items should have the SFGOA_FILESYSANCESTOR attribute. Add a test for this and cleanup the shlfolder test a bit. - Better icon handling for some special folders. - Identify and add defines for a bunch of shell icons. - Add a unicode pidl type. - Improve support for PT_YAGUID. - Improve IShellLink debugging. Steven Edwards <steven_ed4153@yahoo.com> - Register Shell Drag and Drop Helper. Juan Lang <juan_lang@yahoo.com> - Use Unicode string result from GetDisplayNameOf if it isn't representable using ANSI. - Correct registering shell folders (values in Shell Folders key weren't getting written). Martin Fuchs <martin-fuchs@gmx.net> - switch to correct shell desktop context menu - launch desk.cpl when activating the desktop context menu entry "properties" - don't send WM_COMMAND if we didn't get a shell view window - Correct comments of some export ordinals. Peter Berg Larsen <pebl@math.ku.dk> - Replace strncpy with memcpy or lstrcpyn. Troy Rollo <wine@troy.rollo.name> - Fix SEGV for non-fully-qualified destination paths. - Don't fail ShFileOperationW if FOF_ALLOWUNDO is passed. Filip Navara <xnavara@volny.cz> - _dbg_ILGetNext returns NULL if pidl->mkid.cb is zero, fix the loops accordingly. Aric Stewart <aric@codeweavers.com> - For ShellExecuteExA we need to copy out the hProcess value from the W structure. svn path=/trunk/; revision=15024
2005-05-05 22:16:20 +00:00
char szHex[max_line*3+1], szAscii[max_line+1];
int i, n;
n = pidl->mkid.cb;
if( n>max_bytes )
n = max_bytes;
for( i=0; i<n; i++ )
{
sprintf( &szHex[ (i%max_line)*3 ], "%02X ", p[i] );
szAscii[ (i%max_line) ] = isprint( p[i] ) ? p[i] : '.';
/* print out at the end of each line and when we're finished */
if( i!=(n-1) && (i%max_line) != (max_line-1) )
continue;
szAscii[ (i%max_line)+1 ] = 0;
Sync to Wine-20050830: Michael Jung <mjung@iss.tu-darmstadt.de> - Initialize all members in UnixFolder constructor. Support NULL value pidls in GetDisplayNameOf method. - Implemented IPersist::GetClassID. - Use wine_get_dos_file_name instead of GetFullPathName. - Implemented 'My Documents' folder. - Added stubbed implementation of IPersistPropertyBag interface. Register unixfs as CLSID_FolderShortcut. - Clone pidlLast before free'ing pidl after call to SHBindToParent. - Use FIXME's in stubs instead of TRACE's. Infer pathmode from CLSID in UnixFolderConstructor. Fail in IShellFolder::BindToObject, if folder does not initialize. - Use StringFromGUID2 instead of StringFromCLSID in UNIXFS_is_rooted_at_desktop. Michael Jung <mjung@iss.tu-darmstadt.de> Ge van Geldorp <gvg@reactos.com> - Prepend Desktop folder path for files/directories stored in the filesystem Desktop folder when GetDisplayNameOf is called with the SHGDN_FORPARSING flags. - Add testcases. Ge van Geldorp <gvg@reactos.com> - Fix resource leak on error paths. - Do not load all shell32 icons during initialization, it wastes a lot of memory Alexandre Julliard <julliard@winehq.org> - Replace the _ICOM_THIS_From macros by inline functions the way it's already done in shelllink.c. - Use ERR instead of DPRINTF in dump_pidl_hex. - Don't prefix the functions DllCanUnloadNow, DllGetClassObject and Dll(Un)RegisterServer with the dll name so that the compiler can check the prototypes. - Uncomment the typedef in the DECLARE_INTERFACE macro, and get rid of duplicate typedefs. - Get rid of the _ICOM_THIS macros and call the inline function directly instead. - Removed the broken mmap64 configure check, and moved the _FILE_OFFSET_BITS define to wine/port.h. Made sure that all files that need the define include it. - Added missing ntdll imports. Francois Gouget <fgouget@codeweavers.com> - Fix ShellExecute("\"foo.doc\"") for Internet Explorer 6. - Update the conformance tests accordingly. - Tweak a trace because it's very confusing to see the path with no escaped quotes in ShellExecuteA() and then with escaped quotes in ShellExecuteExW32() (due to debugstr_w()). - Fix the return value of SHELL_Argify() so it once again returns true if a '%1' or equivalent placeholder was found. This fixes ShellExecuteEx(lpFile="foo.txt", lpClass="txtfile"). - Fix handling of SEE_MASK_CLASSNAME and SEE_MASK_CLASSKEY. They are not disjoint flags. Mike McCormack <mike@codeweavers.com> - Warning fixes for gcc 4.0. - Fix some gcc 4.0 warnings. Jozef Stefanka <jstefanka@codeweavers.com> - Fixed browsing to other directories in Word 2003 file open dialog. Double clicking on a folder in the File->Open dialog works now. Steven Edwards <steven_ed4153@yahoo.com> - Correct definition of SFGAO_STORAGEANCESTOR. Jason Edmeades <us@edmeades.me.uk> - Add the time to the file display dialog modified column. - Handle context menu->refresh, and F5 to initiate a refresh of the file dialog. svn path=/trunk/; revision=17714
2005-09-07 08:43:45 +00:00
ERR("%-*s %s\n", max_line*3, szHex, szAscii );
Sync to Wine-20050419: Francois Gouget <fgouget@free.fr> - Assorted spelling fixes. Mike McCormack <mike@codeweavers.com> - Remove an unused function. - Eliminate casts of the return value of HeapAlloc. - Convert path to unicode, rearrange to remove forward declaration. - Remove forward declarations of interface methods. - Remove some dead code and some ifdefs. - Use api definitions, remove duplicate code. - Fix usage of STGM_ enumerations, remove forward declaration. - Fix up PIDL dumping code. - Fix a regression in the file open dialog. Jon Griffiths <jon_p_griffiths@yahoo.com> - Use LMEM_ flags for LocalAlloc(), not GMEM_ (GlobalAlloc). Huw Davies <huw@codeweavers.com> - Fix the icon resource ids (most were off by one). - Fix IExtractIcon_{GetIconLocation,Extract} to use -ve icon resource ids and fix bugs relating to confusion between resource ids and the system imagelist indicies. - Extend the system imagelist initialization hack to load both +ve and -ve resource ids. - Add a printer icon (that'll be used by an upcoming printer folder patch). - When we're hiding file extensions then SetNameOf should append the original extension if SHGDN_FORPARSING isn't set. - The flags passed to SetNameOf refer to the dst string not the src pidl. - If ICommDlgBrowser_OnDefaultCommand returns anything other than S_OK then we should call the default handler. - Directory items should have the SFGOA_FILESYSANCESTOR attribute. Add a test for this and cleanup the shlfolder test a bit. - Better icon handling for some special folders. - Identify and add defines for a bunch of shell icons. - Add a unicode pidl type. - Improve support for PT_YAGUID. - Improve IShellLink debugging. Steven Edwards <steven_ed4153@yahoo.com> - Register Shell Drag and Drop Helper. Juan Lang <juan_lang@yahoo.com> - Use Unicode string result from GetDisplayNameOf if it isn't representable using ANSI. - Correct registering shell folders (values in Shell Folders key weren't getting written). Martin Fuchs <martin-fuchs@gmx.net> - switch to correct shell desktop context menu - launch desk.cpl when activating the desktop context menu entry "properties" - don't send WM_COMMAND if we didn't get a shell view window - Correct comments of some export ordinals. Peter Berg Larsen <pebl@math.ku.dk> - Replace strncpy with memcpy or lstrcpyn. Troy Rollo <wine@troy.rollo.name> - Fix SEGV for non-fully-qualified destination paths. - Don't fail ShFileOperationW if FOF_ALLOWUNDO is passed. Filip Navara <xnavara@volny.cz> - _dbg_ILGetNext returns NULL if pidl->mkid.cb is zero, fix the loops accordingly. Aric Stewart <aric@codeweavers.com> - For ShellExecuteExA we need to copy out the hProcess value from the W structure. svn path=/trunk/; revision=15024
2005-05-05 22:16:20 +00:00
}
}
BOOL pcheck( LPCITEMIDLIST pidl )
{
DWORD type;
LPCITEMIDLIST pidltemp = pidl;
while( pidltemp && pidltemp->mkid.cb )
{
type = _dbg_ILGetDataPointer(pidltemp)->type;
switch( type )
{
case PT_CPLAPPLET:
case PT_GUID:
case PT_SHELLEXT:
case PT_DRIVE:
case PT_DRIVE1:
case PT_DRIVE2:
case PT_DRIVE3:
case PT_FOLDER:
case PT_VALUE:
case PT_VALUEW:
case PT_FOLDER1:
case PT_WORKGRP:
case PT_COMP:
case PT_NETPROVIDER:
case PT_NETWORK:
case PT_IESPECIAL1:
case PT_YAGUID:
case PT_IESPECIAL2:
case PT_SHARE:
break;
default:
ERR("unknown IDLIST %p [%p] size=%u type=%x\n",
Sync to Wine-20050419: Francois Gouget <fgouget@free.fr> - Assorted spelling fixes. Mike McCormack <mike@codeweavers.com> - Remove an unused function. - Eliminate casts of the return value of HeapAlloc. - Convert path to unicode, rearrange to remove forward declaration. - Remove forward declarations of interface methods. - Remove some dead code and some ifdefs. - Use api definitions, remove duplicate code. - Fix usage of STGM_ enumerations, remove forward declaration. - Fix up PIDL dumping code. - Fix a regression in the file open dialog. Jon Griffiths <jon_p_griffiths@yahoo.com> - Use LMEM_ flags for LocalAlloc(), not GMEM_ (GlobalAlloc). Huw Davies <huw@codeweavers.com> - Fix the icon resource ids (most were off by one). - Fix IExtractIcon_{GetIconLocation,Extract} to use -ve icon resource ids and fix bugs relating to confusion between resource ids and the system imagelist indicies. - Extend the system imagelist initialization hack to load both +ve and -ve resource ids. - Add a printer icon (that'll be used by an upcoming printer folder patch). - When we're hiding file extensions then SetNameOf should append the original extension if SHGDN_FORPARSING isn't set. - The flags passed to SetNameOf refer to the dst string not the src pidl. - If ICommDlgBrowser_OnDefaultCommand returns anything other than S_OK then we should call the default handler. - Directory items should have the SFGOA_FILESYSANCESTOR attribute. Add a test for this and cleanup the shlfolder test a bit. - Better icon handling for some special folders. - Identify and add defines for a bunch of shell icons. - Add a unicode pidl type. - Improve support for PT_YAGUID. - Improve IShellLink debugging. Steven Edwards <steven_ed4153@yahoo.com> - Register Shell Drag and Drop Helper. Juan Lang <juan_lang@yahoo.com> - Use Unicode string result from GetDisplayNameOf if it isn't representable using ANSI. - Correct registering shell folders (values in Shell Folders key weren't getting written). Martin Fuchs <martin-fuchs@gmx.net> - switch to correct shell desktop context menu - launch desk.cpl when activating the desktop context menu entry "properties" - don't send WM_COMMAND if we didn't get a shell view window - Correct comments of some export ordinals. Peter Berg Larsen <pebl@math.ku.dk> - Replace strncpy with memcpy or lstrcpyn. Troy Rollo <wine@troy.rollo.name> - Fix SEGV for non-fully-qualified destination paths. - Don't fail ShFileOperationW if FOF_ALLOWUNDO is passed. Filip Navara <xnavara@volny.cz> - _dbg_ILGetNext returns NULL if pidl->mkid.cb is zero, fix the loops accordingly. Aric Stewart <aric@codeweavers.com> - For ShellExecuteExA we need to copy out the hProcess value from the W structure. svn path=/trunk/; revision=15024
2005-05-05 22:16:20 +00:00
pidl, pidltemp, pidltemp->mkid.cb,type );
dump_pidl_hex( pidltemp );
return FALSE;
}
pidltemp = _dbg_ILGetNext(pidltemp);
}
return TRUE;
}
Sync to Wine-20050930: Michael Jung <mjung@iss.tu-darmstadt.de> - Don't clone pidlLast in SHBindToParent. - Pass correct pointer to SHFree in case of failure in UNIXFS_path_to_pidl. - Return E_FAIL if we can't get the unix path in IPersistFolder3::InitializeEx. - Return E_NOAGGREGATION if non-NULL pUnkOuter is given to the constructor. Alexandre Julliard <julliard@winehq.org> - We are no longer generating .spec.c files. - Generate 16-bit spec files as assembly code too. - Use a more portable scheme for storing the name of a critical section. - Removed unused debug channels. - Specify 64-bit integers as double instead of long long in spec files so that we get the correct number of arguments. - We are no longer generating .dbg.c files. Milko Krachounov <milko@3mhz.net> - Bulgarian resources for mpr, msi, user, commdlg, oleaut32, shdocvw, shell32, comctl32, msrle32, mshtml, winspool, wineps, serialui, setupapi, wininet, regedit, uninstaller, notepad, winecfg and winhelp. Kevin Koltzau <kevin@plop.org> - Fix warnings in 64bit. Dmitry Timoshkov <dmitry@codeweavers.com> - Stop using a not initialized variable szTemp in _dbg_ILSimpleGetText, make _dbg_ILSimpleGetText return no value since nobody is using it. - Stop dereferencing a possible NULL in pdump since _dbg_ILGetDataPointer can potentially return NULL (for instance for root or desktop pidl). - Make shdebugstr_guid use standard wine_dbg_sprintf instead of the handmade solution. - Translate file name from unix to ANSI encoding in UnixFolder_IShellFolder2_GetDisplayNameOf. - Pass a locally modified version of SHELLEXECUTEINFO to IShellExecuteHookW_Execute, this should pass through at least sei_tmp.nShow retrieved from an .lnk file (fStartup). Alexander N. Sørnes <alex@thehandofagony.com> - Added Norwegian translation of comctl32 and shell32. Kimmo Myllyvirta <kimmo.myllyvirta@gmail.com> - Update Finnish resources. svn path=/trunk/; revision=18348
2005-10-08 17:41:41 +00:00
static const struct {
Sync to Wine-20050628: Dmitry Timoshkov <dmitry@codeweavers.com> - Make remaining OLE interface vtables const. Mike McCormack <mike@codeweavers.com> - SHCreateStreamOnFileW is implemented in shlwapi, so we don't need another implementation in shell32. - Add a cast to get rid of a warning. - Warning fixes for -Wmissing-declarations and -Wwrite-strings. - Make functions static. - -Wpointer-sign fixes. - forward AddRef, Release, QueryInterface and GetClassID to internal implementations - implement GetClassID properly - Switch IShellLink to use shlwapi.SHCreateStreamOnFileW. - Remove some uses of wine/unicode.h functions. - Add the IContextMenu interface to the ShellLink object. - Implement ShellLink's IShellExtInit::Initialize() method. - add the IShellExtInit interface to the ShellLink object - use inline functions rather than macros to resolve the implementation pointer from an interface pointer - Add the IShellLinkDataList interface to the ShellLink object. Michael Jung <mjung@iss.tu-darmstadt.de> - Use the CallForAttributes registry value, instead of promoting the root folder's SFGAO_FILESYSTEM flag to the registry. - Return the correct attributes for the desktop folder. - Corresponding tests. - Support for shellfolder's CallForAttributes registry value. - Let BindToObject fail, if called with empty relative pidl. - Tests to show that it should do so. - Fix SHBrowseForFolder to not pass an empty pidl to BindToObject. - Fix a lurking infinite loop in SHGetPathFromIDList. - Support for shellfolder's CallForAttributes registry value. - Use SHGetPathFromIDList instead of SHELL32_GetPathFromIDList. - Implement SHGetPathFromIDList based on GetDisplayNameOf. Stefan Doesinger <stefandoesinger@gmx.at> - Handle cidl==0 in shfldr_desktop, shfldr_fs and shfldr_mycomp. - Remove the dwAttributes member from the IGenericSFImpl class, it's not needed and can't be initialised in Initialize and InitializeEx. Vitaly Lipatov <lav@etersoft.ru> - Realize DoEnvironmentSubstA via ExpandEnvironmentStringsA. - Fix types and return values. - Add prototype into shellapi.h. Aric Stewart <aric@codeweavers.com> - Fix the BrowseForFolder dialog so that when it does the callbacks it uses the correct message instead of always sending BEFM_INITIALIZED. Juan Lang <juan_lang@yahoo.com> - Const-ify a mask. - Set default for "My Documents" to $HOME, and "Desktop" to ~/Desktop. Alexandre Julliard <julliard@winehq.org> - Sort entry points in the same order as Windows. Francois Gouget <fgouget@free.fr> - Fix winapi_check documentation warnings. Marcus Meissner <marcus@jet.franken.de> - ExtractAssociatedIconA needs to allocate enough space to have EAIW fill in lpIconPathW. Huw Davies <huw@codeweavers.com> - Unquote the icon file path if it's quoted. svn path=/trunk/; revision=17060
2005-08-05 07:48:18 +00:00
REFIID riid;
const char *name;
} InterfaceDesc[] = {
{&IID_IUnknown, "IID_IUnknown"},
{&IID_IClassFactory, "IID_IClassFactory"},
{&IID_IShellView, "IID_IShellView"},
{&IID_IOleCommandTarget, "IID_IOleCommandTarget"},
{&IID_IDropTarget, "IID_IDropTarget"},
{&IID_IDropSource, "IID_IDropSource"},
{&IID_IViewObject, "IID_IViewObject"},
{&IID_IContextMenu, "IID_IContextMenu"},
{&IID_IShellExtInit, "IID_IShellExtInit"},
{&IID_IShellFolder, "IID_IShellFolder"},
{&IID_IShellFolder2, "IID_IShellFolder2"},
{&IID_IPersist, "IID_IPersist"},
{&IID_IPersistFolder, "IID_IPersistFolder"},
{&IID_IPersistFolder2, "IID_IPersistFolder2"},
{&IID_IPersistFolder3, "IID_IPersistFolder3"},
{&IID_IExtractIconA, "IID_IExtractIconA"},
{&IID_IExtractIconW, "IID_IExtractIconW"},
{&IID_IDataObject, "IID_IDataObject"},
{&IID_IAutoComplete, "IID_IAutoComplete"},
{&IID_IAutoComplete2, "IID_IAutoComplete2"},
Sync to Wine-20050419: Francois Gouget <fgouget@free.fr> - Assorted spelling fixes. Mike McCormack <mike@codeweavers.com> - Remove an unused function. - Eliminate casts of the return value of HeapAlloc. - Convert path to unicode, rearrange to remove forward declaration. - Remove forward declarations of interface methods. - Remove some dead code and some ifdefs. - Use api definitions, remove duplicate code. - Fix usage of STGM_ enumerations, remove forward declaration. - Fix up PIDL dumping code. - Fix a regression in the file open dialog. Jon Griffiths <jon_p_griffiths@yahoo.com> - Use LMEM_ flags for LocalAlloc(), not GMEM_ (GlobalAlloc). Huw Davies <huw@codeweavers.com> - Fix the icon resource ids (most were off by one). - Fix IExtractIcon_{GetIconLocation,Extract} to use -ve icon resource ids and fix bugs relating to confusion between resource ids and the system imagelist indicies. - Extend the system imagelist initialization hack to load both +ve and -ve resource ids. - Add a printer icon (that'll be used by an upcoming printer folder patch). - When we're hiding file extensions then SetNameOf should append the original extension if SHGDN_FORPARSING isn't set. - The flags passed to SetNameOf refer to the dst string not the src pidl. - If ICommDlgBrowser_OnDefaultCommand returns anything other than S_OK then we should call the default handler. - Directory items should have the SFGOA_FILESYSANCESTOR attribute. Add a test for this and cleanup the shlfolder test a bit. - Better icon handling for some special folders. - Identify and add defines for a bunch of shell icons. - Add a unicode pidl type. - Improve support for PT_YAGUID. - Improve IShellLink debugging. Steven Edwards <steven_ed4153@yahoo.com> - Register Shell Drag and Drop Helper. Juan Lang <juan_lang@yahoo.com> - Use Unicode string result from GetDisplayNameOf if it isn't representable using ANSI. - Correct registering shell folders (values in Shell Folders key weren't getting written). Martin Fuchs <martin-fuchs@gmx.net> - switch to correct shell desktop context menu - launch desk.cpl when activating the desktop context menu entry "properties" - don't send WM_COMMAND if we didn't get a shell view window - Correct comments of some export ordinals. Peter Berg Larsen <pebl@math.ku.dk> - Replace strncpy with memcpy or lstrcpyn. Troy Rollo <wine@troy.rollo.name> - Fix SEGV for non-fully-qualified destination paths. - Don't fail ShFileOperationW if FOF_ALLOWUNDO is passed. Filip Navara <xnavara@volny.cz> - _dbg_ILGetNext returns NULL if pidl->mkid.cb is zero, fix the loops accordingly. Aric Stewart <aric@codeweavers.com> - For ShellExecuteExA we need to copy out the hProcess value from the W structure. svn path=/trunk/; revision=15024
2005-05-05 22:16:20 +00:00
{&IID_IShellLinkA, "IID_IShellLinkA"},
{&IID_IShellLinkW, "IID_IShellLinkW"},
{NULL,NULL}};
const char * shdebugstr_guid( const struct _GUID *id )
{
int i;
Sync to Wine-20050628: Dmitry Timoshkov <dmitry@codeweavers.com> - Make remaining OLE interface vtables const. Mike McCormack <mike@codeweavers.com> - SHCreateStreamOnFileW is implemented in shlwapi, so we don't need another implementation in shell32. - Add a cast to get rid of a warning. - Warning fixes for -Wmissing-declarations and -Wwrite-strings. - Make functions static. - -Wpointer-sign fixes. - forward AddRef, Release, QueryInterface and GetClassID to internal implementations - implement GetClassID properly - Switch IShellLink to use shlwapi.SHCreateStreamOnFileW. - Remove some uses of wine/unicode.h functions. - Add the IContextMenu interface to the ShellLink object. - Implement ShellLink's IShellExtInit::Initialize() method. - add the IShellExtInit interface to the ShellLink object - use inline functions rather than macros to resolve the implementation pointer from an interface pointer - Add the IShellLinkDataList interface to the ShellLink object. Michael Jung <mjung@iss.tu-darmstadt.de> - Use the CallForAttributes registry value, instead of promoting the root folder's SFGAO_FILESYSTEM flag to the registry. - Return the correct attributes for the desktop folder. - Corresponding tests. - Support for shellfolder's CallForAttributes registry value. - Let BindToObject fail, if called with empty relative pidl. - Tests to show that it should do so. - Fix SHBrowseForFolder to not pass an empty pidl to BindToObject. - Fix a lurking infinite loop in SHGetPathFromIDList. - Support for shellfolder's CallForAttributes registry value. - Use SHGetPathFromIDList instead of SHELL32_GetPathFromIDList. - Implement SHGetPathFromIDList based on GetDisplayNameOf. Stefan Doesinger <stefandoesinger@gmx.at> - Handle cidl==0 in shfldr_desktop, shfldr_fs and shfldr_mycomp. - Remove the dwAttributes member from the IGenericSFImpl class, it's not needed and can't be initialised in Initialize and InitializeEx. Vitaly Lipatov <lav@etersoft.ru> - Realize DoEnvironmentSubstA via ExpandEnvironmentStringsA. - Fix types and return values. - Add prototype into shellapi.h. Aric Stewart <aric@codeweavers.com> - Fix the BrowseForFolder dialog so that when it does the callbacks it uses the correct message instead of always sending BEFM_INITIALIZED. Juan Lang <juan_lang@yahoo.com> - Const-ify a mask. - Set default for "My Documents" to $HOME, and "Desktop" to ~/Desktop. Alexandre Julliard <julliard@winehq.org> - Sort entry points in the same order as Windows. Francois Gouget <fgouget@free.fr> - Fix winapi_check documentation warnings. Marcus Meissner <marcus@jet.franken.de> - ExtractAssociatedIconA needs to allocate enough space to have EAIW fill in lpIconPathW. Huw Davies <huw@codeweavers.com> - Unquote the icon file path if it's quoted. svn path=/trunk/; revision=17060
2005-08-05 07:48:18 +00:00
const char* name = NULL;
char clsidbuf[100];
Sync to Wine-20050930: Michael Jung <mjung@iss.tu-darmstadt.de> - Don't clone pidlLast in SHBindToParent. - Pass correct pointer to SHFree in case of failure in UNIXFS_path_to_pidl. - Return E_FAIL if we can't get the unix path in IPersistFolder3::InitializeEx. - Return E_NOAGGREGATION if non-NULL pUnkOuter is given to the constructor. Alexandre Julliard <julliard@winehq.org> - We are no longer generating .spec.c files. - Generate 16-bit spec files as assembly code too. - Use a more portable scheme for storing the name of a critical section. - Removed unused debug channels. - Specify 64-bit integers as double instead of long long in spec files so that we get the correct number of arguments. - We are no longer generating .dbg.c files. Milko Krachounov <milko@3mhz.net> - Bulgarian resources for mpr, msi, user, commdlg, oleaut32, shdocvw, shell32, comctl32, msrle32, mshtml, winspool, wineps, serialui, setupapi, wininet, regedit, uninstaller, notepad, winecfg and winhelp. Kevin Koltzau <kevin@plop.org> - Fix warnings in 64bit. Dmitry Timoshkov <dmitry@codeweavers.com> - Stop using a not initialized variable szTemp in _dbg_ILSimpleGetText, make _dbg_ILSimpleGetText return no value since nobody is using it. - Stop dereferencing a possible NULL in pdump since _dbg_ILGetDataPointer can potentially return NULL (for instance for root or desktop pidl). - Make shdebugstr_guid use standard wine_dbg_sprintf instead of the handmade solution. - Translate file name from unix to ANSI encoding in UnixFolder_IShellFolder2_GetDisplayNameOf. - Pass a locally modified version of SHELLEXECUTEINFO to IShellExecuteHookW_Execute, this should pass through at least sei_tmp.nShow retrieved from an .lnk file (fStartup). Alexander N. Sørnes <alex@thehandofagony.com> - Added Norwegian translation of comctl32 and shell32. Kimmo Myllyvirta <kimmo.myllyvirta@gmail.com> - Update Finnish resources. svn path=/trunk/; revision=18348
2005-10-08 17:41:41 +00:00
if (!id) return "(null)";
for (i=0;InterfaceDesc[i].riid && !name;i++) {
if (IsEqualIID(InterfaceDesc[i].riid, id)) name = InterfaceDesc[i].name;
}
if (!name) {
if (HCR_GetClassNameA(id, clsidbuf, 100))
name = clsidbuf;
}
return wine_dbg_sprintf( "\n\t{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x} (%s)",
id->Data1, id->Data2, id->Data3,
id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3],
id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7], name ? name : "unknown" );
}