Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
WinScopedPreserveLastError Class Reference

some WinAPI functions SetLastError(0) on success, which is bad because it can hide previous errors. More...

#include <wutil.h>

Public Member Functions

 WinScopedPreserveLastError ()
 
 ~WinScopedPreserveLastError ()
 

Private Attributes

DWORD m_lastError
 

Detailed Description

some WinAPI functions SetLastError(0) on success, which is bad because it can hide previous errors.

this class takes care of restoring the previous value.

Constructor & Destructor Documentation

◆ WinScopedPreserveLastError()

WinScopedPreserveLastError::WinScopedPreserveLastError ( )
inline

◆ ~WinScopedPreserveLastError()

WinScopedPreserveLastError::~WinScopedPreserveLastError ( )
inline

Member Data Documentation

◆ m_lastError

DWORD WinScopedPreserveLastError::m_lastError
private

The documentation for this class was generated from the following file: