Implemented UnixFolder's IPersistPropertyBag::Load method.
This commit is contained in:
parent
c1d07134b8
commit
8fca00e030
|
@ -6,7 +6,7 @@ VPATH = @srcdir@
|
||||||
MODULE = shell32.dll
|
MODULE = shell32.dll
|
||||||
IMPORTLIB = libshell32.$(IMPLIBEXT)
|
IMPORTLIB = libshell32.$(IMPLIBEXT)
|
||||||
IMPORTS = shlwapi comctl32 user32 gdi32 advapi32 kernel32 ntdll
|
IMPORTS = shlwapi comctl32 user32 gdi32 advapi32 kernel32 ntdll
|
||||||
DELAYIMPORTS = ole32
|
DELAYIMPORTS = ole32 oleaut32
|
||||||
EXTRALIBS = -luuid $(LIBUNICODE)
|
EXTRALIBS = -luuid $(LIBUNICODE)
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
|
|
|
@ -1307,8 +1307,32 @@ static HRESULT WINAPI UnixFolder_IPersistPropertyBag_InitNew(IPersistPropertyBag
|
||||||
static HRESULT WINAPI UnixFolder_IPersistPropertyBag_Load(IPersistPropertyBag *iface,
|
static HRESULT WINAPI UnixFolder_IPersistPropertyBag_Load(IPersistPropertyBag *iface,
|
||||||
IPropertyBag *pPropertyBag, IErrorLog *pErrorLog)
|
IPropertyBag *pPropertyBag, IErrorLog *pErrorLog)
|
||||||
{
|
{
|
||||||
FIXME("() stub\n");
|
UnixFolder *This = ADJUST_THIS(UnixFolder, IPersistPropertyBag, iface);
|
||||||
return E_NOTIMPL;
|
static const WCHAR wszTarget[] = { 'T','a','r','g','e','t', 0 }, wszNull[] = { 0 };
|
||||||
|
PERSIST_FOLDER_TARGET_INFO pftiTarget;
|
||||||
|
VARIANT var;
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("(iface=%p, pPropertyBag=%p, pErrorLog=%p)\n", iface, pPropertyBag, pErrorLog);
|
||||||
|
|
||||||
|
if (!pPropertyBag)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
|
/* Get 'Target' property from the property bag. */
|
||||||
|
V_VT(&var) = VT_BSTR;
|
||||||
|
hr = IPropertyBag_Read(pPropertyBag, wszTarget, &var, NULL);
|
||||||
|
if (FAILED(hr))
|
||||||
|
return E_FAIL;
|
||||||
|
lstrcpyW(pftiTarget.szTargetParsingName, V_BSTR(&var));
|
||||||
|
SysFreeString(V_BSTR(&var));
|
||||||
|
|
||||||
|
pftiTarget.pidlTargetFolder = NULL;
|
||||||
|
lstrcpyW(pftiTarget.szNetworkProvider, wszNull);
|
||||||
|
pftiTarget.dwAttributes = -1;
|
||||||
|
pftiTarget.csidl = -1;
|
||||||
|
|
||||||
|
return UnixFolder_IPersistFolder3_InitializeEx(
|
||||||
|
STATIC_CAST(IPersistFolder3, This), NULL, NULL, &pftiTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI UnixFolder_IPersistPropertyBag_Save(IPersistPropertyBag *iface,
|
static HRESULT WINAPI UnixFolder_IPersistPropertyBag_Save(IPersistPropertyBag *iface,
|
||||||
|
|
|
@ -872,7 +872,7 @@ void test_FolderShortcut(void) {
|
||||||
if (FAILED(hr)) return;
|
if (FAILED(hr)) return;
|
||||||
|
|
||||||
hr = IPersistPropertyBag_Load(pPersistPropertyBag, &InitPropertyBag, NULL);
|
hr = IPersistPropertyBag_Load(pPersistPropertyBag, &InitPropertyBag, NULL);
|
||||||
todo_wine { ok(SUCCEEDED(hr), "IPersistPropertyBag_Load failed! hr = %08lx\n", hr); }
|
ok(SUCCEEDED(hr), "IPersistPropertyBag_Load failed! hr = %08lx\n", hr);
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
IPersistPropertyBag_Release(pPersistPropertyBag);
|
IPersistPropertyBag_Release(pPersistPropertyBag);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue