* improve error checking (by hpoussin)

* use correct CLSID -> now auto-start apps from %ALLUSERSPROFILE% can be started too

svn path=/trunk/; revision=23753
This commit is contained in:
Johannes Anderwald 2006-08-27 20:01:14 +00:00
parent fbfe8c9245
commit a5d8d20855

View file

@ -171,7 +171,7 @@ StartAutoApplications(int clsid)
hResult = SHGetFolderPathW(NULL, clsid, NULL, SHGFP_TYPE_CURRENT, szPath);
len = wcslen(szPath);
if (hResult == E_FAIL || hResult == E_INVALIDARG || len == 0)
if (!SUCCEEDED(hResult) || len == 0)
{
return;
}
@ -230,7 +230,7 @@ void StartShell(void)
&pi))
{
StartAutoApplications(CSIDL_STARTUP);
StartAutoApplications(CSIDL_ALTSTARTUP);
StartAutoApplications(CSIDL_COMMON_STARTUP);
WaitForSingleObject(pi.hProcess, INFINITE);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);