On 19.03.2015 15:06, Bernhard Übelacker wrote:
@@ -2217,7 +2217,13 @@ BOOL WINAPI ChangeServiceConfig2W( SC_HANDLE hService, DWORD dwInfoLevel,
info.dwInfoLevel = dwInfoLevel; info.u.descr = lpInfo;
err = svcctl_ChangeServiceConfig2W( hService, info );
if (info.u.descr->lpDescription)
{
err = svcctl_ChangeServiceConfig2W( hService, info );
} else {
err = ERROR_SUCCESS;
}
In this case it's better to return earlier, no need to step into try..expect block if you know you won't call anything.