// unregistered_cast_dll.cpp : Defines the entry point for the DLL application. // #include "unregistered_cast_dll.h" #include "../unregistered_cast/unregistered_cast.h" #include #define BOOST_SERIALIZATION_DYN_LINK #include #include #include #include #include BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } UNREGISTERED_CAST_DLL_API void foo() { } void bar() { A a; A* const pa = &a; std::stringstream ss; boost::archive::polymorphic_text_oarchive oa(ss); oa << pa; }