comdlg32: Store client GUID with SetClientGuid().
This commit is contained in:
parent
ed673ff947
commit
f92caf5ba7
|
@ -125,6 +125,8 @@ typedef struct FileDialogImpl {
|
|||
HWND cctrls_hwnd;
|
||||
struct list cctrls;
|
||||
UINT_PTR cctrl_next_dlgid;
|
||||
|
||||
GUID client_guid;
|
||||
} FileDialogImpl;
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -2032,8 +2034,9 @@ static HRESULT WINAPI IFileDialog2_fnClose(IFileDialog2 *iface, HRESULT hr)
|
|||
static HRESULT WINAPI IFileDialog2_fnSetClientGuid(IFileDialog2 *iface, REFGUID guid)
|
||||
{
|
||||
FileDialogImpl *This = impl_from_IFileDialog2(iface);
|
||||
FIXME("stub - %p (%s)\n", This, debugstr_guid(guid));
|
||||
return E_NOTIMPL;
|
||||
TRACE("%p (%s)\n", This, debugstr_guid(guid));
|
||||
This->client_guid = *guid;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IFileDialog2_fnClearClientData(IFileDialog2 *iface)
|
||||
|
@ -3627,6 +3630,8 @@ static HRESULT FileDialog_constructor(IUnknown *pUnkOuter, REFIID riid, void **p
|
|||
fdimpl->default_ext = NULL;
|
||||
fdimpl->custom_cancelbutton = fdimpl->custom_filenamelabel = NULL;
|
||||
|
||||
fdimpl->client_guid = GUID_NULL;
|
||||
|
||||
/* FIXME: The default folder setting should be restored for the
|
||||
* application if it was previously set. */
|
||||
SHGetDesktopFolder(&psf);
|
||||
|
|
|
@ -1392,6 +1392,7 @@ static void test_customize(void)
|
|||
if(FAILED(hr))
|
||||
{
|
||||
skip("Skipping IFileDialogCustomize tests.\n");
|
||||
IFileDialog_Release(pfod);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1897,6 +1898,30 @@ static void test_customize(void)
|
|||
ok(!ref, "Refcount not zero (%d).\n", ref);
|
||||
}
|
||||
|
||||
static void test_persistent_state(void)
|
||||
{
|
||||
IFileDialog *fd;
|
||||
HRESULT hr;
|
||||
|
||||
hr = CoCreateInstance(&CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IFileDialog, (void**)&fd);
|
||||
ok(hr == S_OK, "got 0x%08x.\n", hr);
|
||||
|
||||
if (0)
|
||||
{
|
||||
/* crashes at least on Win8 */
|
||||
hr = IFileDialog_SetClientGuid(fd, NULL);
|
||||
}
|
||||
|
||||
hr = IFileDialog_SetClientGuid(fd, &IID_IUnknown);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
hr = IFileDialog_SetClientGuid(fd, &IID_NULL);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
IFileDialog_Release(fd);
|
||||
}
|
||||
|
||||
START_TEST(itemdlg)
|
||||
{
|
||||
OleInitialize(NULL);
|
||||
|
@ -1908,6 +1933,7 @@ START_TEST(itemdlg)
|
|||
test_advise();
|
||||
test_filename();
|
||||
test_customize();
|
||||
test_persistent_state();
|
||||
}
|
||||
else
|
||||
skip("Skipping all Item Dialog tests.\n");
|
||||
|
|
Loading…
Reference in New Issue