\hypertarget{group__Evil__Dlfcn}{}\doxysection{Functions that manage dynamic-\/link libraries.}
\label{group__Evil__Dlfcn}\index{Functions that manage dynamic-\/link libraries.@{Functions that manage dynamic-\/link libraries.}}


This header provides functions to load and unload dynamic-\/link libaries, to get the address of a symbol, and to get diagnostic information.  


\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void $\ast$ \mbox{\hyperlink{group__Evil__Dlfcn_ga7287ef9a037dbf96810a83ab770c2971}{dlopen}} (const char $\ast$path, int mode)
\begin{DoxyCompactList}\small\item\em Map a specified executable module (either a .dll or .exe file) into the address space of the user process. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__Evil__Dlfcn_gaf483b6c4400965aa885f9f1a144138a5}{dlclose}} (void $\ast$handle)
\begin{DoxyCompactList}\small\item\em Close a dynamic-\/link library. \end{DoxyCompactList}\item 
void $\ast$ \mbox{\hyperlink{group__Evil__Dlfcn_ga84cb8784df910bfcc3002dc5e9e2f406}{dlsym}} (void $\ast$handle, const char $\ast$symbol)
\begin{DoxyCompactList}\small\item\em Get the address of a symbol. \end{DoxyCompactList}\item 
char $\ast$ \mbox{\hyperlink{group__Evil__Dlfcn_ga541c343ae5cdf90926014c65972c86cc}{dlerror}} (void)
\begin{DoxyCompactList}\small\item\em Get diagnostic information. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This header provides functions to load and unload dynamic-\/link libaries, to get the address of a symbol, and to get diagnostic information. 



\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Evil__Dlfcn_ga7287ef9a037dbf96810a83ab770c2971}\label{group__Evil__Dlfcn_ga7287ef9a037dbf96810a83ab770c2971}} 
\index{Functions that manage dynamic-\/link libraries.@{Functions that manage dynamic-\/link libraries.}!dlopen@{dlopen}}
\index{dlopen@{dlopen}!Functions that manage dynamic-\/link libraries.@{Functions that manage dynamic-\/link libraries.}}
\doxysubsubsection{\texorpdfstring{dlopen()}{dlopen()}}
{\footnotesize\ttfamily void$\ast$ dlopen (\begin{DoxyParamCaption}\item[{const char $\ast$}]{path,  }\item[{int}]{mode }\end{DoxyParamCaption})}



Map a specified executable module (either a .dll or .exe file) into the address space of the user process. 


\begin{DoxyParams}{Parameters}
{\em path} & Name of the module. \\
\hline
{\em mode} & Unused. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer that represent the module, or {\ttfamily NULL} on failure.
\end{DoxyReturn}
Map a specified executable module (either a .dll or .exe file) into the address space of the user process. If {\ttfamily path} is {\ttfamily NULL}, then the module corresponding to the current process is returned. Otherwise the module specified by {\ttfamily path} is loaded if it exists. If not, {\ttfamily NULL} is returned. The directory separators can be forward slash, or backward ones. Mapping a module can map other modules. {\ttfamily mode} is unused.

If an error occurred, an error string can be retrived with \mbox{\hyperlink{group__Evil__Dlfcn_ga541c343ae5cdf90926014c65972c86cc}{dlerror()}}.

According to the OS, the search order of the module can change, according to the value of Safe\+Dll\+Search\+Mode.


\begin{DoxyItemize}
\item For Windows Vista, Windows Server 2003, and Windows XP SP2\+: Safe\+DLLSearch\+Mode is enabled by default.
\item For Windows XP and Windows 2000 SP4\+: Safe\+DLLSearch\+Mode is disabled by default.
\end{DoxyItemize}

If Safe\+Dll\+Search\+Mode is enabled
\begin{DoxyItemize}
\item The directory from which the application loaded.
\item The system directory. Use the Get\+System\+Directory() function to get the path of this directory.
\item The 16-\/bit system directory. There is no function that obtains the path of this directory, but it is searched.
\item The Windows directory. Use the Get\+Windows\+Directory() function to get the path of this directory.
\item The current directory.
\item The directories that are listed in the PATH environment variable. Note that this does not include the per-\/application path specified by the App Paths registry key.
\end{DoxyItemize}

If Safe\+Dll\+Search\+Mode is disabled
\begin{DoxyItemize}
\item The directory from which the application loaded.
\item The current directory.
\item The system directory. Use the Get\+System\+Directory() function to get the path of this directory.
\item The 16-\/bit system directory. There is no function that obtains the path of this directory, but it is searched.
\item The Windows directory. Use the Get\+Windows\+Directory() function to get the path of this directory.
\item The directories that are listed in the PATH environment variable. Note that this does not include the per-\/application path specified by the App Paths registry key.
\end{DoxyItemize}

Conformity\+: None.

Supported OS\+: Windows Vista, Windows XP or Windows 2000 Professional. 

References evil\+\_\+char\+\_\+to\+\_\+wchar().



Referenced by efl\+\_\+quicklaunch\+\_\+prepare(), and elm\+\_\+quicklaunch\+\_\+prepare().

\mbox{\Hypertarget{group__Evil__Dlfcn_gaf483b6c4400965aa885f9f1a144138a5}\label{group__Evil__Dlfcn_gaf483b6c4400965aa885f9f1a144138a5}} 
\index{Functions that manage dynamic-\/link libraries.@{Functions that manage dynamic-\/link libraries.}!dlclose@{dlclose}}
\index{dlclose@{dlclose}!Functions that manage dynamic-\/link libraries.@{Functions that manage dynamic-\/link libraries.}}
\doxysubsubsection{\texorpdfstring{dlclose()}{dlclose()}}
{\footnotesize\ttfamily int dlclose (\begin{DoxyParamCaption}\item[{void $\ast$}]{handle }\end{DoxyParamCaption})}



