Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

DynamicPackage.h

Go to the documentation of this file.
00001 #ifndef DynamicPackageH
00002 #define DynamicPackageH
00003 /*******************************************************************************
00004 Copyright 2000,2001 Petr Kulhanek
00005 
00006     This file is part of Core plugin.
00007 
00008     Core plugin is free software; you can redistribute it and/or modify
00009     it under the terms of the GNU General Public License as published by
00010     the Free Software Foundation; either version 2 of the License, or
00011     (at your option) any later version.
00012 
00013     Core plugin 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 General Public License for more details.
00017 
00018     You should have received a copy of the GNU General Public License
00019     along with Core plugin; if not, write to the Free Software
00020     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 *******************************************************************************/
00022 /*******************************************************************************
00023 ** PROJEKT:             HiPoLy - HIgh POrtability LibrarY
00024 ** SOUBOR:              DynamicLibrary
00025 ** úČEL:                třída pro práci s dynamickými knihovnami
00026 ** VERZE:               1.0
00027 ** JAZYK:               ANSI C++
00028 ** CÍLOVÝ POČÍTAČ:      IBM PC
00029 ** PROGRAMÁTOR:         Petr Kulhánek
00030 ** HISTORIE úPRAV:
00031 VERZE   DATUM       POZNÁMKA
00032 1.0     2000-09-28  vznik třídy
00033 *******************************************************************************/
00034 
00038 /* HLAVIČKOVÉ SOUBORY *********************************************************/
00039 
00040 #include "CoreMainHeader.h"
00041 #include "SmallString.h"
00042 
00043 /* KONEC HLAVIČKOVÝCH SOUBORů *************************************************/
00044 
00045 /* DEFINICE TŘÍD **************************************************************/
00046 
00047 // univerzální prototyp pointeru na funkci v dynamické knihovně
00048 typedef void (*TProcAdress)(void);
00049 
00050 //..............................................................................
00051 
00053 
00056 class NEMESIS_CORE_PACKAGE CDynamicPackage{
00057     public:
00058  // metody - konstrukce a destrukce
00059         __fastcall CDynamicPackage(void);
00060         __fastcall CDynamicPackage(const CSmallString& name);
00061         __fastcall ~CDynamicPackage(void);
00062 
00063  // metody - otevření a zavření knihovny
00064     bool __fastcall Open(const CSmallString& name);
00065     bool __fastcall Close(void);
00066 
00067  // metody - zjištění zda otevření knihovny proběhlo dobře
00068 
00069     bool __fastcall IsOpen(void);
00070     __fastcall operator const void*(void) const; // operátor přetypování
00071 
00072  // metody - zjištění vstupního bodu procedury v knihovně
00073     TProcAdress __fastcall GetProcAddress(const CSmallString& name);
00074 
00075  // sekce soukromých dat -------------------------------------------------------
00076     private:
00077     Windows::HINST LibraryHandle;  // handle knihovny
00078     };
00079 
00080 /* KONEC DEFINICE TŘÍD ********************************************************/
00081 
00082 
00083 #endif

Generated on Sun Feb 9 12:53:50 2003 for NemesisCore by doxygen1.3-rc2