diff options
Diffstat (limited to 'setup_native/source/win32/customactions/indexingfilter/restartindexingservice.cxx')
-rw-r--r-- | setup_native/source/win32/customactions/indexingfilter/restartindexingservice.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/setup_native/source/win32/customactions/indexingfilter/restartindexingservice.cxx b/setup_native/source/win32/customactions/indexingfilter/restartindexingservice.cxx index d6bc4cb38f27..fcae22f1cbd8 100644 --- a/setup_native/source/win32/customactions/indexingfilter/restartindexingservice.cxx +++ b/setup_native/source/win32/customactions/indexingfilter/restartindexingservice.cxx @@ -47,12 +47,12 @@ typedef SC_HANDLE (__stdcall * OpenService_t)(SC_HANDLE, LPCSTR, DWORD); typedef BOOL (__stdcall * QueryServiceStatus_t)(SC_HANDLE, LPSERVICE_STATUS); typedef BOOL (__stdcall * StartService_t)(SC_HANDLE, DWORD, LPCSTR*); -CloseServiceHandle_t CloseServiceHandle_ = NULL; -ControlService_t ControlService_ = NULL; -OpenSCManager_t OpenSCManager_ = NULL; -OpenService_t OpenService_ = NULL; -QueryServiceStatus_t QueryServiceStatus_ = NULL; -StartService_t StartService_ = NULL; +CloseServiceHandle_t CloseServiceHandle_ = nullptr; +ControlService_t ControlService_ = nullptr; +OpenSCManager_t OpenSCManager_ = nullptr; +OpenService_t OpenService_ = nullptr; +QueryServiceStatus_t QueryServiceStatus_ = nullptr; +StartService_t StartService_ = nullptr; const char * const INDEXING_SERVICE_NAME = "cisvc"; @@ -104,7 +104,7 @@ bool StopIndexingService(SC_HANDLE hService) void StartIndexingService(SC_HANDLE hService) { - if (StartService_(hService, 0, NULL)) + if (StartService_(hService, 0, nullptr)) { SERVICE_STATUS status; @@ -171,11 +171,11 @@ extern "C" UINT __stdcall RestartIndexingService(MSIHANDLE) return ERROR_SUCCESS; SC_HANDLE hSCManager = OpenSCManager_( - NULL, // local machine - NULL, // ServicesActive database + nullptr, // local machine + nullptr, // ServicesActive database SC_MANAGER_ALL_ACCESS); - if (hSCManager != NULL) + if (hSCManager != nullptr) { SC_HANDLE hIndexingService = OpenService_( hSCManager, INDEXING_SERVICE_NAME, SERVICE_QUERY_STATUS | SERVICE_START | SERVICE_STOP); |