メインページ | ネームスペース一覧 | クラス階層 | 構成 | Directories | ファイル一覧 | ネームスペースメンバ | 構成メンバ | ファイルメンバ | 関連ページ

WBDllLoader.h

00001 #ifndef WBDLLLOADER_H
00002 #define WBDLLLOADER_H
00003 #include "WBWin.h"
00004 #include <base/BaseUtility.h>
00005 
00006 namespace Spr {;
00007 /** DLLをロードするクラス.以下のようにすると,通常のライブラリと同様に
00008     DLLを動的にロードして使用できる.
00009 
00010 使い方:
00011 static WBDllLoader dllLoader("filename.dll");   //  グローバル変数でローダーを作る.
00012 
00013 //  int DllFunc(int arg)  の場合
00014 #define DLLFUNC_STR     "funcname"              //  dllの中での関数の名前
00015 #define DLLFUNC_RTYPE   int                     //  返り値の型 voidの場合は定義してはならない.
00016 #define DLLFUNC_NAME    DllFunc                 //  関数名
00017 #define DLLFUNC_ARGDEF  (int arg)               //  関数宣言時の引数
00018 #define DLLFUNC_ARGCALL (arg)                   //  関数呼び出しの引数
00019 #include "WBDllLoaderImp.h"
00020 */
00021 class SPR_DLL WBDllLoader{
00022     HMODULE module;
00023     char dllName[1024];
00024     char addPath[1024];
00025 public:
00026     WBDllLoader(){ Init(); }
00027     WBDllLoader(const char* dllName, const char* addPath=NULL){
00028         Init();
00029         Load(dllName, addPath);
00030     }
00031     ~WBDllLoader(){ Cleanup(); }
00032     bool Load(const char* dllName=NULL, const char* addPath=NULL);
00033     void* GetProc(const char* name);
00034 protected:
00035     void Init();
00036     void Cleanup();
00037 };
00038 
00039 }   //  namespace Spr;
00040 
00041 #endif

Springheadに対してSun Apr 16 01:57:58 2006に生成されました。  doxygen 1.4.1