mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:12:59 +00:00
Don't return from inside an exception handler.
svn path=/trunk/; revision=19504
This commit is contained in:
parent
fb3dcc851d
commit
34639a5b85
1 changed files with 23 additions and 19 deletions
|
@ -113,24 +113,25 @@ MsgMemorySize(PMSGMEMORY MsgMemoryEntry, WPARAM wParam, LPARAM lParam)
|
||||||
CREATESTRUCTW *Cs;
|
CREATESTRUCTW *Cs;
|
||||||
PUNICODE_STRING WindowName;
|
PUNICODE_STRING WindowName;
|
||||||
PUNICODE_STRING ClassName;
|
PUNICODE_STRING ClassName;
|
||||||
UINT Size;
|
UINT Size = 0;
|
||||||
|
|
||||||
_SEH_TRY {
|
_SEH_TRY
|
||||||
if (MMS_SIZE_WPARAM == MsgMemoryEntry->Size)
|
|
||||||
{
|
{
|
||||||
return (UINT) wParam;
|
if (MMS_SIZE_WPARAM == MsgMemoryEntry->Size)
|
||||||
|
{
|
||||||
|
Size = (UINT)wParam;
|
||||||
}
|
}
|
||||||
else if (MMS_SIZE_WPARAMWCHAR == MsgMemoryEntry->Size)
|
else if (MMS_SIZE_WPARAMWCHAR == MsgMemoryEntry->Size)
|
||||||
{
|
{
|
||||||
return (UINT) (wParam * sizeof(WCHAR));
|
Size = (UINT) (wParam * sizeof(WCHAR));
|
||||||
}
|
}
|
||||||
else if (MMS_SIZE_LPARAMSZ == MsgMemoryEntry->Size)
|
else if (MMS_SIZE_LPARAMSZ == MsgMemoryEntry->Size)
|
||||||
{
|
{
|
||||||
return (UINT) ((wcslen((PWSTR) lParam) + 1) * sizeof(WCHAR));
|
Size = (UINT) ((wcslen((PWSTR) lParam) + 1) * sizeof(WCHAR));
|
||||||
}
|
}
|
||||||
else if (MMS_SIZE_SPECIAL == MsgMemoryEntry->Size)
|
else if (MMS_SIZE_SPECIAL == MsgMemoryEntry->Size)
|
||||||
{
|
{
|
||||||
switch(MsgMemoryEntry->Message)
|
switch(MsgMemoryEntry->Message)
|
||||||
{
|
{
|
||||||
case WM_CREATE:
|
case WM_CREATE:
|
||||||
case WM_NCCREATE:
|
case WM_NCCREATE:
|
||||||
|
@ -146,31 +147,34 @@ MsgMemorySize(PMSGMEMORY MsgMemoryEntry, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
Size += sizeof(WCHAR) + ClassName->Length + sizeof(WCHAR);
|
Size += sizeof(WCHAR) + ClassName->Length + sizeof(WCHAR);
|
||||||
}
|
}
|
||||||
return Size;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_NCCALCSIZE:
|
case WM_NCCALCSIZE:
|
||||||
return wParam ? sizeof(NCCALCSIZE_PARAMS) + sizeof(WINDOWPOS) : sizeof(RECT);
|
Size = wParam ? sizeof(NCCALCSIZE_PARAMS) + sizeof(WINDOWPOS) : sizeof(RECT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_COPYDATA:
|
case WM_COPYDATA:
|
||||||
return sizeof(COPYDATASTRUCT) + ((PCOPYDATASTRUCT)lParam)->cbData;
|
Size = sizeof(COPYDATASTRUCT) + ((PCOPYDATASTRUCT)lParam)->cbData;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(FALSE);
|
assert(FALSE);
|
||||||
return 0;
|
Size = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return MsgMemoryEntry->Size;
|
Size = MsgMemoryEntry->Size;
|
||||||
}
|
}
|
||||||
} _SEH_HANDLE {
|
}
|
||||||
|
_SEH_HANDLE
|
||||||
|
{
|
||||||
DPRINT1("Exception caught in MsgMemorySize()! Status: 0x%x\n", _SEH_GetExceptionCode());
|
DPRINT1("Exception caught in MsgMemorySize()! Status: 0x%x\n", _SEH_GetExceptionCode());
|
||||||
} _SEH_END;
|
Size = 0;
|
||||||
return 0;
|
}
|
||||||
|
_SEH_END;
|
||||||
|
return Size;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FASTCALL NTSTATUS
|
static FASTCALL NTSTATUS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue