From c289a338b33fd3141d09f5bc93595254878579dd Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Thu, 13 Sep 2007 09:42:50 +0100 Subject: [PATCH] shell32: Constify some variables. --- dlls/shell32/shelllink.c | 14 ++++++++------ dlls/shell32/shellole.c | 2 +- dlls/shell32/shellord.c | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c index 62fc3e5dfeb..b6f4b02729d 100644 --- a/dlls/shell32/shelllink.c +++ b/dlls/shell32/shelllink.c @@ -198,7 +198,7 @@ static inline IShellLinkImpl *impl_from_IObjectWithSite( IObjectWithSite *iface 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 @@ static BOOL Stream_LoadVolume( LOCAL_VOLUME_INFO *vol, volume_info *volume ) 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 @@ static BOOL SHELL_ExistsFileW(LPCWSTR path) * 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 @@ static HRESULT WINAPI IShellLinkA_fnSetShowCmd(IShellLinkA * iface, INT iShowCmd 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 @@ static HRESULT WINAPI IShellLinkW_fnSetShowCmd(IShellLinkW * iface, INT iShowCmd 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 @@ static HRESULT ShellLink_SetAdvertiseInfo(IShellLinkImpl *This, LPCWSTR str) 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 --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c index f4853b542c1..21ae519cf84 100644 --- a/dlls/shell32/shellole.c +++ b/dlls/shell32/shellole.c @@ -284,7 +284,7 @@ DWORD WINAPI SHCLSIDFromStringW (LPCWSTR clsid, CLSID *id) 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 --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c index 98e8e571fb0..52c2934c803 100644 --- a/dlls/shell32/shellord.c +++ b/dlls/shell32/shellord.c @@ -609,7 +609,7 @@ static INT CALLBACK SHADD_compare_mru(LPCVOID data1, LPCVOID data2, DWORD cbData * 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;