windows-nt/Source/XPSP1/NT/admin/dsutils/displayspecifierupgrade/uiarchive/showerror.cpp
2020-09-26 16:20:57 +08:00

21 lines
389 B
C++

void ShowError(HRESULT hr,
const String &message)
{
LOG_FUNCTION(ShowError);
if(hr==E_FAIL)
{
popup.Error(Win::GetDesktopWindow(),message);
}
else
{
if(message.empty())
{
popup.Error(Win::GetDesktopWindow(),GetErrorMessage(hr));
}
else
{
popup.Error(Win::GetDesktopWindow(),hr,message);
}
}
}