diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c
index 7ac47722466884ee3f08fd1d0f56aabe981714b3..56f339af0d14482e20a13e86fdf7cd45aa6be876 100644
--- a/dlls/shell32/shell32_main.c
+++ b/dlls/shell32/shell32_main.c
@@ -33,13 +33,14 @@ DEFAULT_DEBUG_CHANNEL(shell);
 /*************************************************************************
  * CommandLineToArgvW			[SHELL32.@]
  */
-LPWSTR* WINAPI CommandLineToArgvW(LPWSTR cmdline,LPDWORD numargs)
+LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int* numargs)
 {	LPWSTR  *argv,s,t;
+	LPWSTR  cmdline;
 	int	i;
 	TRACE("\n");
 
 	/* to get writeable copy */
-	cmdline = HEAP_strdupW( GetProcessHeap(), 0, cmdline);
+	cmdline = HEAP_strdupW( GetProcessHeap(), 0, lpCmdline);
 	s=cmdline;i=0;
 	while (*s)
 	{ /* space */
diff --git a/include/shellapi.h b/include/shellapi.h
index 03b1b2c7fa5c3cdde70f0ba22e1c568fe92d019d..f590906dd8f158343a66f0853fe46675ce8d4869 100644
--- a/include/shellapi.h
+++ b/include/shellapi.h
@@ -245,6 +245,7 @@ BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW lpData);
  * Misc
  */
 
+LPWSTR*     WINAPI CommandLineToArgvW(LPCWSTR,int*);
 HICON       WINAPI ExtractIconA(HINSTANCE,LPCSTR,UINT);
 HICON       WINAPI ExtractIconW(HINSTANCE,LPCWSTR,UINT);
 #define     ExtractIcon WINELIB_NAME_AW(ExtractIcon)