mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 15:02:59 +00:00
[FLTMC] Do not ignore failures of some functions
Also reduce use of magic values. CORE-17637
This commit is contained in:
parent
46394ab80d
commit
5aafeb473f
1 changed files with 42 additions and 34 deletions
|
@ -220,7 +220,8 @@ PrintVolumeInfo(_In_ PVOID Buffer)
|
||||||
VolName[FilterVolInfo->FilterVolumeNameLength] = UNICODE_NULL;
|
VolName[FilterVolInfo->FilterVolumeNameLength] = UNICODE_NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
(void)FilterGetDosName(VolName, DosName, 16);
|
if (!SUCCEEDED(FilterGetDosName(VolName, DosName, _countof(DosName))))
|
||||||
|
DosName[0] = L'\0';
|
||||||
|
|
||||||
switch (FilterVolInfo->FileSystemType)
|
switch (FilterVolInfo->FileSystemType)
|
||||||
{
|
{
|
||||||
|
@ -271,7 +272,7 @@ ListFilters()
|
||||||
|
|
||||||
hr = FilterFindFirst(FilterAggregateStandardInformation,
|
hr = FilterFindFirst(FilterAggregateStandardInformation,
|
||||||
Buffer,
|
Buffer,
|
||||||
1024,
|
sizeof(Buffer),
|
||||||
&BytesReturned,
|
&BytesReturned,
|
||||||
&FindHandle);
|
&FindHandle);
|
||||||
if (!SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
|
@ -279,13 +280,18 @@ ListFilters()
|
||||||
IsNewStyle = FALSE;
|
IsNewStyle = FALSE;
|
||||||
hr = FilterFindFirst(FilterFullInformation,
|
hr = FilterFindFirst(FilterFullInformation,
|
||||||
Buffer,
|
Buffer,
|
||||||
1024,
|
sizeof(Buffer),
|
||||||
&BytesReturned,
|
&BytesReturned,
|
||||||
&FindHandle);
|
&FindHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SUCCEEDED(hr))
|
if (!SUCCEEDED(hr))
|
||||||
{
|
{
|
||||||
|
LoadAndPrintString(IDS_ERROR_FILTERS, hr);
|
||||||
|
PrintErrorText(hr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (IsNewStyle)
|
if (IsNewStyle)
|
||||||
{
|
{
|
||||||
LoadAndPrintString(IDS_DISPLAY_FILTERS1);
|
LoadAndPrintString(IDS_DISPLAY_FILTERS1);
|
||||||
|
@ -304,19 +310,21 @@ ListFilters()
|
||||||
hr = FilterFindNext(FindHandle,
|
hr = FilterFindNext(FindHandle,
|
||||||
IsNewStyle ? FilterAggregateStandardInformation : FilterFullInformation,
|
IsNewStyle ? FilterAggregateStandardInformation : FilterFullInformation,
|
||||||
Buffer,
|
Buffer,
|
||||||
1024,
|
sizeof(Buffer),
|
||||||
&BytesReturned);
|
&BytesReturned);
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
{
|
{
|
||||||
PrintFilterInfo(Buffer, IsNewStyle);
|
PrintFilterInfo(Buffer, IsNewStyle);
|
||||||
}
|
}
|
||||||
|
else if (hr != HRESULT_FROM_WIN32(ERROR_NO_MORE_ITEMS))
|
||||||
|
{
|
||||||
|
LoadAndPrintString(IDS_ERROR_FILTERS, hr);
|
||||||
|
PrintErrorText(hr);
|
||||||
|
}
|
||||||
} while (SUCCEEDED(hr));
|
} while (SUCCEEDED(hr));
|
||||||
|
|
||||||
FilterFindClose(FindHandle);
|
hr = FilterFindClose(FindHandle);
|
||||||
}
|
if (!SUCCEEDED(hr))
|
||||||
|
|
||||||
if (!SUCCEEDED(hr) && hr != HRESULT_FROM_WIN32(ERROR_NO_MORE_ITEMS))
|
|
||||||
{
|
{
|
||||||
LoadAndPrintString(IDS_ERROR_FILTERS, hr);
|
LoadAndPrintString(IDS_ERROR_FILTERS, hr);
|
||||||
PrintErrorText(hr);
|
PrintErrorText(hr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue