00001 /* 00002 ** This file is part of the C Utility Toolkit (CUTK) 00003 ** Copyright (C) 2002-2005 Chris Osgood 00004 ** http://www.cutk.org 00005 ** 00006 ** This library is free software; you can redistribute it and/or 00007 ** modify it under the terms of the GNU Lesser General Public 00008 ** License as published by the Free Software Foundation; either 00009 ** version 2.1 of the License, or (at your option) any later version. 00010 ** 00011 ** This library is distributed in the hope that it will be useful, 00012 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 ** Lesser General Public License for more details. 00015 ** 00016 ** You should have received a copy of the GNU Lesser General Public 00017 ** License along with this library; if not, write to the Free Software 00018 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 ** 00020 ** Please report all bugs and problems to "bugs at cutk.org". 00021 */ 00022 00023 /* 00024 ** Cross-platform DLL handling 00025 ** 00026 ** Function reference: 00027 ** DllLoad -- Loads DLL into memory 00028 ** DllUnload -- Unloads DLL 00029 ** DllSym -- Locates a symbol in DLL 00030 ** 00031 ** $Id: dll.h 18 2005-01-12 03:22:52Z chris $ 00032 */ 00033 00034 #ifndef __INCLUDE_DLL_H__ 00035 #define __INCLUDE_DLL_H__ 00036 00037 #ifdef __cplusplus 00038 extern "C" { 00039 #endif 00040 00041 #ifdef _WIN32 00042 #define WIN32_LEAN_AND_MEAN 00043 #include <windows.h> 00044 typedef HMODULE Dll; 00045 #else 00046 typedef void* Dll; 00047 #endif 00048 00049 Dll DllOpen(const char* path); 00050 int DllClose(Dll dll); 00051 void* DllSym(Dll dll, const char* sym); 00052 00053 #ifdef __cplusplus 00054 } 00055 #endif 00056 00057 #endif /* __INCLUDE_DLL_H__ */