5namespace Stroika::Foundation::Common::Platform::Windows {
12 constexpr RegistryKey::RegistryKey (HKEY hkey,
bool owned)
16 static_assert (
nullptr != INVALID_HANDLE_VALUE);
17 Require (hkey !=
nullptr);
18 Require (hkey != INVALID_HANDLE_VALUE);
20 inline RegistryKey::~RegistryKey ()
22 Assert (
nullptr != INVALID_HANDLE_VALUE);
23 Assert (fKey_ !=
nullptr);
24 Assert (fKey_ != INVALID_HANDLE_VALUE);
26 ::RegCloseKey (fKey_);
29 inline RegistryKey::operator HKEY ()
const
31 Ensure (fKey_ !=
nullptr);
32 Ensure (fKey_ != INVALID_HANDLE_VALUE);