int TAO_IFR_Server::open_config (void) { if (OPTIONS::instance ()->using_registry ()) { #if defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_REGISTRY) HKEY root = ACE_Configuration_Win32Registry::resolve_key ( HKEY_LOCAL_MACHINE, "Software\\TAO\\IFR" ); ACE_NEW_THROW_EX (this->config_, ACE_Configuration_Win32Registry (root), CORBA::NO_MEMORY ()); #endif /* ACE_WIN32 && !ACE_LACKS_WIN32_REGISTRY */ return 0; } else { ACE_Configuration_Heap *heap = 0; ACE_NEW_THROW_EX (heap, ACE_Configuration_Heap, CORBA::NO_MEMORY ()); if (OPTIONS::instance ()->persistent ()) { const char *filename = OPTIONS::instance ()->persistent_file (); if (heap->open (filename)) { delete heap; heap = 0; ORBSVCS_ERROR_RETURN (( LM_ERROR, ACE_TEXT ("Error:: Opening persistent heap file '%s'\n"), filename ), -1 ); } } else { heap->open (); } this->config_ = heap; return 0; } }
int ACE::HTBP::Environment::open_registry_config () { #if defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_REGISTRY) HKEY root = ACE_Configuration_Win32Registry::resolve_key (HKEY_LOCAL_MACHINE,ACE_TEXT("Software\\HTBP\\Environment")); ACE_NEW_RETURN (this->config_, ACE_Configuration_Win32Registry (root), -1); return 0; #else errno = ENOTSUP; return -1; #endif /* ACE_WIN32 && !ACE_LACKS_WIN32_REGISTRY */ }