merged back commit shell32 WINE patches

svn path=/trunk/; revision=7818
This commit is contained in:
Martin Fuchs 2004-01-21 23:01:35 +00:00
parent 0f8bd6db55
commit 7bd7074cb3
3 changed files with 59 additions and 53 deletions

View file

@ -29,6 +29,9 @@
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "winreg.h" #include "winreg.h"
@ -695,22 +698,26 @@ LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
*/ */
HRESULT WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPCITEMIDLIST pidlSimple, LPITEMIDLIST* pidlReal) HRESULT WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPCITEMIDLIST pidlSimple, LPITEMIDLIST* pidlReal)
{ {
UINT cfShellIDList = RegisterClipboardFormatA(CFSTR_SHELLIDLIST);
STGMEDIUM medium = {0, {0}, 0};
FORMATETC fmt = {cfShellIDList, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};
IDataObject* pDataObj; IDataObject* pDataObj;
HRESULT hr = IShellFolder_GetUIObjectOf(lpsf, 0, 1, &pidlSimple, &IID_IDataObject, 0, (LPVOID*)&pDataObj); HRESULT hr = IShellFolder_GetUIObjectOf(lpsf, 0, 1, &pidlSimple, &IID_IDataObject, 0, (LPVOID*)&pDataObj);
if (SUCCEEDED(hr)) { if (SUCCEEDED(hr)) {
STGMEDIUM medium;
FORMATETC fmt;
fmt.cfFormat = RegisterClipboardFormatA(CFSTR_SHELLIDLIST);
fmt.ptd = NULL;
fmt.dwAspect = DVASPECT_CONTENT;
fmt.lindex = -1;
fmt.tymed = TYMED_HGLOBAL;
hr = IDataObject_GetData(pDataObj, &fmt, &medium); hr = IDataObject_GetData(pDataObj, &fmt, &medium);
IDataObject_Release(pDataObj); IDataObject_Release(pDataObj);
if (SUCCEEDED(hr)) { if (SUCCEEDED(hr)) {
/*assert(pida->cidl==1);*/ /*assert(pida->cidl==1);*/
LPIDA pida = (LPIDA)GlobalLock(medium.hGlobal); LPIDA pida = (LPIDA)GlobalLock(medium.u.hGlobal);
LPCITEMIDLIST pidl_folder = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[0]); LPCITEMIDLIST pidl_folder = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[0]);
LPCITEMIDLIST pidl_child = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[1]); LPCITEMIDLIST pidl_child = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[1]);
@ -720,8 +727,8 @@ HRESULT WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPCITEMIDLIST pidlSimple, LPITEM
if (!*pidlReal) if (!*pidlReal)
hr = E_OUTOFMEMORY; hr = E_OUTOFMEMORY;
GlobalUnlock(medium.hGlobal); GlobalUnlock(medium.u.hGlobal);
GlobalFree(medium.hGlobal); GlobalFree(medium.u.hGlobal);
} }
} }
@ -1231,6 +1238,7 @@ HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int n
return E_INVALIDARG; return E_INVALIDARG;
} }
/************************************************************************* /*************************************************************************
* SHGetDataFromIDListW [SHELL32.248] * SHGetDataFromIDListW [SHELL32.248]
* *

View file

@ -247,10 +247,10 @@ BOOL WINAPI ShellExecuteExW32(LPSHELLEXECUTEINFOW psei, SHELL_ExecuteW32 execfun
UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation, UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation,
LPWSTR lpResult, LPWSTR key, void **env, LPITEMIDLIST pidl, LPCWSTR args); LPWSTR lpResult, LPWSTR key, void **env, LPITEMIDLIST pidl, LPCWSTR args);
extern WCHAR swShell32Name[MAX_PATH];
extern char sShell32Name[MAX_PATH];
int WINAPI RestartDialog(HWND hwndOwner, LPCSTR lpstrReason, UINT uFlags); int WINAPI RestartDialog(HWND hwndOwner, LPCSTR lpstrReason, UINT uFlags);
int WINAPI RestartDialogEx(HWND hwndOwner, LPCWSTR lpwstrReason, UINT uFlags, UINT uReason); int WINAPI RestartDialogEx(HWND hwndOwner, LPCWSTR lpwstrReason, UINT uFlags, UINT uReason);
extern WCHAR swShell32Name[MAX_PATH];
extern char sShell32Name[MAX_PATH];
#endif #endif

View file

@ -67,8 +67,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
#define SCF_WORKDIR 0x10 #define SCF_WORKDIR 0x10
#define SCF_ARGS 0x20 #define SCF_ARGS 0x20
#define SCF_CUSTOMICON 0x40 #define SCF_CUSTOMICON 0x40
//#define SCF_UNC 0x80
//#define SCF_UNICODE 0x1000
#define SCF_UNICODE 0x80 #define SCF_UNICODE 0x80
#include "pshpack1.h" #include "pshpack1.h"