Many fixes/reimplementations.
This commit is contained in:
parent
2b0c1d8aaa
commit
565b2e0b5d
|
@ -17,6 +17,7 @@
|
|||
#include "wine/obj_base.h"
|
||||
#include "wine/obj_enumidlist.h"
|
||||
#include "wine/obj_shellfolder.h"
|
||||
#include "wine/undocshell.h"
|
||||
|
||||
#include "pidl.h"
|
||||
#include "shell32_main.h"
|
||||
|
@ -253,7 +254,7 @@ BOOL WINAPI BrsFolderDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
|
|||
switch (wParam)
|
||||
{ case IDOK:
|
||||
pdump ( pidlRet );
|
||||
_ILGetPidlPath (pidlRet, lpBrowseInfo->pszDisplayName, MAX_PATH);
|
||||
SHGetPathFromIDListA(pidlRet, lpBrowseInfo->pszDisplayName);
|
||||
EndDialog(hWnd, (DWORD) ILClone(pidlRet));
|
||||
return TRUE;
|
||||
|
||||
|
|
1136
dlls/shell32/pidl.c
1136
dlls/shell32/pidl.c
File diff suppressed because it is too large
Load Diff
|
@ -32,7 +32,7 @@
|
|||
* drive 0x23/25 drive (usual)
|
||||
* drive 0x25/25 drive (lnk/persistant)
|
||||
* drive 0x29/25 drive
|
||||
* control/printer 0x2E
|
||||
* shell extension 0x2E mycomp
|
||||
* drive 0x2F drive (lnk/persistant)
|
||||
* folder/file 0x30 folder/file (1) (lnk/persistant)
|
||||
* folder 0x31 folder (usual)
|
||||
|
@ -40,8 +40,9 @@
|
|||
* workgroup 0x41 network (3)
|
||||
* computer 0x42 network (4)
|
||||
* whole network 0x47 network (5)
|
||||
* MSITStore 0x61 htmlhlp (7)
|
||||
* history/favorites 0xb1 file
|
||||
* share 0xc3 metwork (6)
|
||||
* share 0xc3 network (6)
|
||||
*
|
||||
* guess: the persistant elements are non tracking
|
||||
*
|
||||
|
@ -51,6 +52,8 @@
|
|||
* (4) one string "\\sirius"
|
||||
* (5) one string "whole network"
|
||||
* (6) one string "\\sirius\c"
|
||||
* (7) contains string "mk:@MSITStore:C:\path\file.chm::/path/filename.htm"
|
||||
* GUID 871C5380-42A0-1069-A2EA-08002B30309D
|
||||
*/
|
||||
|
||||
#define PT_DESKTOP 0x00 /* internal */
|
||||
|
@ -76,8 +79,9 @@ typedef struct tagPIDLDATA
|
|||
{ PIDLTYPE type; /*00*/
|
||||
union
|
||||
{ struct
|
||||
{ BYTE dummy;
|
||||
GUID guid;
|
||||
{ BYTE dummy; /*01*/
|
||||
GUID guid; /*02*/
|
||||
BYTE dummy1; /*18*/
|
||||
} mycomp;
|
||||
struct
|
||||
{ CHAR szDriveName[20]; /*01*/
|
||||
|
@ -98,6 +102,11 @@ typedef struct tagPIDLDATA
|
|||
{ WORD dummy; /*01*/
|
||||
CHAR szNames[1]; /*03*/
|
||||
} network;
|
||||
struct
|
||||
{ WORD dummy; /*01*/
|
||||
DWORD dummy1; /*02*/
|
||||
CHAR szName[1]; /*06*/ /* teminated by 0x00 0x00 */
|
||||
} htmlhelp;
|
||||
}u;
|
||||
} PIDLDATA, *LPPIDLDATA;
|
||||
#include "poppack.h"
|
||||
|
@ -108,10 +117,12 @@ typedef struct tagPIDLDATA
|
|||
* return value is strlen()
|
||||
*/
|
||||
DWORD WINAPI _ILGetDrive(LPCITEMIDLIST,LPSTR,UINT16);
|
||||
/*
|
||||
DWORD WINAPI _ILGetItemText(LPCITEMIDLIST,LPSTR,UINT16);
|
||||
DWORD WINAPI _ILGetFolderText(LPCITEMIDLIST,LPSTR,DWORD);
|
||||
DWORD WINAPI _ILGetValueText(LPCITEMIDLIST,LPSTR,DWORD);
|
||||
DWORD WINAPI _ILGetPidlPath(LPCITEMIDLIST,LPSTR,DWORD);
|
||||
*/
|
||||
|
||||
/*
|
||||
* getting special values from simple pidls
|
||||
|
@ -129,22 +140,22 @@ BOOL WINAPI _ILIsMyComputer(LPCITEMIDLIST);
|
|||
BOOL WINAPI _ILIsDrive(LPCITEMIDLIST);
|
||||
BOOL WINAPI _ILIsFolder(LPCITEMIDLIST);
|
||||
BOOL WINAPI _ILIsValue(LPCITEMIDLIST);
|
||||
BOOL WINAPI _ILIsSpecialFolder (LPCITEMIDLIST pidl);
|
||||
BOOL WINAPI _ILIsPidlSimple ( LPCITEMIDLIST pidl);
|
||||
|
||||
/*
|
||||
* simple pidls from strings
|
||||
*/
|
||||
LPITEMIDLIST WINAPI _ILCreateDesktop(void);
|
||||
LPITEMIDLIST WINAPI _ILCreateMyComputer(void);
|
||||
LPITEMIDLIST WINAPI _ILCreateIExplore(void);
|
||||
LPITEMIDLIST WINAPI _ILCreateDrive(LPCSTR);
|
||||
LPITEMIDLIST WINAPI _ILCreateFolder(LPCSTR, LPCSTR);
|
||||
LPITEMIDLIST WINAPI _ILCreateValue(LPCSTR, LPCSTR);
|
||||
LPITEMIDLIST WINAPI _ILCreateFolder(WIN32_FIND_DATAA * stffile);
|
||||
LPITEMIDLIST WINAPI _ILCreateValue(WIN32_FIND_DATAA * stffile);
|
||||
LPITEMIDLIST WINAPI _ILCreateSpecial(LPCSTR szGUID);
|
||||
|
||||
DWORD WINAPI _ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize);
|
||||
|
||||
/*
|
||||
* raw pidl handling (binary)
|
||||
*
|
||||
* data is binary / sizes are bytes
|
||||
*/
|
||||
DWORD WINAPI _ILGetData(PIDLTYPE,LPCITEMIDLIST,LPVOID,UINT);
|
||||
LPITEMIDLIST WINAPI _ILCreate(PIDLTYPE,LPCVOID,UINT16);
|
||||
|
||||
/*
|
||||
|
@ -153,8 +164,7 @@ LPITEMIDLIST WINAPI _ILCreate(PIDLTYPE,LPCVOID,UINT16);
|
|||
LPPIDLDATA WINAPI _ILGetDataPointer(LPCITEMIDLIST);
|
||||
LPSTR WINAPI _ILGetTextPointer(PIDLTYPE type, LPPIDLDATA pidldata);
|
||||
LPSTR WINAPI _ILGetSTextPointer(PIDLTYPE type, LPPIDLDATA pidldata);
|
||||
|
||||
LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2);
|
||||
REFIID WINAPI _ILGetGUIDPointer(LPCITEMIDLIST pidl);
|
||||
|
||||
void pdump (LPCITEMIDLIST pidl);
|
||||
BOOL pcheck (LPCITEMIDLIST pidl);
|
||||
|
|
|
@ -21,10 +21,11 @@
|
|||
|
||||
#include "shellapi.h"
|
||||
#include "pidl.h"
|
||||
|
||||
#include "shlobj.h"
|
||||
#include "shell32_main.h"
|
||||
|
||||
#include "shlguid.h"
|
||||
#include "wine/undocshell.h"
|
||||
|
||||
DECLARE_DEBUG_CHANNEL(exec)
|
||||
DECLARE_DEBUG_CHANNEL(shell)
|
||||
|
@ -126,7 +127,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
|
|||
* NULL on the desktop folder.
|
||||
*/
|
||||
if (_ILIsDesktop((LPCITEMIDLIST)path))
|
||||
{ psfi->dwAttributes = SFGAO_HASSUBFOLDER | SFGAO_FOLDER | SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANLINK;
|
||||
{ psfi->dwAttributes = 0xb0000154;
|
||||
ret = TRUE;
|
||||
}
|
||||
else
|
||||
|
@ -134,19 +135,17 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
|
|||
|
||||
switch (pData->type)
|
||||
{ case PT_DESKTOP:
|
||||
psfi->dwAttributes = SFGAO_HASSUBFOLDER | SFGAO_FOLDER | SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANLINK;
|
||||
psfi->dwAttributes = 0xb0000154;
|
||||
case PT_MYCOMP:
|
||||
psfi->dwAttributes = SFGAO_HASSUBFOLDER | SFGAO_FOLDER | SFGAO_FILESYSANCESTOR |
|
||||
SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANRENAME | SFGAO_CANLINK ;
|
||||
psfi->dwAttributes = 0xb0000154;
|
||||
case PT_SPECIAL:
|
||||
psfi->dwAttributes = SFGAO_HASSUBFOLDER | SFGAO_FOLDER | SFGAO_CAPABILITYMASK;
|
||||
psfi->dwAttributes = 0xa0000000;
|
||||
case PT_DRIVE:
|
||||
psfi->dwAttributes = SFGAO_HASSUBFOLDER | SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_FILESYSANCESTOR |
|
||||
SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANLINK;
|
||||
psfi->dwAttributes = 0xf0000144;
|
||||
case PT_FOLDER:
|
||||
psfi->dwAttributes = SFGAO_HASSUBFOLDER | SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_CAPABILITYMASK;
|
||||
psfi->dwAttributes = 0xe0000177;
|
||||
case PT_VALUE:
|
||||
psfi->dwAttributes = SFGAO_FILESYSTEM | SFGAO_CAPABILITYMASK;
|
||||
psfi->dwAttributes = 0x40000177;
|
||||
}
|
||||
ret=TRUE;
|
||||
}
|
||||
|
@ -164,11 +163,14 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
|
|||
}
|
||||
|
||||
if (flags & SHGFI_DISPLAYNAME)
|
||||
{ if (flags & SHGFI_PIDL)
|
||||
{ strcpy(psfi->szDisplayName,szTemp);
|
||||
{
|
||||
if (flags & SHGFI_PIDL)
|
||||
{
|
||||
_ILSimpleGetText(ILFindLastID(pPidlTemp), psfi->szDisplayName, MAX_PATH);
|
||||
}
|
||||
else
|
||||
{ strcpy(psfi->szDisplayName,path);
|
||||
{
|
||||
lstrcpynA(psfi->szDisplayName,PathFindFilenameA(path), MAX_PATH);
|
||||
}
|
||||
TRACE_(shell)("displayname=%s\n", psfi->szDisplayName);
|
||||
ret=TRUE;
|
||||
|
@ -391,292 +393,6 @@ UINT WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* SHGetDesktopFolder [SHELL32.216]
|
||||
*
|
||||
* SDK header win95/shlobj.h: This is equivalent to call CoCreateInstance with
|
||||
* CLSID_ShellDesktop
|
||||
* CoCreateInstance(CLSID_Desktop, NULL, CLSCTX_INPROC, IID_IShellFolder, &pshf);
|
||||
*
|
||||
* RETURNS
|
||||
* the interface to the shell desktop folder.
|
||||
*
|
||||
* FIXME
|
||||
* the pdesktopfolder has to be released at the end (at dll unloading???)
|
||||
*/
|
||||
LPSHELLFOLDER pdesktopfolder=NULL;
|
||||
|
||||
DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *shellfolder)
|
||||
{ HRESULT hres = E_OUTOFMEMORY;
|
||||
LPCLASSFACTORY lpclf;
|
||||
TRACE_(shell)("%p->(%p)\n",shellfolder,*shellfolder);
|
||||
|
||||
if (pdesktopfolder)
|
||||
{ hres = NOERROR;
|
||||
}
|
||||
else
|
||||
{ lpclf = IClassFactory_Constructor(&CLSID_ShellDesktop);
|
||||
if(lpclf)
|
||||
{ hres = IClassFactory_CreateInstance(lpclf,NULL,(REFIID)&IID_IShellFolder, (void*)&pdesktopfolder);
|
||||
IClassFactory_Release(lpclf);
|
||||
}
|
||||
}
|
||||
|
||||
if (pdesktopfolder)
|
||||
{ *shellfolder = pdesktopfolder;
|
||||
IShellFolder_AddRef(pdesktopfolder);
|
||||
}
|
||||
else
|
||||
{ *shellfolder=NULL;
|
||||
}
|
||||
|
||||
TRACE_(shell)("-- %p->(%p)\n",shellfolder, *shellfolder);
|
||||
return hres;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHGetSpecialFolderLocation [SHELL32.223]
|
||||
*
|
||||
* gets the folder locations from the registry and creates a pidl
|
||||
* creates missing reg keys and directorys
|
||||
*
|
||||
* PARAMS
|
||||
* hwndOwner [I]
|
||||
* nFolder [I] CSIDL_xxxxx
|
||||
* ppidl [O] PIDL of a special folder
|
||||
*
|
||||
* RETURNS
|
||||
* HResult
|
||||
*
|
||||
* FIXME
|
||||
* - look for "User Shell Folder" first
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST * ppidl)
|
||||
{ LPSHELLFOLDER shellfolder;
|
||||
DWORD pchEaten, tpathlen=MAX_PATH, type, dwdisp, res, dwLastError;
|
||||
CHAR pszTemp[256], buffer[256], tpath[MAX_PATH], npath[MAX_PATH];
|
||||
LPWSTR lpszDisplayName = (LPWSTR)&pszTemp[0];
|
||||
HKEY key;
|
||||
|
||||
enum
|
||||
{ FT_UNKNOWN= 0x00000000,
|
||||
FT_DIR= 0x00000001,
|
||||
FT_DESKTOP= 0x00000002,
|
||||
FT_SPECIAL= 0x00000003
|
||||
} tFolder;
|
||||
|
||||
TRACE_(shell)("(%04x,0x%x,%p)\n", hwndOwner,nFolder,ppidl);
|
||||
|
||||
strcpy(buffer,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\");
|
||||
|
||||
res=RegCreateKeyExA(HKEY_CURRENT_USER,buffer,0,NULL,REG_OPTION_NON_VOLATILE,KEY_WRITE,NULL,&key,&dwdisp);
|
||||
if (res)
|
||||
{ ERR_(shell)("Could not create key %s %08lx \n",buffer,res);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
tFolder=FT_DIR;
|
||||
switch (nFolder)
|
||||
{ case CSIDL_BITBUCKET:
|
||||
strcpy (buffer,"xxx"); /*not in the registry*/
|
||||
TRACE_(shell)("looking for Recycler\n");
|
||||
tFolder=FT_UNKNOWN;
|
||||
break;
|
||||
case CSIDL_CONTROLS:
|
||||
strcpy (buffer,"xxx"); /*virtual folder*/
|
||||
TRACE_(shell)("looking for Control\n");
|
||||
tFolder=FT_UNKNOWN;
|
||||
break;
|
||||
case CSIDL_DESKTOP:
|
||||
strcpy (buffer,"xxx"); /*virtual folder*/
|
||||
TRACE_(shell)("looking for Desktop\n");
|
||||
tFolder=FT_DESKTOP;
|
||||
break;
|
||||
case CSIDL_DESKTOPDIRECTORY:
|
||||
case CSIDL_COMMON_DESKTOPDIRECTORY:
|
||||
strcpy (buffer,"Desktop");
|
||||
break;
|
||||
case CSIDL_DRIVES:
|
||||
strcpy (buffer,"xxx"); /*virtual folder*/
|
||||
TRACE_(shell)("looking for Drives\n");
|
||||
tFolder=FT_SPECIAL;
|
||||
break;
|
||||
case CSIDL_FONTS:
|
||||
strcpy (buffer,"Fonts");
|
||||
break;
|
||||
case CSIDL_NETHOOD:
|
||||
strcpy (buffer,"NetHood");
|
||||
break;
|
||||
case CSIDL_PRINTHOOD:
|
||||
strcpy (buffer,"PrintHood");
|
||||
break;
|
||||
case CSIDL_NETWORK:
|
||||
strcpy (buffer,"xxx"); /*virtual folder*/
|
||||
TRACE_(shell)("looking for Network\n");
|
||||
tFolder=FT_UNKNOWN;
|
||||
break;
|
||||
case CSIDL_APPDATA:
|
||||
strcpy (buffer,"Appdata");
|
||||
break;
|
||||
case CSIDL_PERSONAL:
|
||||
strcpy (buffer,"Personal");
|
||||
break;
|
||||
case CSIDL_FAVORITES:
|
||||
strcpy (buffer,"Favorites");
|
||||
break;
|
||||
case CSIDL_PRINTERS:
|
||||
strcpy (buffer,"PrintHood");
|
||||
break;
|
||||
case CSIDL_COMMON_PROGRAMS:
|
||||
case CSIDL_PROGRAMS:
|
||||
strcpy (buffer,"Programs");
|
||||
break;
|
||||
case CSIDL_RECENT:
|
||||
strcpy (buffer,"Recent");
|
||||
break;
|
||||
case CSIDL_SENDTO:
|
||||
strcpy (buffer,"SendTo");
|
||||
break;
|
||||
case CSIDL_COMMON_STARTMENU:
|
||||
case CSIDL_STARTMENU:
|
||||
strcpy (buffer,"Start Menu");
|
||||
break;
|
||||
case CSIDL_COMMON_STARTUP:
|
||||
case CSIDL_STARTUP:
|
||||
strcpy (buffer,"Startup");
|
||||
break;
|
||||
case CSIDL_TEMPLATES:
|
||||
strcpy (buffer,"Templates");
|
||||
break;
|
||||
case CSIDL_INTERNET_CACHE:
|
||||
strcpy (buffer,"Cache");
|
||||
break;
|
||||
case CSIDL_HISTORY:
|
||||
strcpy (buffer,"History");
|
||||
break;
|
||||
case CSIDL_COOKIES:
|
||||
strcpy(buffer,"Cookies");
|
||||
break;
|
||||
default:
|
||||
ERR_(shell)("unknown CSIDL 0x%08x\n", nFolder);
|
||||
tFolder=FT_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
|
||||
TRACE_(shell)("Key=%s\n",buffer);
|
||||
|
||||
type=REG_SZ;
|
||||
|
||||
switch (tFolder)
|
||||
{ case FT_DIR:
|
||||
/* Directory: get the value from the registry, if its not there
|
||||
create it and the directory*/
|
||||
if (RegQueryValueExA(key,buffer,NULL,&type,(LPBYTE)tpath,&tpathlen))
|
||||
{ GetWindowsDirectoryA(npath,MAX_PATH);
|
||||
PathAddBackslashA(npath);
|
||||
switch (nFolder)
|
||||
{ case CSIDL_DESKTOPDIRECTORY:
|
||||
case CSIDL_COMMON_DESKTOPDIRECTORY:
|
||||
strcat (npath,"Desktop");
|
||||
break;
|
||||
case CSIDL_FONTS:
|
||||
strcat (npath,"Fonts");
|
||||
break;
|
||||
case CSIDL_NETHOOD:
|
||||
strcat (npath,"NetHood");
|
||||
break;
|
||||
case CSIDL_PRINTHOOD:
|
||||
strcat (npath,"PrintHood");
|
||||
break;
|
||||
case CSIDL_APPDATA:
|
||||
strcat (npath,"Appdata");
|
||||
break;
|
||||
case CSIDL_PERSONAL:
|
||||
strcpy (npath,"C:\\Personal");
|
||||
break;
|
||||
case CSIDL_FAVORITES:
|
||||
strcat (npath,"Favorites");
|
||||
break;
|
||||
case CSIDL_PRINTERS:
|
||||
strcat (npath,"PrintHood");
|
||||
break;
|
||||
case CSIDL_COMMON_PROGRAMS:
|
||||
case CSIDL_PROGRAMS:
|
||||
strcat (npath,"Start Menu");
|
||||
CreateDirectoryA(npath,NULL);
|
||||
strcat (npath,"\\Programs");
|
||||
break;
|
||||
case CSIDL_RECENT:
|
||||
strcat (npath,"Recent");
|
||||
break;
|
||||
case CSIDL_SENDTO:
|
||||
strcat (npath,"SendTo");
|
||||
break;
|
||||
case CSIDL_COMMON_STARTMENU:
|
||||
case CSIDL_STARTMENU:
|
||||
strcat (npath,"Start Menu");
|
||||
break;
|
||||
case CSIDL_COMMON_STARTUP:
|
||||
case CSIDL_STARTUP:
|
||||
strcat (npath,"Start Menu");
|
||||
CreateDirectoryA(npath,NULL);
|
||||
strcat (npath,"\\Startup");
|
||||
break;
|
||||
case CSIDL_TEMPLATES:
|
||||
strcat (npath,"Templates");
|
||||
break;
|
||||
case CSIDL_INTERNET_CACHE:
|
||||
strcat(npath,"Temporary Internet Files");
|
||||
break;
|
||||
case CSIDL_HISTORY:
|
||||
strcat (npath,"History");
|
||||
break;
|
||||
case CSIDL_COOKIES:
|
||||
strcat (npath,"Cookies");
|
||||
break;
|
||||
default:
|
||||
RegCloseKey(key);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
if (RegSetValueExA(key,buffer,0,REG_SZ,(LPBYTE)npath,sizeof(npath)+1))
|
||||
{ ERR_(shell)("could not create value %s\n",buffer);
|
||||
RegCloseKey(key);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
TRACE_(shell)("value %s=%s created\n",buffer,npath);
|
||||
dwLastError = GetLastError();
|
||||
CreateDirectoryA(npath,NULL);
|
||||
SetLastError (dwLastError);
|
||||
strcpy(tpath,npath);
|
||||
}
|
||||
break;
|
||||
case FT_DESKTOP:
|
||||
strcpy (tpath,"Desktop");
|
||||
break;
|
||||
case FT_SPECIAL:
|
||||
if (nFolder==CSIDL_DRIVES)
|
||||
strcpy (tpath,"My Computer");
|
||||
break;
|
||||
default:
|
||||
RegCloseKey(key);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
RegCloseKey(key);
|
||||
|
||||
TRACE_(shell)("Value=%s\n",tpath);
|
||||
LocalToWideChar(lpszDisplayName, tpath, 256);
|
||||
|
||||
if (SHGetDesktopFolder(&shellfolder)==S_OK)
|
||||
{ IShellFolder_ParseDisplayName(shellfolder,hwndOwner, NULL,lpszDisplayName,&pchEaten,ppidl,NULL);
|
||||
IShellFolder_Release(shellfolder);
|
||||
}
|
||||
|
||||
TRACE_(shell)("-- (new pidl %p)\n",*ppidl);
|
||||
return NOERROR;
|
||||
}
|
||||
/*************************************************************************
|
||||
* SHHelpShortcuts_RunDLL [SHELL32.224]
|
||||
*
|
||||
|
@ -940,88 +656,6 @@ void WINAPI FreeIconList( DWORD dw )
|
|||
{ FIXME_(shell)("(%lx): stub\n",dw);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHGetPathFromIDListA [SHELL32.261][NT 4.0: SHELL32.220]
|
||||
*
|
||||
* PARAMETERS
|
||||
* pidl, [IN] pidl
|
||||
* pszPath [OUT] path
|
||||
*
|
||||
* RETURNS
|
||||
* path from a passed PIDL.
|
||||
*
|
||||
* NOTES
|
||||
* exported by name
|
||||
*
|
||||
* FIXME
|
||||
* fnGetDisplayNameOf can return different types of OLEString
|
||||
*/
|
||||
DWORD WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath)
|
||||
{ STRRET lpName;
|
||||
LPSHELLFOLDER shellfolder;
|
||||
CHAR buffer[MAX_PATH],tpath[MAX_PATH];
|
||||
DWORD type,tpathlen=MAX_PATH,dwdisp;
|
||||
HKEY key;
|
||||
|
||||
TRACE_(shell)("(pidl=%p,%p)\n",pidl,pszPath);
|
||||
|
||||
if (!pidl)
|
||||
{ strcpy(buffer,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\");
|
||||
|
||||
if (RegCreateKeyExA(HKEY_CURRENT_USER,buffer,0,NULL,REG_OPTION_NON_VOLATILE,KEY_WRITE,NULL,&key,&dwdisp))
|
||||
{ return E_OUTOFMEMORY;
|
||||
}
|
||||
type=REG_SZ;
|
||||
strcpy (buffer,"Desktop"); /*registry name*/
|
||||
if ( RegQueryValueExA(key,buffer,NULL,&type,(LPBYTE)tpath,&tpathlen))
|
||||
{ GetWindowsDirectoryA(tpath,MAX_PATH);
|
||||
PathAddBackslashA(tpath);
|
||||
strcat (tpath,"Desktop"); /*folder name*/
|
||||
RegSetValueExA(key,buffer,0,REG_SZ,(LPBYTE)tpath,tpathlen);
|
||||
CreateDirectoryA(tpath,NULL);
|
||||
}
|
||||
RegCloseKey(key);
|
||||
strcpy(pszPath,tpath);
|
||||
}
|
||||
else
|
||||
{ if (SHGetDesktopFolder(&shellfolder)==S_OK)
|
||||
{ IShellFolder_GetDisplayNameOf(shellfolder,pidl,SHGDN_FORPARSING,&lpName);
|
||||
IShellFolder_Release(shellfolder);
|
||||
}
|
||||
strcpy(pszPath,lpName.u.cStr);
|
||||
}
|
||||
TRACE_(shell)("-- (%s)\n",pszPath);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/*************************************************************************
|
||||
* SHGetPathFromIDListW [SHELL32.262]
|
||||
*/
|
||||
DWORD WINAPI SHGetPathFromIDListW (LPCITEMIDLIST pidl,LPWSTR pszPath)
|
||||
{ char sTemp[MAX_PATH];
|
||||
|
||||
TRACE_(shell)("(pidl=%p)\n", pidl);
|
||||
|
||||
SHGetPathFromIDListA (pidl, sTemp);
|
||||
lstrcpyAtoW(pszPath, sTemp);
|
||||
|
||||
TRACE_(shell)("-- (%s)\n",debugstr_w(pszPath));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHGetPathFromIDListAW [SHELL32.221][NT 4.0: SHELL32.219]
|
||||
*/
|
||||
BOOL WINAPI SHGetPathFromIDListAW(LPCITEMIDLIST pidl,LPVOID pszPath)
|
||||
{
|
||||
TRACE_(shell)("(pidl=%p,%p)\n",pidl,pszPath);
|
||||
|
||||
if (VERSION_OsIsUnicode())
|
||||
return SHGetPathFromIDListW(pidl,pszPath);
|
||||
return SHGetPathFromIDListA(pidl,pszPath);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetVersion [COMCTL32.25]
|
||||
*
|
||||
|
@ -1068,6 +702,7 @@ HIMAGELIST (WINAPI * pImageList_Create) (INT,INT,UINT,INT,INT);
|
|||
BOOL (WINAPI* pImageList_Draw) (HIMAGELIST himl, int i, HDC hdcDest, int x, int y, UINT fStyle);
|
||||
HICON (WINAPI * pImageList_GetIcon) (HIMAGELIST, INT, UINT);
|
||||
INT (WINAPI* pImageList_GetImageCount)(HIMAGELIST);
|
||||
COLORREF (WINAPI *pImageList_SetBkColor)(HIMAGELIST, COLORREF);
|
||||
|
||||
LPVOID (WINAPI* pCOMCTL32_Alloc) (INT);
|
||||
BOOL (WINAPI* pCOMCTL32_Free) (LPVOID);
|
||||
|
@ -1127,6 +762,7 @@ BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
|||
pImageList_GetIcon=(void*)GetProcAddress(hComctl32,"ImageList_GetIcon");
|
||||
pImageList_GetImageCount=(void*)GetProcAddress(hComctl32,"ImageList_GetImageCount");
|
||||
pImageList_Draw=(void*)GetProcAddress(hComctl32,"ImageList_Draw");
|
||||
pImageList_SetBkColor=(void*)GetProcAddress(hComctl32,"ImageList_SetBkColor");
|
||||
|
||||
/* imports by ordinal, pray that it works*/
|
||||
pCOMCTL32_Alloc=(void*)GetProcAddress(hComctl32, (LPCSTR)71L);
|
||||
|
|
|
@ -36,6 +36,7 @@ extern HIMAGELIST (WINAPI* pImageList_Create) (INT,INT,UINT,INT,INT);
|
|||
extern BOOL (WINAPI* pImageList_Draw) (HIMAGELIST himl, int i, HDC hdcDest, int x, int y, UINT fStyle);
|
||||
extern HICON (WINAPI* pImageList_GetIcon) (HIMAGELIST, INT, UINT);
|
||||
extern INT (WINAPI* pImageList_GetImageCount)(HIMAGELIST);
|
||||
extern COLORREF (WINAPI *pImageList_SetBkColor)(HIMAGELIST, COLORREF);
|
||||
|
||||
extern LPVOID (WINAPI* pCOMCTL32_Alloc) (INT);
|
||||
extern BOOL (WINAPI* pCOMCTL32_Free) (LPVOID);
|
||||
|
@ -52,23 +53,6 @@ extern LPVOID (WINAPI* pDPA_DeletePtr) (const HDPA hdpa, INT i);
|
|||
extern HICON (WINAPI *pLookupIconIdFromDirectoryEx)(LPBYTE dir, BOOL bIcon, INT width, INT height, UINT cFlag);
|
||||
extern HICON (WINAPI *pCreateIconFromResourceEx)(LPBYTE bits,UINT cbSize, BOOL bIcon, DWORD dwVersion, INT width, INT height,UINT cFlag);
|
||||
|
||||
/* undocumented WINAPI functions not globaly exported */
|
||||
LPITEMIDLIST WINAPI ILClone (LPCITEMIDLIST pidl);
|
||||
LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl);
|
||||
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST iil1,LPCITEMIDLIST iil2);
|
||||
LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl);
|
||||
DWORD WINAPI ILGetSize(LPITEMIDLIST pidl);
|
||||
BOOL WINAPI ILGetDisplayName(LPCITEMIDLIST pidl,LPSTR path);
|
||||
DWORD WINAPI ILFree(LPITEMIDLIST pidl);
|
||||
|
||||
HRESULT WINAPI SHILCreateFromPathA (LPSTR path, LPITEMIDLIST * ppidl, DWORD attributes);
|
||||
HRESULT WINAPI SHILCreateFromPathW (LPWSTR path, LPITEMIDLIST * ppidl, DWORD attributes);
|
||||
HRESULT WINAPI SHILCreateFromPathAW (LPVOID path, LPITEMIDLIST * ppidl, DWORD attributes);
|
||||
|
||||
LPITEMIDLIST WINAPI ILCreateFromPathA(LPSTR path);
|
||||
LPITEMIDLIST WINAPI ILCreateFromPathW(LPWSTR path);
|
||||
LPITEMIDLIST WINAPI ILCreateFromPathAW(LPVOID path);
|
||||
|
||||
BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList);
|
||||
HRESULT WINAPI StrRetToStrN (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl);
|
||||
|
||||
|
@ -82,6 +66,8 @@ BOOL PidlToSicIndex (IShellFolder * sh, LPITEMIDLIST pidl, BOOL bBigIcon, UINT *
|
|||
BOOL HCR_MapTypeToValue ( LPCSTR szExtension, LPSTR szFileType, DWORD len);
|
||||
BOOL HCR_GetExecuteCommand ( LPCSTR szClass, LPCSTR szVerb, LPSTR szDest, DWORD len );
|
||||
BOOL HCR_GetDefaultIcon (LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr);
|
||||
BOOL HCR_GetClassName (REFIID riid, LPSTR szDest, DWORD len);
|
||||
BOOL HCR_GetFolderAttributes (REFIID riid, LPDWORD szDest);
|
||||
|
||||
DWORD WINAPI ParseFieldA(LPCSTR src,DWORD field,LPSTR dst,DWORD len);
|
||||
|
||||
|
@ -93,32 +79,38 @@ HANDLE WINAPI SHFreeShared(HANDLE hmem, DWORD procID);
|
|||
/****************************************************************************
|
||||
* Class constructors
|
||||
*/
|
||||
extern LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPSHELLFOLDER psf, LPITEMIDLIST * apidl, UINT cidl);
|
||||
extern LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT, const FORMATETC []);
|
||||
LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPITEMIDLIST myPidl, LPITEMIDLIST * apidl, UINT cidl);
|
||||
LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT, const FORMATETC []);
|
||||
|
||||
extern LPCLASSFACTORY IClassFactory_Constructor(REFCLSID);
|
||||
extern LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER, LPCITEMIDLIST *, UINT);
|
||||
extern LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER, LPCITEMIDLIST);
|
||||
extern LPSHELLLINK IShellLink_Constructor(BOOL);
|
||||
extern LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD);
|
||||
extern LPEXTRACTICONA IExtractIconA_Constructor(LPITEMIDLIST);
|
||||
extern HRESULT CreateStreamOnFile (LPCSTR pszFilename, IStream ** ppstm);
|
||||
LPCLASSFACTORY IClassFactory_Constructor(REFCLSID);
|
||||
IContextMenu * IContextMenu_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl, LPCITEMIDLIST *aPidls, UINT uItemCount);
|
||||
IContextMenu * ISvBgCm_Constructor(void);
|
||||
LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER);
|
||||
LPSHELLLINK IShellLink_Constructor(BOOL);
|
||||
|
||||
IShellFolder * ISF_Desktop_Constructor(void);
|
||||
|
||||
/* 3th parameter */
|
||||
#define EIDL_DESK 0
|
||||
#define EIDL_MYCOMP 1
|
||||
#define EIDL_FILE 2
|
||||
|
||||
LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD,DWORD);
|
||||
|
||||
LPEXTRACTICONA IExtractIconA_Constructor(LPITEMIDLIST);
|
||||
HRESULT CreateStreamOnFile (LPCSTR pszFilename, IStream ** ppstm);
|
||||
|
||||
/* fixme: rename the functions when the shell32.dll has it's own exports namespace */
|
||||
HRESULT WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv);
|
||||
HRESULT WINAPI SHELL32_DllCanUnloadNow(void);
|
||||
LRESULT WINAPI SHCoCreateInstance(LPSTR,REFCLSID,LPUNKNOWN,REFIID,LPVOID *);
|
||||
|
||||
/* elements of this structure are accessed directly from within shell32 */
|
||||
typedef struct
|
||||
{
|
||||
ICOM_VTABLE(IShellFolder)* lpvtbl;
|
||||
DWORD ref;
|
||||
ICOM_VTABLE(IPersistFolder)* lpvtblPersistFolder;
|
||||
/* fixme: move away */
|
||||
#define ResultFromShort(i) MAKE_SCODE(SEVERITY_SUCCESS, 0, (USHORT)(i))
|
||||
|
||||
LPSTR sMyPath;
|
||||
LPITEMIDLIST pMyPidl;
|
||||
LPITEMIDLIST mpidl;
|
||||
} IGenericSFImpl;
|
||||
extern LPSHELLFOLDER IShellFolder_Constructor(IGenericSFImpl*,LPITEMIDLIST);
|
||||
/* menu merging */
|
||||
#define MM_ADDSEPARATOR 0x00000001L
|
||||
#define MM_SUBMENUSHAVEIDS 0x00000002L
|
||||
HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "wine/obj_base.h"
|
||||
#include "wine/obj_enumidlist.h"
|
||||
#include "wine/obj_shellfolder.h"
|
||||
#include "wine/undocshell.h"
|
||||
|
||||
#include "heap.h"
|
||||
#include "debugtools.h"
|
||||
|
@ -111,7 +112,7 @@ static int FM_InitMenuPopup(HMENU hmenu, LPITEMIDLIST pAlternatePidl)
|
|||
MENUINFO MenuInfo;
|
||||
LPFMINFO menudata;
|
||||
|
||||
TRACE("\n");
|
||||
TRACE("0x%04x %p\n", hmenu, pAlternatePidl);
|
||||
|
||||
MenuInfo.cbSize = sizeof(MENUINFO);
|
||||
MenuInfo.fMask = MIM_MENUDATA;
|
||||
|
@ -765,17 +766,18 @@ BOOL _SHIsMenuSeparator(HMENU hm, int i)
|
|||
mii.fMask = MIIM_TYPE;
|
||||
mii.cch = 0; /* WARNING: We MUST initialize it to 0*/
|
||||
if (!GetMenuItemInfoA(hm, i, TRUE, &mii))
|
||||
{ return(FALSE);
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
if (mii.fType & MFT_SEPARATOR)
|
||||
{ return(TRUE);
|
||||
{
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
return(FALSE);
|
||||
}
|
||||
#define MM_ADDSEPARATOR 0x00000001L
|
||||
#define MM_SUBMENUSHAVEIDS 0x00000002L
|
||||
|
||||
HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags)
|
||||
{ int nItem;
|
||||
HMENU hmSubMenu;
|
||||
|
@ -784,7 +786,7 @@ HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uI
|
|||
char szName[256];
|
||||
UINT uTemp, uIDMax = uIDAdjust;
|
||||
|
||||
FIXME("hmenu1=0x%04x hmenu2=0x%04x 0x%04x 0x%04x 0x%04x 0x%04lx stub\n",
|
||||
TRACE("hmenu1=0x%04x hmenu2=0x%04x 0x%04x 0x%04x 0x%04x 0x%04lx\n",
|
||||
hmDst, hmSrc, uInsert, uIDAdjust, uIDAdjustMax, uFlags);
|
||||
|
||||
if (!hmDst || !hmSrc)
|
||||
|
@ -792,15 +794,20 @@ HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uI
|
|||
}
|
||||
|
||||
nItem = GetMenuItemCount(hmDst);
|
||||
if (uInsert >= (UINT)nItem)
|
||||
{ uInsert = (UINT)nItem;
|
||||
|
||||
if (uInsert >= (UINT)nItem) /* insert position inside menu? */
|
||||
{
|
||||
uInsert = (UINT)nItem; /* append on the end */
|
||||
bAlreadySeparated = TRUE;
|
||||
}
|
||||
else
|
||||
{ bAlreadySeparated = _SHIsMenuSeparator(hmDst, uInsert);;
|
||||
{
|
||||
bAlreadySeparated = _SHIsMenuSeparator(hmDst, uInsert);;
|
||||
}
|
||||
|
||||
if ((uFlags & MM_ADDSEPARATOR) && !bAlreadySeparated)
|
||||
{ /* Add a separator between the menus */
|
||||
{
|
||||
/* Add a separator between the menus */
|
||||
InsertMenuA(hmDst, uInsert, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
|
||||
bAlreadySeparated = TRUE;
|
||||
}
|
||||
|
@ -808,83 +815,104 @@ HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uI
|
|||
|
||||
/* Go through the menu items and clone them*/
|
||||
for (nItem = GetMenuItemCount(hmSrc) - 1; nItem >= 0; nItem--)
|
||||
{ miiSrc.cbSize = sizeof(MENUITEMINFOA);
|
||||
{
|
||||
miiSrc.cbSize = sizeof(MENUITEMINFOA);
|
||||
miiSrc.fMask = MIIM_STATE | MIIM_ID | MIIM_SUBMENU | MIIM_CHECKMARKS | MIIM_TYPE | MIIM_DATA;
|
||||
/* We need to reset this every time through the loop in case
|
||||
menus DON'T have IDs*/
|
||||
|
||||
/* We need to reset this every time through the loop in case menus DON'T have IDs*/
|
||||
miiSrc.fType = MFT_STRING;
|
||||
miiSrc.dwTypeData = szName;
|
||||
miiSrc.dwItemData = 0;
|
||||
miiSrc.cch = sizeof(szName);
|
||||
|
||||
if (!GetMenuItemInfoA(hmSrc, nItem, TRUE, &miiSrc))
|
||||
{ continue;
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
/* TRACE("found menu=0x%04x %s id=0x%04x mask=0x%08x smenu=0x%04x\n", hmSrc, debugstr_a(miiSrc.dwTypeData), miiSrc.wID, miiSrc.fMask, miiSrc.hSubMenu);
|
||||
*/
|
||||
if (miiSrc.fType & MFT_SEPARATOR)
|
||||
{ /* This is a separator; don't put two of them in a row*/
|
||||
{
|
||||
/* This is a separator; don't put two of them in a row */
|
||||
if (bAlreadySeparated)
|
||||
{ continue;
|
||||
}
|
||||
continue;
|
||||
|
||||
bAlreadySeparated = TRUE;
|
||||
}
|
||||
else if (miiSrc.hSubMenu)
|
||||
{ if (uFlags & MM_SUBMENUSHAVEIDS)
|
||||
{ /* Adjust the ID and check it*/
|
||||
miiSrc.wID += uIDAdjust;
|
||||
if (miiSrc.wID > uIDAdjustMax)
|
||||
{ continue;
|
||||
}
|
||||
if (uIDMax <= miiSrc.wID)
|
||||
{ uIDMax = miiSrc.wID + 1;
|
||||
}
|
||||
{
|
||||
if (uFlags & MM_SUBMENUSHAVEIDS)
|
||||
{
|
||||
miiSrc.wID += uIDAdjust; /* add uIDAdjust to the ID */
|
||||
|
||||
if (miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */
|
||||
continue;
|
||||
|
||||
if (uIDMax <= miiSrc.wID) /* remember the highest ID */
|
||||
uIDMax = miiSrc.wID + 1;
|
||||
}
|
||||
else
|
||||
{ /* Don't set IDs for submenus that didn't have them already */
|
||||
miiSrc.fMask &= ~MIIM_ID;
|
||||
{
|
||||
miiSrc.fMask &= ~MIIM_ID; /* Don't set IDs for submenus that didn't have them already */
|
||||
}
|
||||
hmSubMenu = miiSrc.hSubMenu;
|
||||
|
||||
miiSrc.hSubMenu = CreatePopupMenu();
|
||||
if (!miiSrc.hSubMenu)
|
||||
{ return(uIDMax);
|
||||
}
|
||||
|
||||
if (!miiSrc.hSubMenu) return(uIDMax);
|
||||
|
||||
uTemp = Shell_MergeMenus(miiSrc.hSubMenu, hmSubMenu, 0, uIDAdjust, uIDAdjustMax, uFlags & MM_SUBMENUSHAVEIDS);
|
||||
|
||||
if (uIDMax <= uTemp)
|
||||
{ uIDMax = uTemp;
|
||||
}
|
||||
uIDMax = uTemp;
|
||||
|
||||
bAlreadySeparated = FALSE;
|
||||
}
|
||||
else
|
||||
{ /* Adjust the ID and check it*/
|
||||
miiSrc.wID += uIDAdjust;
|
||||
if (miiSrc.wID > uIDAdjustMax)
|
||||
{ continue;
|
||||
}
|
||||
if (uIDMax <= miiSrc.wID)
|
||||
{ uIDMax = miiSrc.wID + 1;
|
||||
}
|
||||
else /* normal menu item */
|
||||
{
|
||||
miiSrc.wID += uIDAdjust; /* add uIDAdjust to the ID */
|
||||
|
||||
if (miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */
|
||||
continue;
|
||||
|
||||
if (uIDMax <= miiSrc.wID) /* remember the highest ID */
|
||||
uIDMax = miiSrc.wID + 1;
|
||||
|
||||
bAlreadySeparated = FALSE;
|
||||
}
|
||||
|
||||
/* TRACE("inserting menu=0x%04x %s id=0x%04x mask=0x%08x smenu=0x%04x\n", hmDst, debugstr_a(miiSrc.dwTypeData), miiSrc.wID, miiSrc.fMask, miiSrc.hSubMenu);
|
||||
*/
|
||||
if (!InsertMenuItemA(hmDst, uInsert, TRUE, &miiSrc))
|
||||
{ return(uIDMax);
|
||||
{
|
||||
return(uIDMax);
|
||||
}
|
||||
}
|
||||
|
||||
/* Ensure the correct number of separators at the beginning of the
|
||||
inserted menu items*/
|
||||
if (uInsert == 0)
|
||||
{ if (bAlreadySeparated)
|
||||
{ DeleteMenu(hmDst, uInsert, MF_BYPOSITION);
|
||||
{
|
||||
if (bAlreadySeparated)
|
||||
{
|
||||
DeleteMenu(hmDst, uInsert, MF_BYPOSITION);
|
||||
}
|
||||
}
|
||||
else
|
||||
{ if (_SHIsMenuSeparator(hmDst, uInsert-1))
|
||||
{ if (bAlreadySeparated)
|
||||
{ DeleteMenu(hmDst, uInsert, MF_BYPOSITION);
|
||||
{
|
||||
if (_SHIsMenuSeparator(hmDst, uInsert-1))
|
||||
{
|
||||
if (bAlreadySeparated)
|
||||
{
|
||||
DeleteMenu(hmDst, uInsert, MF_BYPOSITION);
|
||||
}
|
||||
}
|
||||
else
|
||||
{ if ((uFlags & MM_ADDSEPARATOR) && !bAlreadySeparated)
|
||||
{ /* Add a separator between the menus*/
|
||||
{
|
||||
if ((uFlags & MM_ADDSEPARATOR) && !bAlreadySeparated)
|
||||
{
|
||||
/* Add a separator between the menus*/
|
||||
InsertMenuA(hmDst, uInsert, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,8 +73,8 @@ typedef struct
|
|||
} ITEMIDLIST,*LPITEMIDLIST,*LPCITEMIDLIST;
|
||||
#include "poppack.h"
|
||||
|
||||
DWORD WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath);
|
||||
DWORD WINAPI SHGetPathFromIDListW (LPCITEMIDLIST pidl,LPWSTR pszPath);
|
||||
BOOL WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath);
|
||||
BOOL WINAPI SHGetPathFromIDListW (LPCITEMIDLIST pidl,LPWSTR pszPath);
|
||||
#define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
|
||||
|
||||
|
||||
|
|
|
@ -31,8 +31,11 @@ DEFINE_GUID (IID_IDockingWindow, 0x012dd920L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00,
|
|||
DEFINE_GUID (IID_IDockingWindowSite, 0x2A342FC2L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
|
||||
|
||||
/****************************************************************************
|
||||
* the following should be moved to the right place
|
||||
* undocumented stuff
|
||||
*/
|
||||
/* the next two IID's are the namespace elements in the desktop folder */
|
||||
DEFINE_GUID (IID_MyComputer, 0x20D04FE0L, 0x3AEA, 0x1069, 0xA2, 0xD8, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
|
||||
DEFINE_GUID (IID_IExplore, 0x871C5380L, 0x42A0, 0x1069, 0xA2, 0xEA, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
|
||||
|
||||
DEFINE_GUID (CLSID_PaperBin, 0x645FF040L, 0x5081, 0x101B, 0x9F, 0x08, 0x00, 0xAA, 0x00, 0x2F, 0x95, 0x4E);
|
||||
#endif /* __WINE_SHLGUID_H */
|
||||
|
|
|
@ -41,7 +41,7 @@ extern UINT cfShellIDList;
|
|||
typedef struct
|
||||
{ UINT cidl;
|
||||
UINT aoffset[1];
|
||||
} CIDA, *LPCIDA;
|
||||
} CIDA, *LPCIDA,*LPIDA;
|
||||
|
||||
#define CFSTR_SHELLIDLISTOFFSET "Shell Object Offsets" /* CF_OBJECTPOSITIONS */
|
||||
#define CFSTR_NETRESOURCES "Net Resource" /* CF_NETRESOURCE */
|
||||
|
@ -299,6 +299,11 @@ HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int n
|
|||
HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
|
||||
#define SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList)
|
||||
|
||||
BOOL WINAPI SHGetSpecialFolderPathA (HWND hwndOwner,LPSTR szPath,DWORD csidl,BOOL bCreate);
|
||||
BOOL WINAPI SHGetSpecialFolderPathW (HWND hwndOwner,LPWSTR szPath,DWORD csidl,BOOL bCreate);
|
||||
#define SHGetSpecialFolderPath WINELIB_NAME_AW(SHGetSpecialFolderPath)
|
||||
|
||||
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST * ppidl);
|
||||
|
||||
/****************************************************************************
|
||||
* shlview structures
|
||||
|
|
|
@ -26,10 +26,7 @@ typedef struct IEnumIDList IEnumIDList, *LPENUMIDLIST;
|
|||
ICOM_METHOD3(HRESULT, Next, ULONG, celt, LPITEMIDLIST*, rgelt, ULONG*, pceltFetched) \
|
||||
ICOM_METHOD1(HRESULT, Skip, ULONG, celt) \
|
||||
ICOM_METHOD (HRESULT, Reset) \
|
||||
ICOM_METHOD1(HRESULT, Clone, IEnumIDList**, ppenum) \
|
||||
ICOM_METHOD2(BOOL, CreateEnumList, LPCSTR,, DWORD,) \
|
||||
ICOM_METHOD1(BOOL, AddToEnumList, LPITEMIDLIST,) \
|
||||
ICOM_METHOD (BOOL, DeleteList)
|
||||
ICOM_METHOD1(HRESULT, Clone, IEnumIDList**, ppenum)
|
||||
#define IEnumIDList_IMETHODS \
|
||||
IUnknown_IMETHODS \
|
||||
IEnumIDList_METHODS
|
||||
|
@ -46,9 +43,6 @@ ICOM_DEFINE(IEnumIDList,IUnknown)
|
|||
#define IEnumIDList_Skip(p,a) ICOM_CALL1(Skip,p,a)
|
||||
#define IEnumIDList_Reset(p) ICOM_CALL(Reset,p)
|
||||
#define IEnumIDList_Clone(p,a) ICOM_CALL1(Clone,p,a)
|
||||
#define IEnumIDList_CreateEnumList(p,a,b) ICOM_CALL2(CreateEnumList,p,a,b)
|
||||
#define IEnumIDList_AddToEnumList(p,a) ICOM_CALL1(AddToEnumList,p,a)
|
||||
#define IEnumIDList_DeleteList(p) ICOM_CALL(DeleteList,p)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -82,6 +82,7 @@ typedef enum tagSHCONTF
|
|||
#define SFGAO_SHARE 0x00020000L /* shared */
|
||||
#define SFGAO_READONLY 0x00040000L /* read-only */
|
||||
#define SFGAO_GHOSTED 0x00080000L /* ghosted icon */
|
||||
#define SFGAO_HIDDEN 0x00080000L /* hidden object */
|
||||
#define SFGAO_DISPLAYATTRMASK 0x000F0000L
|
||||
#define SFGAO_FILESYSANCESTOR 0x10000000L /* It contains file system folder */
|
||||
#define SFGAO_FOLDER 0x20000000L /* It's a folder. */
|
||||
|
@ -90,6 +91,9 @@ typedef enum tagSHCONTF
|
|||
#define SFGAO_CONTENTSMASK 0x80000000L
|
||||
#define SFGAO_VALIDATE 0x01000000L /* invalidate cached information */
|
||||
#define SFGAO_REMOVABLE 0x02000000L /* is this removeable media? */
|
||||
#define SFGAO_BROWSABLE 0x08000000L /* is in-place browsable */
|
||||
#define SFGAO_NONENUMERATED 0x00100000L /* is a non-enumerated object */
|
||||
#define SFGAO_NEWCONTENT 0x00200000L /* should show bold in explorer tree */
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
|
@ -182,6 +186,11 @@ ICOM_DEFINE(IShellFolder,IUnknown)
|
|||
/*****************************************************************************
|
||||
* IPersistFolder interface
|
||||
*/
|
||||
|
||||
DEFINE_GUID (CLSID_SFMyComp,0x20D04FE0,0x3AEA,0x1069,0xA2,0xD8,0x08,0x00,0x2B,0x30,0x30,0x9D);
|
||||
DEFINE_GUID (CLSID_SFINet, 0x871C5380,0x42A0,0x1069,0xA2,0xEA,0x08,0x00,0x2B,0x30,0x30,0x9D);
|
||||
DEFINE_GUID (CLSID_SFFile, 0xF3364BA0,0x65B9,0x11CE,0xA9,0xBA,0x00,0xAA,0x00,0x4A,0xE8,0x37);
|
||||
|
||||
#define ICOM_INTERFACE IPersistFolder
|
||||
#define IPersistFolder_METHODS \
|
||||
ICOM_METHOD1( HRESULT, Initialize, LPCITEMIDLIST, pidl)
|
||||
|
|
|
@ -75,7 +75,7 @@ init Shell32LibMain
|
|||
67 stdcall Shell_MergeMenus (long long long long long long) Shell_MergeMenus
|
||||
68 stdcall SHGetSettings(ptr long long) SHGetSettings
|
||||
69 stub SHGetNetResource
|
||||
70 stub SHCreateDefClassObject
|
||||
70 stdcall SHCreateDefClassObject(long long long long long)SHCreateDefClassObject
|
||||
71 stdcall Shell_GetImageList(ptr ptr) Shell_GetImageList
|
||||
72 stdcall Shell_GetCachedImageIndex(ptr ptr long) Shell_GetCachedImageIndexA # ASCII!!!
|
||||
73 stub SHShellFolderView_Message
|
||||
|
@ -83,7 +83,7 @@ init Shell32LibMain
|
|||
75 stdcall PathYetAnotherMakeUniqueName(ptr ptr) PathYetAnotherMakeUniqueNameA
|
||||
76 stub DragQueryInfo
|
||||
77 stdcall SHMapPIDLToSystemImageListIndex(long long long) SHMapPIDLToSystemImageListIndex
|
||||
78 stdcall OleStrToStrN(str long wstr long) OleStrToStrN
|
||||
78 stdcall OleStrToStrN(str long wstr long) OleStrToStrNAW
|
||||
79 stdcall StrToOleStrN(wstr long str long) StrToOleStrNAW
|
||||
80 stdcall DragFinish(long) DragFinish
|
||||
81 stdcall DragQueryFile(long long ptr long) DragQueryFileA
|
||||
|
@ -152,7 +152,7 @@ init Shell32LibMain
|
|||
144 stdcall FileMenu_GetItemExtent (long long) FileMenu_GetItemExtent
|
||||
145 stdcall PathFindOnPath (ptr ptr) PathFindOnPathAW
|
||||
146 stdcall RLBuildListOfPaths()RLBuildListOfPaths
|
||||
147 stdcall SHCLSIDFromString(long long) SHCLSIDFromString
|
||||
147 stdcall SHCLSIDFromString(long long) SHCLSIDFromStringAW
|
||||
148 stdcall ExtractAssociatedIconA(long ptr long) ExtractAssociatedIconA # exported by name
|
||||
149 stdcall SHFind_InitMenuPopup(long long long long) SHFind_InitMenuPopup
|
||||
150 stub ExtractAssociatedIconExA # exported by name
|
||||
|
@ -180,7 +180,7 @@ init Shell32LibMain
|
|||
172 stub SHCreateLinks
|
||||
173 stdcall SHValidateUNC(long long long)SHValidateUNC
|
||||
174 stdcall SHCreateShellFolderViewEx (ptr ptr) SHCreateShellFolderViewEx
|
||||
175 stdcall SHGetSpecialFolderPath(long long long long) SHGetSpecialFolderPath
|
||||
175 stdcall SHGetSpecialFolderPath(long long long long) SHGetSpecialFolderPathAW
|
||||
176 stdcall SHSetInstanceExplorer (long) SHSetInstanceExplorer
|
||||
177 stub DAD_SetDragImageFromListView
|
||||
178 stub SHObjectProperties
|
||||
|
|
Loading…
Reference in New Issue