#else\r
std::string module_str = "BlueVelvet3.dll";\r
#endif\r
- std::string sys_drive = getenv("SystemDrive");\r
\r
auto module = LoadLibrary(widen(module_str).c_str());\r
if(!module)\r
- LoadLibrary(widen(sys_drive + "\\Program Files\\Bluefish444\\Driver\\" + module_str).c_str());\r
+ LoadLibrary(widen(std::string(getenv("SystemDrive")) + "\\Program Files\\Bluefish444\\Driver\\" + module_str).c_str());\r
if(!module)\r
- LoadLibrary(widen(sys_drive + "\\Program Files (x86)\\BlueFish444\\Driver\\" + module_str).c_str());\r
+ LoadLibrary(widen(std::string(getenv("SystemDrive")) + "\\Program Files (x86)\\BlueFish444\\Driver\\" + module_str).c_str());\r
if(!module)\r
BOOST_THROW_EXCEPTION(file_not_found() << msg_info("Could not find BlueVelvet3.dll. Required drivers are not installed."));\r
static std::shared_ptr<void> lib(module, FreeLibrary);\r
#else\r
std::string module_str = "BlueHancUtils.dll";\r
#endif\r
-\r
- std::string sys_drive = getenv("SystemDrive");\r
-\r
+ \r
auto module = LoadLibrary(widen(module_str).c_str());\r
if(!module)\r
- LoadLibrary(widen(sys_drive + "\\Program Files\\Bluefish444\\Driver\\" + module_str).c_str());\r
+ LoadLibrary(widen(std::string(getenv("SystemDrive")) + "\\Program Files\\Bluefish444\\Driver\\" + module_str).c_str());\r
if(!module)\r
- LoadLibrary(widen(sys_drive + "\\Program Files (x86)\\BlueFish444\\Driver\\" + module_str).c_str());\r
+ LoadLibrary(widen(std::string(getenv("SystemDrive")) + "\\Program Files (x86)\\BlueFish444\\Driver\\" + module_str).c_str());\r
if(!module)\r
BOOST_THROW_EXCEPTION(file_not_found() << msg_info("Could not find BlueHancUtils.dll. Required drivers are not installed."));\r
static std::shared_ptr<void> lib(module, FreeLibrary);\r