-// Copyright (C) 2006-2016 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2023 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
return NULL != _trueCont;
}
-void CppContainer::start(const Task *askingNode) throw (YACS::Exception)
+void CppContainer::start(const Task *askingNode)
{
_trueCont = LocalContainer::get();
}
return new CppContainer(*this);
}
-bool CppContainer::loadComponentLibrary(const std::string & componentName) throw (YACS::Exception)
+bool CppContainer::loadComponentLibrary(const std::string & componentName)
{
if (_trueCont)
{
return "/";
}
-void CppContainer::checkCapabilityToDealWith(const ComponentInstance *inst) const throw(YACS::Exception)
+void CppContainer::checkCapabilityToDealWith(const ComponentInstance *inst) const
{
if(inst->getKind()!=CppComponent::KIND)
throw Exception("CppContainer::checkCapabilityToDealWith : CppContainer is not able to deal with this type of ComponentInstance.");
#if defined( WIN32 )
HMODULE handle;
- handle = dlopen( impl_name.c_str() ) ;
+#if defined(UNICODE)
+ size_t length = strlen(impl_name.c_str()) + sizeof(char);
+ wchar_t* aPath = new wchar_t[length + 1];
+ memset(aPath, '\0', length);
+ mbstowcs(aPath, impl_name.c_str(), length);
+#else
+ const char* aPath = fullLibName.c_str();
+#endif
+ handle = dlopen( aPath ) ;
#else
void* handle;
handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ;