+int set_service_description(const TCHAR *service_name, SC_HANDLE service_handle, TCHAR *buffer) {\r
+ SERVICE_DESCRIPTION description;\r
+ ZeroMemory(&description, sizeof(description));\r
+ /*\r
+ lpDescription must be NULL if we aren't changing, the new description\r
+ or "".\r
+ */\r
+ if (buffer && buffer[0]) description.lpDescription = buffer;\r
+ else description.lpDescription = _T("");\r
+\r
+ if (ChangeServiceConfig2(service_handle, SERVICE_CONFIG_DESCRIPTION, &description)) return 0;\r
+\r
+ log_event(EVENTLOG_ERROR_TYPE, NSSM_EVENT_SERVICE_CONFIG_DESCRIPTION_FAILED, service_name, error_string(GetLastError()), 0);\r
+ return 1;\r
+}\r
+\r