Author: cwittich
Date: Sat Jun 6 21:17:11 2009
New Revision: 41313
URL:
http://svn.reactos.org/svn/reactos?rev=41313&view=rev
Log:
sync shell32 shelllink to wine 1.1.23
Modified:
trunk/reactos/dll/win32/shell32/shelllink.c
Modified: trunk/reactos/dll/win32/shell32/shelllink.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shelllin…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shelllink.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shelllink.c [iso-8859-1] Sat Jun 6 21:17:11 2009
@@ -575,20 +575,20 @@
/* 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 @@
TRACE("Read %d bytes\n",chunk->size);
- *data = (LPVOID) chunk;
+ *data = chunk;
return S_OK;
}
@@ -676,7 +676,7 @@
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 @@
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 @@
hr = E_FAIL;
if (SUCCEEDED(hr))
- *ppv = (IUnknown*) psl;
+ *ppv = psl;
IPersistFile_Release(ppf);
}
@@ -1539,12 +1539,12 @@
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);
-
- pei->lpVtbl->Release(pei);
+ hr = IExtractIconA_GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, NULL);
+
+ IExtractIconA_Release(pei);
}
IShellFolder_Release(psf);
@@ -1919,12 +1919,12 @@
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);
-
- pei->lpVtbl->Release(pei);
+ hr = IExtractIconW_GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon,
&wFlags);
+
+ IExtractIconW_Release(pei);
}
IShellFolder_Release(psf);