summaryrefslogtreecommitdiff
path: root/ui/IFileDialog_Vista/ifile_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ui/IFileDialog_Vista/ifile_dialog.cpp')
-rw-r--r--ui/IFileDialog_Vista/ifile_dialog.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/ui/IFileDialog_Vista/ifile_dialog.cpp b/ui/IFileDialog_Vista/ifile_dialog.cpp
index 565dfa1a..19dcbc5d 100644
--- a/ui/IFileDialog_Vista/ifile_dialog.cpp
+++ b/ui/IFileDialog_Vista/ifile_dialog.cpp
@@ -23,38 +23,38 @@ bool showFolderPickerImpl(HWND ownerWindow, //throw ComError; return "false" if
std::wstring& selectedFolder)
{
ComPtr<IFileDialog> fileDlg;
- ZEN_CHECK_COM(::CoCreateInstance(CLSID_FileOpenDialog, //throw ComError
+ ZEN_COM_CHECK(::CoCreateInstance(CLSID_FileOpenDialog, //throw ComError
nullptr,
CLSCTX_ALL,
IID_PPV_ARGS(fileDlg.init())));
if (persistenceGuid)
- ZEN_CHECK_COM(fileDlg->SetClientGuid(*persistenceGuid));
+ ZEN_COM_CHECK(fileDlg->SetClientGuid(*persistenceGuid));
FILEOPENDIALOGOPTIONS dlgOptions = 0;
- ZEN_CHECK_COM(fileDlg->GetOptions(&dlgOptions)); //throw ComError
- ZEN_CHECK_COM(fileDlg->SetOptions(dlgOptions | FOS_PICKFOLDERS | FOS_NOVALIDATE | FOS_FORCEFILESYSTEM));
+ ZEN_COM_CHECK(fileDlg->GetOptions(&dlgOptions)); //throw ComError
+ ZEN_COM_CHECK(fileDlg->SetOptions(dlgOptions | FOS_PICKFOLDERS | FOS_NOVALIDATE | FOS_FORCEFILESYSTEM));
if (defaultFolder) //show last selection instead of top level if no default available
{
ComPtr<IShellItem> folderItem;
- ZEN_CHECK_COM(::SHCreateItemFromParsingName(defaultFolder,
+ ZEN_COM_CHECK(::SHCreateItemFromParsingName(defaultFolder,
nullptr,
IID_PPV_ARGS(folderItem.init())));
- ZEN_CHECK_COM(fileDlg->SetFolder(folderItem.get()));
+ ZEN_COM_CHECK(fileDlg->SetFolder(folderItem.get()));
}
try
{
- ZEN_CHECK_COM(fileDlg->Show(ownerWindow)); //may fail with: HRESULT_FROM_WIN32(ERROR_CANCELLED)
+ ZEN_COM_CHECK(fileDlg->Show(ownerWindow)); //may fail with: HRESULT_FROM_WIN32(ERROR_CANCELLED)
}
catch (const ComError&) { return false; }
ComPtr<IShellItem> folderItem;
- ZEN_CHECK_COM(fileDlg->GetResult(folderItem.init()));
+ ZEN_COM_CHECK(fileDlg->GetResult(folderItem.init()));
LPWSTR folderPath = nullptr;
- ZEN_CHECK_COM(folderItem->GetDisplayName(SIGDN_FILESYSPATH, &folderPath));
+ ZEN_COM_CHECK(folderItem->GetDisplayName(SIGDN_FILESYSPATH, &folderPath));
ZEN_ON_SCOPE_EXIT(::CoTaskMemFree(folderPath));
selectedFolder = folderPath;
bgstack15