shell32: Constify some variables
Andrew Talbot
andrew.talbot at talbotville.com
Thu Sep 13 03:42:50 CDT 2007
Changelog:
shell32: Constify some variables.
diff -urN a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c
--- a/dlls/shell32/shelllink.c 2007-06-29 14:17:08.000000000 +0100
+++ b/dlls/shell32/shelllink.c 2007-09-12 21:54:19.000000000 +0100
@@ -198,7 +198,7 @@
return (IShellLinkImpl *)((char*)iface - FIELD_OFFSET(IShellLinkImpl, lpvtblObjectWithSite));
}
-static HRESULT ShellLink_UpdatePath(LPWSTR sPathRel, LPCWSTR path, LPCWSTR sWorkDir, LPWSTR* psPath);
+static HRESULT ShellLink_UpdatePath(LPCWSTR sPathRel, LPCWSTR path, LPCWSTR sWorkDir, LPWSTR* psPath);
/* strdup on the process heap */
static inline LPWSTR HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str)
@@ -656,7 +656,7 @@
return TRUE;
}
-static LPWSTR Stream_LoadPath( LPSTR p, DWORD maxlen )
+static LPWSTR Stream_LoadPath( LPCSTR p, DWORD maxlen )
{
int len = 0, wlen;
LPWSTR path;
@@ -1216,7 +1216,7 @@
* ShellLink_UpdatePath
* update absolute path in sPath using relative path in sPathRel
*/
-static HRESULT ShellLink_UpdatePath(LPWSTR sPathRel, LPCWSTR path, LPCWSTR sWorkDir, LPWSTR* psPath)
+static HRESULT ShellLink_UpdatePath(LPCWSTR sPathRel, LPCWSTR path, LPCWSTR sWorkDir, LPWSTR* psPath)
{
if (!path || !psPath)
return E_INVALIDARG;
@@ -1510,7 +1510,8 @@
return NOERROR;
}
-static HRESULT SHELL_PidlGeticonLocationA(IShellFolder* psf, LPITEMIDLIST pidl, LPSTR pszIconPath, int cchIconPath, int* piIcon)
+static HRESULT SHELL_PidlGeticonLocationA(IShellFolder* psf, LPCITEMIDLIST pidl,
+ LPSTR pszIconPath, int cchIconPath, int* piIcon)
{
LPCITEMIDLIST pidlLast;
@@ -1888,7 +1889,8 @@
return S_OK;
}
-static HRESULT SHELL_PidlGeticonLocationW(IShellFolder* psf, LPITEMIDLIST pidl, LPWSTR pszIconPath, int cchIconPath, int* piIcon)
+static HRESULT SHELL_PidlGeticonLocationW(IShellFolder* psf, LPCITEMIDLIST pidl,
+ LPWSTR pszIconPath, int cchIconPath, int* piIcon)
{
LPCITEMIDLIST pidlLast;
@@ -2123,7 +2125,7 @@
return S_OK;
}
-static BOOL ShellLink_GetVolumeInfo(LPWSTR path, volume_info *volume)
+static BOOL ShellLink_GetVolumeInfo(LPCWSTR path, volume_info *volume)
{
const int label_sz = sizeof volume->label/sizeof volume->label[0];
WCHAR drive[4] = { path[0], ':', '\\', 0 };
diff -urN a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c
--- a/dlls/shell32/shellole.c 2007-07-06 19:00:20.000000000 +0100
+++ b/dlls/shell32/shellole.c 2007-09-12 21:35:07.000000000 +0100
@@ -284,7 +284,7 @@
TRACE("(%p(%s) %p)\n", clsid, debugstr_w(clsid), id);
return CLSIDFromString((LPWSTR)clsid, id);
}
-DWORD WINAPI SHCLSIDFromStringAW (LPVOID clsid, CLSID *id)
+DWORD WINAPI SHCLSIDFromStringAW (LPCVOID clsid, CLSID *id)
{
if (SHELL_OsIsUnicode())
return SHCLSIDFromStringW (clsid, id);
diff -urN a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c
--- a/dlls/shell32/shellord.c 2007-09-10 20:13:03.000000000 +0100
+++ b/dlls/shell32/shellord.c 2007-09-12 21:34:58.000000000 +0100
@@ -609,7 +609,7 @@
* RETURNS
* position within MRU list that data was added.
*/
-static INT SHADD_create_add_mru_data(HANDLE mruhandle, LPSTR doc_name, LPSTR new_lnk_name,
+static INT SHADD_create_add_mru_data(HANDLE mruhandle, LPCSTR doc_name, LPCSTR new_lnk_name,
LPSTR buffer, INT *len)
{
LPSTR ptr;
More information about the wine-patches
mailing list