PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: DynLibWindows.h * 00003 * 00004 * Copyright (C) 2002-2011 The PixelLight Team (http://www.pixellight.org/) 00005 * 00006 * This file is part of PixelLight. 00007 * 00008 * PixelLight is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation, either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * PixelLight is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with PixelLight. If not, see <http://www.gnu.org/licenses/>. 00020 \*********************************************************/ 00021 00022 00023 #ifndef __PLCORE_DYNLIB_WINDOWS_H__ 00024 #define __PLCORE_DYNLIB_WINDOWS_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include "PLCore/PLCoreWindowsIncludes.h" 00032 #include "PLCore/System/DynLibImpl.h" 00033 00034 00035 //[-------------------------------------------------------] 00036 //[ Namespace ] 00037 //[-------------------------------------------------------] 00038 namespace PLCore { 00039 00040 00041 //[-------------------------------------------------------] 00042 //[ Classes ] 00043 //[-------------------------------------------------------] 00044 /** 00045 * @brief 00046 * Windows 'DynLib' implementation 00047 */ 00048 class DynLibWindows : public DynLibImpl { 00049 00050 00051 //[-------------------------------------------------------] 00052 //[ Friends ] 00053 //[-------------------------------------------------------] 00054 friend class DynLib; 00055 00056 00057 //[-------------------------------------------------------] 00058 //[ Private functions ] 00059 //[-------------------------------------------------------] 00060 private: 00061 /** 00062 * @brief 00063 * Constructor 00064 */ 00065 DynLibWindows(); 00066 00067 /** 00068 * @brief 00069 * Destructor 00070 */ 00071 virtual ~DynLibWindows(); 00072 00073 00074 //[-------------------------------------------------------] 00075 //[ Private virtual DynLibImpl functions ] 00076 //[-------------------------------------------------------] 00077 private: 00078 virtual bool IsLoaded() const override; 00079 virtual bool Load(const Url &cUrl) override; 00080 virtual String GetAbsPath() const override; 00081 virtual bool Unload() override; 00082 virtual void *GetSymbol(const String &sSymbol) const override; 00083 00084 00085 //[-------------------------------------------------------] 00086 //[ Private data ] 00087 //[-------------------------------------------------------] 00088 private: 00089 HMODULE m_hModule; /**< System handle for the dynamic library */ 00090 00091 00092 }; 00093 00094 00095 //[-------------------------------------------------------] 00096 //[ Namespace ] 00097 //[-------------------------------------------------------] 00098 } // PLCore 00099 00100 00101 #endif // __PLCORE_DYNLIB_WINDOWS_H__
|