Qt 4.8
|
#include <qsystemlibrary_p.h>
Public Functions | |
bool | isLoaded () |
bool | load (bool onlySystemDirectory=true) |
QSystemLibrary (const QString &libraryName) | |
QSystemLibrary (const wchar_t *libraryName) | |
void * | resolve (const char *symbol) |
Static Public Functions | |
static Q_CORE_EXPORT HINSTANCE | load (const wchar_t *lpFileName, bool onlySystemDirectory=true) |
static void * | resolve (const QString &libraryName, const char *symbol) |
Properties | |
bool | m_didLoad |
HINSTANCE | m_handle |
QString | m_libraryName |
The purpose of this class is to load only libraries that are located in well-known and trusted locations on the filesystem. It does not suffer from the security problem that QLibrary has, therefore it will never search in the current directory.
The search order is the same as the order in DLL Safe search mode Windows, except that we don't search: The current directory The 16-bit system directory. (normally c:/windows/system
) The Windows directory. (normally c:/windows
)
This means that the effective search order is:
Note, when onlySystemDirectory is true it will skip 1) and 3).
DLL Safe search mode is documented in the "Dynamic-Link Library Search Order" document on MSDN.
Since library loading code is sometimes shared between Windows and WinCE, this class can also be used on WinCE. However, its implementation just calls the LoadLibrary() function. This is ok since it is documented as not loading from the current directory on WinCE. This behaviour is documented in the documentation for LoadLibrary for Windows CE at MSDN. (http://msdn.microsoft.com/en-us/library/ms886736.aspx)
Definition at line 52 of file qsystemlibrary_p.h.
|
inlineexplicit |
|
inlineexplicit |
Definition at line 62 of file qsystemlibrary_p.h.
|
inline |
|
inline |
Definition at line 69 of file qsystemlibrary_p.h.
Referenced by QWindowsSystemProxy::init(), load(), loadIconFromShell32(), loadOpenSslWin32(), resolve(), resolveGdi32(), resolveLibrary(), resolveLibs(), resolveTimerAPI(), resolveUNCLibs(), and QSystemLocalePrivate::uiLanguages().
|
static |
Definition at line 85 of file qsystemlibrary.cpp.
|
inline |
Definition at line 81 of file qsystemlibrary_p.h.
Referenced by QSystemTrayIconSys::findIconGeometry(), QDesktopWidgetPrivate::init(), QWindowsSystemProxy::init(), init_wintab_functions(), initWinTabFunctions(), isProcessBeingDebugged(), launchWebBrowser(), QSystemTrayIconSys::QSystemTrayIconSys(), qt_grab_cursor(), qt_init(), qt_win_get_save_file_name(), qt_win_resolve_libs(), QtWndProc(), QVariantToVARIANT(), QWindowsStylePrivate::QWindowsStylePrivate(), registerFont(), resolveAygLibs(), resolveGdi32(), resolveLibrary(), resolveLibs(), QVistaHelper::resolveSymbols(), QWindowsVistaStylePrivate::resolveSymbols(), QWindowsXPStylePrivate::resolveSymbols(), resolveTimerAPI(), resolveUNCLibs(), shared_dc(), QETWidget::translateMouseEvent(), QSystemLocalePrivate::uiLanguages(), and windowsConfigPath().
|
inlinestatic |
Definition at line 94 of file qsystemlibrary_p.h.
|
private |
Definition at line 104 of file qsystemlibrary_p.h.
Referenced by load(), QSystemLibrary(), and resolve().
|
private |
Definition at line 102 of file qsystemlibrary_p.h.
Referenced by isLoaded(), load(), QSystemLibrary(), and resolve().
|
private |
Definition at line 103 of file qsystemlibrary_p.h.
Referenced by load(), and QSystemLibrary().