summaryrefslogtreecommitdiff
path: root/lib/IFileOperation
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:19:14 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:19:14 +0200
commit01eb8253196672c969a39587e90b49321a182428 (patch)
tree4a3b71d7913de519744466c9227fda6461c4f0b5 /lib/IFileOperation
parent5.0 (diff)
downloadFreeFileSync-01eb8253196672c969a39587e90b49321a182428.tar.gz
FreeFileSync-01eb8253196672c969a39587e90b49321a182428.tar.bz2
FreeFileSync-01eb8253196672c969a39587e90b49321a182428.zip
5.1
Diffstat (limited to 'lib/IFileOperation')
-rw-r--r--lib/IFileOperation/file_op.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/IFileOperation/file_op.cpp b/lib/IFileOperation/file_op.cpp
index 8024ab91..3d7717f4 100644
--- a/lib/IFileOperation/file_op.cpp
+++ b/lib/IFileOperation/file_op.cpp
@@ -24,7 +24,7 @@ void moveToRecycleBin(const wchar_t* fileNames[], //throw ComError
{
ComPtr<IFileOperation> fileOp;
ZEN_CHECK_COM(::CoCreateInstance(CLSID_FileOperation, //throw ComError
- NULL,
+ nullptr,
CLSCTX_ALL,
IID_PPV_ARGS(fileOp.init())));
@@ -45,7 +45,7 @@ void moveToRecycleBin(const wchar_t* fileNames[], //throw ComError
//create file/folder item object
ComPtr<IShellItem> psiFile;
HRESULT hr = ::SHCreateItemFromParsingName(fileNames[i],
- NULL,
+ nullptr,
IID_PPV_ARGS(psiFile.init()));
if (FAILED(hr))
{
@@ -55,7 +55,7 @@ void moveToRecycleBin(const wchar_t* fileNames[], //throw ComError
throw ComError(std::wstring(L"Error calling \"SHCreateItemFromParsingName\" for file:\n") + L"\"" + fileNames[i] + L"\".", hr);
}
- ZEN_CHECK_COM(fileOp->DeleteItem(psiFile.get(), NULL));
+ ZEN_CHECK_COM(fileOp->DeleteItem(psiFile.get(), nullptr));
++operationCount;
}
@@ -80,7 +80,7 @@ void copyFile(const wchar_t* sourceFile, //throw ComError
{
ComPtr<IFileOperation> fileOp;
ZEN_CHECK_COM(::CoCreateInstance(CLSID_FileOperation, //throw ComError
- NULL,
+ nullptr,
CLSCTX_ALL,
IID_PPV_ARGS(fileOp.init())));
@@ -96,7 +96,7 @@ void copyFile(const wchar_t* sourceFile, //throw ComError
ComPtr<IShellItem> psiSourceFile;
{
HRESULT hr = ::SHCreateItemFromParsingName(sourceFile,
- NULL,
+ nullptr,
IID_PPV_ARGS(psiSourceFile.init()));
if (FAILED(hr))
throw ComError(std::wstring(L"Error calling \"SHCreateItemFromParsingName\" for file:\n") + L"\"" + sourceFile + L"\".", hr);
@@ -113,14 +113,14 @@ void copyFile(const wchar_t* sourceFile, //throw ComError
ComPtr<IShellItem> psiTargetFolder;
{
HRESULT hr = ::SHCreateItemFromParsingName(targetFolder.c_str(),
- NULL,
+ nullptr,
IID_PPV_ARGS(psiTargetFolder.init()));
if (FAILED(hr))
throw ComError(std::wstring(L"Error calling \"SHCreateItemFromParsingName\" for folder:\n") + L"\"" + targetFolder + L"\".", hr);
}
//schedule file copy operation
- ZEN_CHECK_COM(fileOp->CopyItem(psiSourceFile.get(), psiTargetFolder.get(), targetFileNameShort.c_str(), NULL));
+ ZEN_CHECK_COM(fileOp->CopyItem(psiSourceFile.get(), psiTargetFolder.get(), targetFileNameShort.c_str(), nullptr));
//perform actual operations
ZEN_CHECK_COM(fileOp->PerformOperations());
bgstack15