From 1b4bcf6f703248cb397587fe08635a1491d460ec Mon Sep 17 00:00:00 2001 From: Baptiste Lepilleur Date: Mon, 15 Apr 2002 14:33:11 +0000 Subject: NEWS: updated. NEWS: updated. * configure.in: added include/cppunit/config/Makefile and include/cppunit/plugin/Makefile to the list of target. * doc/CppUnit-win.dox: enabled generation of HTML Help documentation. * include/cppunit/config/Makefile.am: * include/cppunit/plugin/Makefile.am: added. * include/cppunit/config-bcb5.h: * include/cppunit/config-msvc6.h: * include/cppunit/config-mac.h: moved to include/cppunit/config/. * include/cppunit/Portability.h: updated config files location. Added macros CPPUNIT_STRINGIZE and CPPUNIT_JOIN (implementation adapted from boost.org). Added macro CPPUNIT_MAKE_UNIQUE_NAME. * include/cppunit/Test.h: modified methods order. * include/cppunit/extensions/HelperMacros.h: renamed macro __CPPUNIT_MAKE_UNIQUE_NAME to CPPUNIT_MAKE_UNIQUE_NAME and moved its definition to include/cppunit/Portability.h. * include/cppunit/extensions/TestDecorator.h: Inherits Test instead of TestLeaf. * include/cppunit/plugin/DynamicLibraryManager.h: * src/cppunit/DynamicLibraryManager.cpp: added. DLL manager (load & lookup symbol). * src/cppunit/BeOsDynamicLibraryManager.cpp: * src/cppunit/UnixDynamicLibraryManager.cpp: * src/cppunit/Win32DynamicLibraryManager.cpp: added. Implementation of platform dependent methods of DynamicLibraryManager. * include/cppunit/plugin/DynamicLibraryManagerException.h: * src/cppunit/DynamicLibraryManagerException.cpp: added. Exception thrown by DynamicLibraryManager. * include/cppunit/plugin/TestPlugIn.h: added. CppUnitTestPlugIn interface definition. Helper macros to implements plug-in. * include/cppunit/plugin/TestPlugInSuite.h: * src/cppunit/plugin/TestPlugInSuite.cpp: added. A suite to wrap a test plug-in. * include/cppunit/plugin/TestPlugInDefaultImpl.h: * src/cppunit/TestPlugInDefaultImpl.cpp: added. A default implementation of the test plug-in interface. * src/msvc6/DllPlugInTester/DllPlugInTester.cpp: updated to use the new TestPlugIn. * examples/cppunittest/TestResultCollectorTest.cpp: fixed typo. --- src/cppunit/Win32DynamicLibraryManager.cpp | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/cppunit/Win32DynamicLibraryManager.cpp (limited to 'src/cppunit/Win32DynamicLibraryManager.cpp') diff --git a/src/cppunit/Win32DynamicLibraryManager.cpp b/src/cppunit/Win32DynamicLibraryManager.cpp new file mode 100644 index 0000000..2c4ec03 --- /dev/null +++ b/src/cppunit/Win32DynamicLibraryManager.cpp @@ -0,0 +1,43 @@ +#include + +#if defined(CPPUNIT_HAVE_WIN32_DLL_LOADER) +#include + +#define WIN32_LEAN_AND_MEAN +#define NOGDI +#define NOUSER +#define NOKERNEL +#define NOSOUND +#define NOMINMAX +#include + + +namespace CppUnit +{ + + +DynamicLibraryManager::LibraryHandle +DynamicLibraryManager::doLoadLibrary( const std::string &libraryName ) +{ + return ::LoadLibrary( libraryName.c_str() ); +} + + +void +DynamicLibraryManager::doReleaseLibrary() +{ + ::FreeLibrary( (HINSTANCE)m_libraryHandle ); +} + + +DynamicLibraryManager::Symbol +DynamicLibraryManager::doFindSymbol( const std::string &symbol ) +{ + return ::GetProcAddress( (HINSTANCE)m_libraryHandle, symbol.c_str() ); +} + + +} // namespace CppUnit + + +#endif // defined(CPPUNIT_HAVE_WIN32_DLL_LOADER) \ No newline at end of file -- cgit v1.2.1