mirror of
https://github.com/debauchee/barrier.git
synced 2025-07-21 10:27:36 +02:00
make sure synwinxt.dll can only be loaded on vista and above
This commit is contained in:
parent
b54082a568
commit
a573a44842
1 changed files with 13 additions and 3 deletions
|
@ -73,6 +73,16 @@ CMSWindowsHookLibraryLoader::openHookLibrary(const char* name)
|
||||||
HINSTANCE
|
HINSTANCE
|
||||||
CMSWindowsHookLibraryLoader::openShellLibrary(const char* name)
|
CMSWindowsHookLibraryLoader::openShellLibrary(const char* name)
|
||||||
{
|
{
|
||||||
|
OSVERSIONINFO osvi;
|
||||||
|
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
|
||||||
|
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||||
|
GetVersionEx(&osvi);
|
||||||
|
|
||||||
|
if (osvi.dwMajorVersion < 6) {
|
||||||
|
LOG((CLOG_INFO "skipping shell library load, %s.dll not supported before vista", name));
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
// load the hook library
|
// load the hook library
|
||||||
HINSTANCE shellLibrary = LoadLibrary(name);
|
HINSTANCE shellLibrary = LoadLibrary(name);
|
||||||
if (shellLibrary == NULL) {
|
if (shellLibrary == NULL) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue