shell32: Use _ILSimpleGetTextW instead of using _ILGetTextPointer
to be able to make use of FileStructW and avoid W->A->W roundtrips if possible.
This commit is contained in:
parent
a1b764e65f
commit
c465e11a6d
|
@ -222,12 +222,9 @@ static HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCWSTR pathRoot,
|
|||
}
|
||||
|
||||
if (pidlChild) {
|
||||
LPCSTR pszChild = _ILGetTextPointer(pidlChild);
|
||||
int len = lstrlenW(ppfti.szTargetParsingName);
|
||||
|
||||
if (pszChild)
|
||||
MultiByteToWideChar (CP_ACP, 0, pszChild, -1, ppfti.szTargetParsingName + len, MAX_PATH - len);
|
||||
else
|
||||
if (!_ILSimpleGetTextW(pidlChild, ppfti.szTargetParsingName + len, MAX_PATH - len))
|
||||
hr = E_INVALIDARG;
|
||||
}
|
||||
|
||||
|
@ -290,7 +287,9 @@ HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot,
|
|||
lstrcpynW(wszFolderPath, pathRoot, MAX_PATH);
|
||||
pwszPathTail = PathAddBackslashW(wszFolderPath);
|
||||
}
|
||||
MultiByteToWideChar(CP_ACP, 0, _ILGetTextPointer(pidlChild), -1, pwszPathTail, MAX_PATH - (int)(pwszPathTail - wszFolderPath));
|
||||
|
||||
_ILSimpleGetTextW(pidlChild,pwszPathTail,MAX_PATH - (int)(pwszPathTail - wszFolderPath));
|
||||
|
||||
if (SHELL32_GetCustomFolderAttributeFromPath (wszFolderPath,
|
||||
wszDotShellClassInfo, wszCLSID, wszCLSIDValue, CHARS_IN_GUID))
|
||||
CLSIDFromString (wszCLSIDValue, &clsidFolder);
|
||||
|
|
Loading…
Reference in New Issue