mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 10:09:36 +02:00
- bin/PocoMsg.dll file
- project files - EventLogChannel modifications to search for PocoMsg.dll first
This commit is contained in:
@@ -236,28 +236,38 @@ void EventLogChannel::setUpRegistry() const
|
||||
{
|
||||
#if defined(POCO_WIN32_UTF8)
|
||||
std::wstring path;
|
||||
std::wstring libName = L"PocoMsg.dll";
|
||||
path = findLibrary(libName.c_str());
|
||||
|
||||
if (path.empty())
|
||||
{
|
||||
#if defined(POCO_DLL)
|
||||
#if defined(_DEBUG)
|
||||
path = findLibrary(L"PocoFoundationd.dll");
|
||||
libName = L"PocoFoundationd.dll";
|
||||
path = findLibrary(libName.c_str());
|
||||
#else
|
||||
path = findLibrary(L"PocoFoundation.dll");
|
||||
libName = L"PocoFoundation.dll";
|
||||
path = findLibrary(libName.c_str());
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (path.empty())
|
||||
path = findLibrary(L"PocoMsg.dll");
|
||||
}
|
||||
#else
|
||||
std::string path;
|
||||
std::string libName = "PocoMsg.dll";
|
||||
path = findLibrary(libName.c_str());
|
||||
|
||||
if (path.empty())
|
||||
{
|
||||
#if defined(POCO_DLL)
|
||||
#if defined(_DEBUG)
|
||||
path = findLibrary("PocoFoundationd.dll");
|
||||
libName = "PocoFoundationd.dll";
|
||||
path = findLibrary(libName.c_str());
|
||||
#else
|
||||
path = findLibrary("PocoFoundation.dll");
|
||||
libName = "PocoFoundation.dll";
|
||||
path = findLibrary(libName.c_str());
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (path.empty())
|
||||
path = findLibrary("PocoMsg.dll");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!path.empty())
|
||||
@@ -274,6 +284,16 @@ void EventLogChannel::setUpRegistry() const
|
||||
RegSetValueEx(hKey, "EventMessageFile", 0, REG_SZ, (const BYTE*) path.c_str(), (DWORD) path.size() + 1);
|
||||
RegSetValueEx(hKey, "CategoryCount", 0, REG_DWORD, (const BYTE*) &count, (DWORD) sizeof(count));
|
||||
RegSetValueEx(hKey, "TypesSupported", 0, REG_DWORD, (const BYTE*) &types, (DWORD) sizeof(types));
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string uLibName;
|
||||
#if defined(POCO_WIN32_UTF8)
|
||||
UnicodeConverter::toUTF8(libName, uLibName);
|
||||
throw NotFoundException(uLibName);
|
||||
#else
|
||||
throw NotFoundException(libName);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user