//Sleep
MUTILS_API void sleep_ms(const size_t &duration);
- //Is executable file?
+ //Is executable/library file?
MUTILS_API bool is_executable_file(const QString &path);
+ MUTILS_API bool is_library_file(const QString &path);
//Shutdown & Hibernation
MUTILS_API bool is_hibernation_supported(void);
return bIsExecutable;
}
+bool MUtils::OS::is_library_file(const QString &path)
+{
+ bool bIsLibrary = false;
+ const HMODULE hMod = LoadLibraryEx(MUTILS_WCHR(QDir::toNativeSeparators(path)), NULL, LOAD_LIBRARY_AS_IMAGE_RESOURCE);
+ if (hMod)
+ {
+ bIsLibrary = true;
+ FreeLibrary(hMod);
+ }
+ return bIsLibrary;
+}
+
///////////////////////////////////////////////////////////////////////////////
// HIBERNATION / SHUTDOWN
///////////////////////////////////////////////////////////////////////////////