[SHELL32_APITEST] SHLimitInputEdit: Fix C4509 warning (#2321)

CORE-11701
This commit is contained in:
Katayama Hirofumi MZ 2020-02-09 23:49:44 +09:00 committed by GitHub
parent 85a854f6b5
commit ed3c50f748
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -238,6 +238,24 @@ PropEnumProc(
return TRUE; return TRUE;
} }
static void
DoNullFolderTest(HWND hEdt1)
{
HRESULT hr;
_SEH2_TRY
{
hr = SHLimitInputEdit(hEdt1, NULL);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
hr = 0xDEAD;
}
_SEH2_END;
ok_int(hr, 0xDEAD);
}
static INT_PTR CALLBACK static INT_PTR CALLBACK
DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
@ -249,16 +267,7 @@ DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
HRESULT hr; HRESULT hr;
WCHAR szText[64]; WCHAR szText[64];
_SEH2_TRY DoNullFolderTest(hEdt1);
{
hr = SHLimitInputEdit(hEdt1, NULL);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
hr = 0xDEAD;
}
_SEH2_END;
ok_int(hr, 0xDEAD);
{ {
CShellFolder sf(123, FALSE); CShellFolder sf(123, FALSE);