mirror of
https://github.com/reactos/reactos.git
synced 2024-09-10 04:42:00 +00:00
sync shell32 shelllink to wine 1.1.23
svn path=/trunk/; revision=41313
This commit is contained in:
parent
b95b67f490
commit
1163e01722
|
@ -575,20 +575,20 @@ static HRESULT Stream_LoadString( IStream* stm, BOOL unicode, LPWSTR *pstr )
|
|||
/* convert to unicode if necessary */
|
||||
if( !unicode )
|
||||
{
|
||||
count = MultiByteToWideChar( CP_ACP, 0, (LPSTR) temp, len, NULL, 0 );
|
||||
count = MultiByteToWideChar( CP_ACP, 0, temp, len, NULL, 0 );
|
||||
str = HeapAlloc( GetProcessHeap(), 0, (count+1)*sizeof (WCHAR) );
|
||||
if( !str )
|
||||
{
|
||||
HeapFree( GetProcessHeap(), 0, temp );
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
MultiByteToWideChar( CP_ACP, 0, (LPSTR) temp, len, str, count );
|
||||
MultiByteToWideChar( CP_ACP, 0, temp, len, str, count );
|
||||
HeapFree( GetProcessHeap(), 0, temp );
|
||||
}
|
||||
else
|
||||
{
|
||||
count /= 2;
|
||||
str = (LPWSTR) temp;
|
||||
str = temp;
|
||||
}
|
||||
str[count] = 0;
|
||||
|
||||
|
@ -627,7 +627,7 @@ static HRESULT Stream_ReadChunk( IStream* stm, LPVOID *data )
|
|||
|
||||
TRACE("Read %d bytes\n",chunk->size);
|
||||
|
||||
*data = (LPVOID) chunk;
|
||||
*data = chunk;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -676,7 +676,7 @@ static HRESULT Stream_LoadLocation( IStream *stm,
|
|||
char *p = NULL;
|
||||
LOCATION_INFO *loc;
|
||||
HRESULT r;
|
||||
int n;
|
||||
DWORD n;
|
||||
|
||||
r = Stream_ReadChunk( stm, (LPVOID*) &p );
|
||||
if( FAILED(r) )
|
||||
|
@ -1073,7 +1073,7 @@ static HRESULT WINAPI IPersistStream_fnSave(
|
|||
memset(&header, 0, sizeof(header));
|
||||
header.dwSize = sizeof(header);
|
||||
header.fStartup = This->iShowCmd;
|
||||
memcpy(&header.MagicGuid, &CLSID_ShellLink, sizeof(header.MagicGuid) );
|
||||
header.MagicGuid = CLSID_ShellLink;
|
||||
|
||||
header.wHotKey = This->wHotKey;
|
||||
header.nIcon = This->iIcoNdx;
|
||||
|
@ -1308,7 +1308,7 @@ HRESULT WINAPI IShellLink_ConstructFromFile( IUnknown* pUnkOuter, REFIID riid,
|
|||
hr = E_FAIL;
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
*ppv = (IUnknown*) psl;
|
||||
*ppv = psl;
|
||||
|
||||
IPersistFile_Release(ppf);
|
||||
}
|
||||
|
@ -1539,12 +1539,12 @@ static HRESULT SHELL_PidlGeticonLocationA(IShellFolder* psf, LPCITEMIDLIST pidl,
|
|||
if (SUCCEEDED(hr)) {
|
||||
IExtractIconA* pei;
|
||||
|
||||
hr = IShellFolder_GetUIObjectOf(psf, 0, 1, (LPCITEMIDLIST*)&pidlLast, &IID_IExtractIconA, NULL, (LPVOID*)&pei);
|
||||
hr = IShellFolder_GetUIObjectOf(psf, 0, 1, &pidlLast, &IID_IExtractIconA, NULL, (LPVOID*)&pei);
|
||||
|
||||
if (SUCCEEDED(hr)) {
|
||||
hr = pei->lpVtbl->GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, NULL);
|
||||
hr = IExtractIconA_GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, NULL);
|
||||
|
||||
pei->lpVtbl->Release(pei);
|
||||
IExtractIconA_Release(pei);
|
||||
}
|
||||
|
||||
IShellFolder_Release(psf);
|
||||
|
@ -1919,12 +1919,12 @@ static HRESULT SHELL_PidlGeticonLocationW(IShellFolder* psf, LPCITEMIDLIST pidl,
|
|||
if (SUCCEEDED(hr)) {
|
||||
IExtractIconW* pei;
|
||||
|
||||
hr = IShellFolder_GetUIObjectOf(psf, 0, 1, (LPCITEMIDLIST*)&pidlLast, &IID_IExtractIconW, NULL, (LPVOID*)&pei);
|
||||
hr = IShellFolder_GetUIObjectOf(psf, 0, 1, &pidlLast, &IID_IExtractIconW, NULL, (LPVOID*)&pei);
|
||||
|
||||
if (SUCCEEDED(hr)) {
|
||||
hr = pei->lpVtbl->GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, &wFlags);
|
||||
hr = IExtractIconW_GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, &wFlags);
|
||||
|
||||
pei->lpVtbl->Release(pei);
|
||||
IExtractIconW_Release(pei);
|
||||
}
|
||||
|
||||
IShellFolder_Release(psf);
|
||||
|
|
Loading…
Reference in a new issue