\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 
EVIL\+\_\+\+API void $\ast$ \mbox{\hyperlink{group__Evil__Dlfcn_ga92104d3068e23b5fbd643a7d80337a56}{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 
EVIL\+\_\+\+API int \mbox{\hyperlink{group__Evil__Dlfcn_ga3a83fac192df7e8ed470024a6cd0fbff}{dlclose}} (void $\ast$handle)
\begin{DoxyCompactList}\small\item\em Close a dynamic-\/link library. \end{DoxyCompactList}\item 
EVIL\+\_\+\+API void $\ast$ \mbox{\hyperlink{group__Evil__Dlfcn_gae2f9c8a0ad4b250953f81e514072be1e}{dlsym}} (void $\ast$handle, const char $\ast$symbol)
\begin{DoxyCompactList}\small\item\em Get the address of a symbol. \end{DoxyCompactList}\item 
EVIL\+\_\+\+API char $\ast$ \mbox{\hyperlink{group__Evil__Dlfcn_ga6fb7a8954c4e58526d015e71a0484768}{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_ga92104d3068e23b5fbd643a7d80337a56}\label{group__Evil__Dlfcn_ga92104d3068e23b5fbd643a7d80337a56}} 
\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 EVIL\+\_\+\+API 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_ga6fb7a8954c4e58526d015e71a0484768}{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 \mbox{\hyperlink{group__Evil_ga1627db742021be698db238c55033c1a9}{evil\+\_\+char\+\_\+to\+\_\+wchar()}}.



Referenced by \mbox{\hyperlink{group__Elm__General_gae9c899a5910733a49d4a470ae61ca08d}{efl\+\_\+quicklaunch\+\_\+prepare()}}, \mbox{\hyperlink{group__Eina__Module__Group_ga539b801ef17dc24d3a33fa128abcfddb}{eina\+\_\+module\+\_\+load()}}, and \mbox{\hyperlink{group__Elm__General_ga08d1daa3e6bc25937be40e56ab2216d9}{elm\+\_\+quicklaunch\+\_\+prepare()}}.

\mbox{\Hypertarget{group__Evil__Dlfcn_ga3a83fac192df7e8ed470024a6cd0fbff}\label{group__Evil__Dlfcn_ga3a83fac192df7e8ed470024a6cd0fbff}} 
\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 EVIL\+\_\+\+API 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_ga92104d3068e23b5fbd643a7d80337a56}{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_ga6fb7a8954c4e58526d015e71a0484768}{dlerror()}}.

Conformity\+: None.

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

Referenced by \mbox{\hyperlink{group__Elm__General_gae9c899a5910733a49d4a470ae61ca08d}{efl\+\_\+quicklaunch\+\_\+prepare()}}, \mbox{\hyperlink{group__Eina__Module__Group_ga539b801ef17dc24d3a33fa128abcfddb}{eina\+\_\+module\+\_\+load()}}, \mbox{\hyperlink{group__Eina__Module__Group_gaa0893c795a410986c9104183fac9595f}{eina\+\_\+module\+\_\+unload()}}, \mbox{\hyperlink{group__Elm__General_ga0b8158517959fa10df42c405de4639cf}{elm\+\_\+quicklaunch\+\_\+cleanup()}}, and \mbox{\hyperlink{group__Elm__General_ga08d1daa3e6bc25937be40e56ab2216d9}{elm\+\_\+quicklaunch\+\_\+prepare()}}.

\mbox{\Hypertarget{group__Evil__Dlfcn_gae2f9c8a0ad4b250953f81e514072be1e}\label{group__Evil__Dlfcn_gae2f9c8a0ad4b250953f81e514072be1e}} 
\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 EVIL\+\_\+\+API 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_ga6fb7a8954c4e58526d015e71a0484768}{dlerror()}}.

Conformity\+: None.

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

References \mbox{\hyperlink{group__Evil_ga1627db742021be698db238c55033c1a9}{evil\+\_\+char\+\_\+to\+\_\+wchar()}}.



Referenced by \mbox{\hyperlink{group__Elm__General_gae9c899a5910733a49d4a470ae61ca08d}{efl\+\_\+quicklaunch\+\_\+prepare()}}, \mbox{\hyperlink{group__Eina__Module__Group_ga539b801ef17dc24d3a33fa128abcfddb}{eina\+\_\+module\+\_\+load()}}, \mbox{\hyperlink{group__Eina__Module__Group_ga5d6ab8365f41bb80300607c88b25dbc4}{eina\+\_\+module\+\_\+symbol\+\_\+get()}}, \mbox{\hyperlink{group__Eina__Module__Group_gaa0893c795a410986c9104183fac9595f}{eina\+\_\+module\+\_\+unload()}}, and \mbox{\hyperlink{group__Elm__General_ga08d1daa3e6bc25937be40e56ab2216d9}{elm\+\_\+quicklaunch\+\_\+prepare()}}.

\mbox{\Hypertarget{group__Evil__Dlfcn_ga6fb7a8954c4e58526d015e71a0484768}\label{group__Evil__Dlfcn_ga6fb7a8954c4e58526d015e71a0484768}} 
\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 EVIL\+\_\+\+API 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_ga92104d3068e23b5fbd643a7d80337a56}{dlopen()}}, \mbox{\hyperlink{group__Evil__Dlfcn_gae2f9c8a0ad4b250953f81e514072be1e}{dlsym()}}, or \mbox{\hyperlink{group__Evil__Dlfcn_ga3a83fac192df7e8ed470024a6cd0fbff}{dlclose()}}. If no such error has occurred, \mbox{\hyperlink{group__Evil__Dlfcn_ga6fb7a8954c4e58526d015e71a0484768}{dlerror()}} returns a null pointer. At each call to \mbox{\hyperlink{group__Evil__Dlfcn_ga6fb7a8954c4e58526d015e71a0484768}{dlerror()}}, the error indication is reset. Thus in the case of two calls to \mbox{\hyperlink{group__Evil__Dlfcn_ga6fb7a8954c4e58526d015e71a0484768}{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 \mbox{\hyperlink{group__Elm__General_gae9c899a5910733a49d4a470ae61ca08d}{efl\+\_\+quicklaunch\+\_\+prepare()}}, \mbox{\hyperlink{group__Eina__Module__Group_ga539b801ef17dc24d3a33fa128abcfddb}{eina\+\_\+module\+\_\+load()}}, and \mbox{\hyperlink{group__Elm__General_ga08d1daa3e6bc25937be40e56ab2216d9}{elm\+\_\+quicklaunch\+\_\+prepare()}}.

