set proper lasterror code in RegisterWindowMessage()

svn path=/trunk/; revision=9443
This commit is contained in:
Thomas Bluemel 2004-05-19 19:16:47 +00:00
parent 23c42995a1
commit 46d6fe4163

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: window.c,v 1.234 2004/05/19 19:09:20 weiden Exp $ /* $Id: window.c,v 1.235 2004/05/19 19:16:47 weiden Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -3576,6 +3576,12 @@ NtUserRegisterWindowMessage(PUNICODE_STRING MessageNameUnsafe)
NTSTATUS Status; NTSTATUS Status;
UINT Ret; UINT Ret;
if(MessageNameUnsafe == NULL)
{
SetLastWin32Error(ERROR_INVALID_PARAMETER);
return 0;
}
Status = IntSafeCopyUnicodeStringTerminateNULL(&SafeMessageName, MessageNameUnsafe); Status = IntSafeCopyUnicodeStringTerminateNULL(&SafeMessageName, MessageNameUnsafe);
if(!NT_SUCCESS(Status)) if(!NT_SUCCESS(Status))
{ {