- Log out dragging file's directory in Synergy (using COM shell extension)

- Change shell extension dll Main.cpp to synwinxt.cpp
This commit is contained in:
jerry
2013-08-23 09:59:31 +00:00
parent 587c320f61
commit 012fe6ddd8
16 changed files with 131 additions and 11 deletions

View File

@@ -25,7 +25,8 @@ CMSWindowsHookLibraryLoader::CMSWindowsHookLibraryLoader() :
m_cleanup(NULL),
m_setSides(NULL),
m_setZone(NULL),
m_setMode(NULL)
m_setMode(NULL),
m_getDraggingFileDir(NULL)
{
}
@@ -67,4 +68,25 @@ CMSWindowsHookLibraryLoader::openHookLibrary(const char* name)
}
return hookLibrary;
}
}
HINSTANCE
CMSWindowsHookLibraryLoader::openShellLibrary(const char* name)
{
// load the hook library
HINSTANCE shellLibrary = LoadLibrary(name);
if (shellLibrary == NULL) {
LOG((CLOG_ERR "failed to load shell library, %s.dll is missing or invalid", name));
throw XScreenOpenFailure();
}
// look up functions
m_getDraggingFileDir = (GetDraggingFileDir)GetProcAddress(shellLibrary, "getDraggingFileDir");
if (m_getDraggingFileDir == NULL) {
LOG((CLOG_ERR "invalid shell library, use a newer %s.dll", name));
throw XScreenOpenFailure();
}
return shellLibrary;
}