![]() |
|||||
|
00001 /* ///////////////////////////////////////////////////////////////////////// 00002 * File: dlfcn.h 00003 * 00004 * Purpose: Declaration of the dlopen, dlclose(), dlsym() and dlerror() API 00005 * functions. 00006 * 00007 * Created: 1st January 2004 00008 * Updated: 13th August 2010 00009 * 00010 * Home: http://synesis.com.au/software/ 00011 * 00012 * Copyright (c) 2004-2010, Matthew Wilson and Synesis Software 00013 * All rights reserved. 00014 * 00015 * Redistribution and use in source and binary forms, with or without 00016 * modification, are permitted provided that the following conditions are met: 00017 * 00018 * - Redistributions of source code must retain the above copyright notice, this 00019 * list of conditions and the following disclaimer. 00020 * - Redistributions in binary form must reproduce the above copyright notice, 00021 * this list of conditions and the following disclaimer in the documentation 00022 * and/or other materials provided with the distribution. 00023 * - Neither the names of Matthew Wilson and Synesis Software nor the names of 00024 * any contributors may be used to endorse or promote products derived from 00025 * this software without specific prior written permission. 00026 * 00027 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00028 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00029 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00030 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 00031 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00032 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00033 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00034 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00035 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00036 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00037 * POSSIBILITY OF SUCH DAMAGE. 00038 * 00039 * ////////////////////////////////////////////////////////////////////// */ 00040 00041 00047 #ifndef SYNSOFT_UNIXEM_INCL_H_DLFCN 00048 #define SYNSOFT_UNIXEM_INCL_H_DLFCN 00049 00050 #ifndef UNIXEM_DOCUMENTATION_SKIP_SECTION 00051 # define SYNSOFT_UNIXEM_VER_H_DLFCN_MAJOR 3 00052 # define SYNSOFT_UNIXEM_VER_H_DLFCN_MINOR 0 00053 # define SYNSOFT_UNIXEM_VER_H_DLFCN_REVISION 1 00054 # define SYNSOFT_UNIXEM_VER_H_DLFCN_EDIT 18 00055 #endif /* !UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00056 00057 /* ///////////////////////////////////////////////////////////////////////// 00058 * Includes 00059 */ 00060 00061 #include <unixem/dlfcn.h> 00062 00063 /* ////////////////////////////////////////////////////////////////////// */ 00064 00076 /* ////////////////////////////////////////////////////////////////////// */ 00077 00078 #ifndef _WIN32 00079 # error This file is only currently defined for compilation on Win32 systems 00080 #endif /* _WIN32 */ 00081 00082 /* ///////////////////////////////////////////////////////////////////////// 00083 * Constants and definitions 00084 */ 00085 00086 #define RTLD_LAZY (UNIXEM_RTLD_LAZY) 00087 #define RTLD_NOW (UNIXEM_RTLD_NOW) 00089 /* ///////////////////////////////////////////////////////////////////////// 00090 * API functions 00091 */ 00092 00093 #ifdef __cplusplus 00094 extern "C" 00095 { 00096 #endif /* __cplusplus */ 00097 00108 #ifdef UNIXEM_DOCUMENTATION_SKIP_SECTION 00109 void* dlopen( 00110 char const* moduleName 00111 , int mode 00112 ); 00113 #else /* ? UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00114 # define dlopen unixem_dlopen 00115 #endif /* UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00116 00125 #ifdef UNIXEM_DOCUMENTATION_SKIP_SECTION 00126 void dlclose(void* hModule); 00127 #else /* ? UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00128 # define dlclose unixem_dlclose 00129 #endif /* UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00130 00140 #ifdef UNIXEM_DOCUMENTATION_SKIP_SECTION 00141 void* dlsym( 00142 void* hModule 00143 , char const* symbolName 00144 ); 00145 #else /* ? UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00146 # define dlsym unixem_dlsym 00147 #endif /* UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00148 00157 #ifdef UNIXEM_DOCUMENTATION_SKIP_SECTION 00158 char const* dlerror(void); 00159 #else /* ? UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00160 # define dlerror unixem_dlerror 00161 #endif /* UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00162 00163 #ifndef UNIXEM_DOCUMENTATION_SKIP_SECTION 00164 00165 #endif /* !UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00166 00167 #ifdef __cplusplus 00168 } /* extern "C" */ 00169 #endif /* __cplusplus */ 00170 00171 /* ////////////////////////////////////////////////////////////////////// */ 00172 00175 /* ////////////////////////////////////////////////////////////////////// */ 00176 00177 #endif /* SYNSOFT_UNIXEM_INCL_H_DLFCN */ 00178 00179 /* ///////////////////////////// end of file //////////////////////////// */
|
UNIX Emulation for Win32 Libraries documentation © Synesis Software Pty Ltd, 2002-2010 |