Use StringFromGUID2 instead of StringFromCLSID in
UNIXFS_is_rooted_at_desktop.
This commit is contained in:
parent
d13b99d5f9
commit
060bfac706
|
@ -104,23 +104,19 @@ typedef struct _UnixFolder {
|
|||
*/
|
||||
BOOL UNIXFS_is_rooted_at_desktop(void) {
|
||||
HKEY hKey;
|
||||
WCHAR *pwszCLSID_UnixDosFolder, wszRootedAtDesktop[69 + CHARS_IN_GUID] = {
|
||||
WCHAR wszRootedAtDesktop[69 + CHARS_IN_GUID] = {
|
||||
'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
|
||||
'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
|
||||
'E','x','p','l','o','r','e','r','\\','D','e','s','k','t','o','p','\\',
|
||||
'N','a','m','e','S','p','a','c','e','\\',0 };
|
||||
|
||||
if (FAILED(StringFromCLSID(&CLSID_UnixDosFolder, &pwszCLSID_UnixDosFolder)))
|
||||
return FALSE;
|
||||
|
||||
lstrcatW(wszRootedAtDesktop, pwszCLSID_UnixDosFolder);
|
||||
CoTaskMemFree(pwszCLSID_UnixDosFolder);
|
||||
|
||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, wszRootedAtDesktop, 0, KEY_READ, &hKey) != ERROR_SUCCESS)
|
||||
return FALSE;
|
||||
|
||||
RegCloseKey(hKey);
|
||||
return TRUE;
|
||||
if (StringFromGUID2(&CLSID_UnixDosFolder, wszRootedAtDesktop + 69, CHARS_IN_GUID) &&
|
||||
RegOpenKeyExW(HKEY_LOCAL_MACHINE, wszRootedAtDesktop, 0, KEY_READ, &hKey) == ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
Loading…
Reference in New Issue