Close a dynamic-\/link library. 


\begin{DoxyParams}{Parameters}
{\em handle} & Handle that references a dynamic-\/link library. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O on success, -\/1 otherwise.
\end{DoxyReturn}
Release a reference to the dynamic-\/link library referenced by {\ttfamily handle}. If the reference count drops to 0, the handle is removed from the address space and is rendered invalid. {\ttfamily handle} is the value returned by a previous call to \mbox{\hyperlink{group__Evil__Dlfcn_ga7287ef9a037dbf96810a83ab770c2971}{dlopen()}}.

If no error occurred, the returned value is 0, otherwise the returned value is -\/1 and an error string can be retrived with \mbox{\hyperlink{group__Evil__Dlfcn_ga541c343ae5cdf90926014c65972c86cc}{dlerror()}}.

Conformity\+: None.

Supported OS\+: Windows Vista, Windows XP or Windows 2000 Professional. 

Referenced by efl\+\_\+quicklaunch\+\_\+prepare(), elm\+\_\+quicklaunch\+\_\+cleanup(), and elm\+\_\+quicklaunch\+\_\+prepare().

\mbox{\Hypertarget{group__Evil__Dlfcn_ga84cb8784df910bfcc3002dc5e9e2f406}\label{group__Evil__Dlfcn_ga84cb8784df910bfcc3002dc5e9e2f406}} 
\index{Functions that manage dynamic-\/link libraries.@{Functions that manage dynamic-\/link libraries.}!dlsym@{dlsym}}
\index{dlsym@{dlsym}!Functions that manage dynamic-\/link libraries.@{Functions that manage dynamic-\/link libraries.}}
\doxysubsubsection{\texorpdfstring{dlsym()}{dlsym()}}
{\footnotesize\ttfamily void$\ast$ dlsym (\begin{DoxyParamCaption}\item[{void $\ast$}]{handle,  }\item[{const char $\ast$}]{symbol }\end{DoxyParamCaption})}



Get the address of a symbol. 


\begin{DoxyParams}{Parameters}
{\em handle} & Handle that references a dynamic-\/link library. \\
\hline
{\em symbol} & {\ttfamily NULL-\/terminated} string. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O on success, NULL otherwise.
\end{DoxyReturn}
Return the address of the code or data location specified by the string {\ttfamily symbol}. {\ttfamily handle} references a library that contains the function or variable {\ttfamily symbol}.

If no error occurred, the returned value is the code or data location, otherwise the returned value is NULL and an error string can be retrived with \mbox{\hyperlink{group__Evil__Dlfcn_ga541c343ae5cdf90926014c65972c86cc}{dlerror()}}.

Conformity\+: None.

Supported OS\+: Windows Vista, Windows XP or Windows 2000 Professional. 

References evil\+\_\+char\+\_\+to\+\_\+wchar().



Referenced by efl\+\_\+quicklaunch\+\_\+prepare(), and elm\+\_\+quicklaunch\+\_\+prepare().

\mbox{\Hypertarget{group__Evil__Dlfcn_ga541c343ae5cdf90926014c65972c86cc}\label{group__Evil__Dlfcn_ga541c343ae5cdf90926014c65972c86cc}} 
\index{Functions that manage dynamic-\/link libraries.@{Functions that manage dynamic-\/link libraries.}!dlerror@{dlerror}}
\index{dlerror@{dlerror}!Functions that manage dynamic-\/link libraries.@{Functions that manage dynamic-\/link libraries.}}
\doxysubsubsection{\texorpdfstring{dlerror()}{dlerror()}}
{\footnotesize\ttfamily char$\ast$ dlerror (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Get diagnostic information. 

\begin{DoxyReturn}{Returns}
A {\ttfamily NULL-\/terminated} string if an error occurred, {\ttfamily NULL} otherwise.
\end{DoxyReturn}
Return a {\ttfamily NULL-\/terminated} character string describing the last error that occurred on this thread during a call to \mbox{\hyperlink{group__Evil__Dlfcn_ga7287ef9a037dbf96810a83ab770c2971}{dlopen()}}, \mbox{\hyperlink{group__Evil__Dlfcn_ga84cb8784df910bfcc3002dc5e9e2f406}{dlsym()}}, or \mbox{\hyperlink{group__Evil__Dlfcn_gaf483b6c4400965aa885f9f1a144138a5}{dlclose()}}. If no such error has occurred, \mbox{\hyperlink{group__Evil__Dlfcn_ga541c343ae5cdf90926014c65972c86cc}{dlerror()}} returns a null pointer. At each call to \mbox{\hyperlink{group__Evil__Dlfcn_ga541c343ae5cdf90926014c65972c86cc}{dlerror()}}, the error indication is reset. Thus in the case of two calls to \mbox{\hyperlink{group__Evil__Dlfcn_ga541c343ae5cdf90926014c65972c86cc}{dlerror()}}, where the second call follows the first immediately, the second call will always return a null pointer.

Conformity\+: None.

Supported OS\+: Windows Vista, Windows XP or Windows 2000 Professional. 

Referenced by efl\+\_\+quicklaunch\+\_\+prepare(), and elm\+\_\+quicklaunch\+\_\+prepare().

