1 // RegistryException.cpp: Implementierung der Klasse RegistryException.
3 //////////////////////////////////////////////////////////////////////
5 #include "registryexception.hxx"
8 #pragma warning(push, 1) /* disable warnings within system headers */
15 //////////////////////////////////////////////////////////////////////
16 // Konstruktion/Destruktion
17 //////////////////////////////////////////////////////////////////////
19 RegistryException::RegistryException(long ErrorCode
) :
20 m_ErrorCode(ErrorCode
),
27 RegistryException::~RegistryException() throw()
30 LocalFree(m_ErrorMsg
);
35 const char* RegistryException::what() const throw()
38 FORMAT_MESSAGE_ALLOCATE_BUFFER
|
39 FORMAT_MESSAGE_FROM_SYSTEM
|
40 FORMAT_MESSAGE_IGNORE_INSERTS
,
43 MAKELANGID(LANG_NEUTRAL
, SUBLANG_DEFAULT
), // Default language
48 return reinterpret_cast<char*>(m_ErrorMsg
);
53 long RegistryException::GetErrorCode() const
58 //#######################################
59 // Thrown when a Registry key is accessed
61 //#######################################
63 RegistryIOException::RegistryIOException(long ErrorCode
) :
64 RegistryException(ErrorCode
)
68 //#######################################
70 //#######################################
72 RegistryNoWriteAccessException::RegistryNoWriteAccessException(long ErrorCode
) :
73 RegistryException(ErrorCode
)
77 //#######################################
79 //#######################################
81 RegistryAccessDeniedException::RegistryAccessDeniedException(long ErrorCode
) :
82 RegistryException(ErrorCode
)
86 //#######################################
88 //#######################################
90 RegistryValueNotFoundException::RegistryValueNotFoundException(long ErrorCode
) :
91 RegistryException(ErrorCode
)
95 //#######################################
97 //#######################################
99 RegistryKeyNotFoundException::RegistryKeyNotFoundException(long ErrorCode
) :
100 RegistryException(ErrorCode
)
104 //#######################################
106 //#######################################
108 RegistryInvalidOperationException::RegistryInvalidOperationException(long ErrorCode
) :
109 RegistryException(ErrorCode
)