Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

89 lines
1.2 KiB

/*++
Copyright (c) 2001 Microsoft Corporation
All rights reserved.
Module Name:
hresult.cxx
Abstract:
auto log
Author:
Larry Zhu (LZhu) December 6, 2001
Revision History:
--*/
#include "precomp.hxx"
#pragma hdrstop
#include "hresult.hxx"
#ifdef DBG
/********************************************************************
THResult members
********************************************************************/
THResult::
THResult(
IN HRESULT hResult
) : TStatusDerived<HRESULT>(hResult)
{
}
THResult::
~THResult(
VOID
)
{
}
BOOL
THResult::
IsErrorSevereEnough(
VOID
) const
{
HRESULT hResult = GetTStatusBase();
return FAILED(hResult);
}
PCTSTR
THResult::
GetErrorServerityDescription(
VOID
) const
{
HRESULT hResult = GetTStatusBase();
return SUCCEEDED(hResult) ? TEXT("SUCCEEDED") : TEXT("FAILED");
}
#endif // DBG
EXTERN_C
HRESULT
HResultFromWin32(
IN DWORD dwError
)
{
return HRESULT_FROM_WIN32(dwError);
}
EXTERN_C
HRESULT
GetLastErrorAsHResult(
VOID
)
{
return HResultFromWin32(GetLastError());
}