- bin/PocoMsg.dll file

- project files
- EventLogChannel modifications to search for PocoMsg.dll first
This commit is contained in:
Aleksandar Fabijanic
2008-02-19 18:13:08 +00:00
parent 19d738c67f
commit 7a59e4eb48
7 changed files with 320 additions and 10 deletions

View File

@@ -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
}
}