summaryrefslogtreecommitdiff
path: root/zen/notify_removal.cpp
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 /zen/notify_removal.cpp
parent5.0 (diff)
downloadFreeFileSync-01eb8253196672c969a39587e90b49321a182428.tar.gz
FreeFileSync-01eb8253196672c969a39587e90b49321a182428.tar.bz2
FreeFileSync-01eb8253196672c969a39587e90b49321a182428.zip
5.1
Diffstat (limited to 'zen/notify_removal.cpp')
-rw-r--r--zen/notify_removal.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/zen/notify_removal.cpp b/zen/notify_removal.cpp
index 661822cb..d8657ea2 100644
--- a/zen/notify_removal.cpp
+++ b/zen/notify_removal.cpp
@@ -91,10 +91,10 @@ LRESULT CALLBACK topWndProc(HWND hwnd, //handle to window
MessageProvider::MessageProvider() :
- process(::GetModuleHandle(NULL)), //get program's module handle
- windowHandle(NULL)
+ process(::GetModuleHandle(nullptr)), //get program's module handle
+ windowHandle(nullptr)
{
- if (process == NULL)
+ if (!process)
throw zen::FileError(std::wstring(L"Could not start monitoring window notifications:") + L"\n\n" + getLastErrorFormatted() + L" (GetModuleHandle)");
//register the main window class
@@ -110,17 +110,17 @@ MessageProvider::MessageProvider() :
//create dummy-window
windowHandle = ::CreateWindow(WINDOW_NAME, //LPCTSTR lpClassName OR ATOM in low-order word!
- NULL, //LPCTSTR lpWindowName,
+ nullptr, //LPCTSTR lpWindowName,
0, //DWORD dwStyle,
0, //int x,
0, //int y,
0, //int nWidth,
0, //int nHeight,
0, //note: we need a toplevel window to receive device arrival events, not a message-window (HWND_MESSAGE)!
- NULL, //HMENU hMenu,
- process, //HINSTANCE hInstance,
- NULL); //LPVOID lpParam
- if (windowHandle == NULL)
+ nullptr, //HMENU hMenu,
+ process, //HINSTANCE hInstance,
+ nullptr); //LPVOID lpParam
+ if (!windowHandle)
throw zen::FileError(std::wstring(L"Could not start monitoring window notifications:") + L"\n\n" + getLastErrorFormatted() + L" (CreateWindow)");
guardClass.dismiss();
@@ -161,7 +161,7 @@ public:
hNotification = ::RegisterDeviceNotification(MessageProvider::instance().getWnd(), //__in HANDLE hRecipient,
&filter, //__in LPVOID NotificationFilter,
DEVICE_NOTIFY_WINDOW_HANDLE); //__in DWORD Flags
- if (hNotification == NULL)
+ if (!hNotification)
{
const DWORD lastError = ::GetLastError();
if (lastError != ERROR_CALL_NOT_IMPLEMENTED && //fail on SAMBA share: this shouldn't be a showstopper!
bgstack15