1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 // RegistryException.cpp: Implementierung der Klasse RegistryException.
4 //////////////////////////////////////////////////////////////////////
6 #include "registryexception.hxx"
9 #pragma warning(push, 1) /* disable warnings within system headers */
16 //////////////////////////////////////////////////////////////////////
17 // Konstruktion/Destruktion
18 //////////////////////////////////////////////////////////////////////
20 RegistryException::RegistryException(long ErrorCode
) :
21 m_ErrorCode(ErrorCode
),
26 RegistryException::~RegistryException() throw()
29 LocalFree(m_ErrorMsg
);
32 const char* RegistryException::what() const throw()
35 FORMAT_MESSAGE_ALLOCATE_BUFFER
|
36 FORMAT_MESSAGE_FROM_SYSTEM
|
37 FORMAT_MESSAGE_IGNORE_INSERTS
,
40 MAKELANGID(LANG_NEUTRAL
, SUBLANG_DEFAULT
), // Default language
45 return reinterpret_cast<char*>(m_ErrorMsg
);
48 long RegistryException::GetErrorCode() const
53 //#######################################
54 // Thrown when a Registry key is accessed
56 //#######################################
58 RegistryIOException::RegistryIOException(long ErrorCode
) :
59 RegistryException(ErrorCode
)
63 RegistryNoWriteAccessException::RegistryNoWriteAccessException(long ErrorCode
) :
64 RegistryException(ErrorCode
)
68 RegistryAccessDeniedException::RegistryAccessDeniedException(long ErrorCode
) :
69 RegistryException(ErrorCode
)
73 RegistryValueNotFoundException::RegistryValueNotFoundException(long ErrorCode
) :
74 RegistryException(ErrorCode
)
78 RegistryKeyNotFoundException::RegistryKeyNotFoundException(long ErrorCode
) :
79 RegistryException(ErrorCode
)
83 RegistryInvalidOperationException::RegistryInvalidOperationException(long ErrorCode
) :
84 RegistryException(ErrorCode
)
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */