00001 #ifndef MFC_LOADER_IMPLEMENTATION_FILE 00002 #define MFC_LOADER_IMPLEMENTATION_FILE 00003 00004 /*****************************************************************************\ 00005 * * 00006 * Name : mfc_library_loader * 00007 * Author : Chris Koeritz * 00008 * * 00009 ******************************************************************************* 00010 * Copyright (c) 2000-$now By Author. This program is free software; you can * 00011 * redistribute it and/or modify it under the terms of the GNU General Public * 00012 * License as published by the Free Software Foundation; either version 2 of * 00013 * the License or (at your option) any later version. This is online at: * 00014 * http://www.fsf.org/copyleft/gpl.html * 00015 * Please send any updates to: fred@gruntose.com * 00016 \*****************************************************************************/ 00017 00018 #include "mfc_loader.h" 00019 00020 #include <basis/portable.h> 00021 00022 namespace library_plugins { 00023 00024 mfc_library_loader::mfc_library_loader(const istring &dll_name) 00025 : dynamic_library_loader(dll_name, false) 00026 { 00027 load_the_library(); 00028 } 00029 00030 mfc_library_loader::~mfc_library_loader() {} 00031 00032 void *mfc_library_loader::load_library(const char *to_load) 00033 { return AfxLoadLibrary(to_unicode_temp(to_load)); } 00034 00035 void mfc_library_loader::free_library(void *to_free) 00036 { AfxFreeLibrary((HINSTANCE)to_free); } 00037 00038 } // namespace. 00039 00040 00041 #endif //MFC_LOADER_IMPLEMENTATION_FILE 00042
1.5.1