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) {
|
BOOL UNIXFS_is_rooted_at_desktop(void) {
|
||||||
HKEY hKey;
|
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','\\',
|
'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','\\',
|
'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','\\',
|
'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 };
|
'N','a','m','e','S','p','a','c','e','\\',0 };
|
||||||
|
|
||||||
if (FAILED(StringFromCLSID(&CLSID_UnixDosFolder, &pwszCLSID_UnixDosFolder)))
|
if (StringFromGUID2(&CLSID_UnixDosFolder, wszRootedAtDesktop + 69, CHARS_IN_GUID) &&
|
||||||
return FALSE;
|
RegOpenKeyExW(HKEY_LOCAL_MACHINE, wszRootedAtDesktop, 0, KEY_READ, &hKey) == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
lstrcatW(wszRootedAtDesktop, pwszCLSID_UnixDosFolder);
|
RegCloseKey(hKey);
|
||||||
CoTaskMemFree(pwszCLSID_UnixDosFolder);
|
return TRUE;
|
||||||
|
}
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, wszRootedAtDesktop, 0, KEY_READ, &hKey) != ERROR_SUCCESS)
|
return FALSE;
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
RegCloseKey(hKey);
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
|
Loading…
Reference in New Issue