From 6ca9ac3f3a5145ca0abe6b2a6d9bf7159c291386 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Sat, 9 Aug 2008 23:01:39 +0000 Subject: [PATCH] Originally committed to SVN as r2299. --- aegilib/aegilib_2008.vcproj | 2 +- aegilib/include/athenasub/api.h | 1 + aegilib/include/athenasub/athenasub.h | 2 +- aegilib/include/athenasub/athenawin.h | 3 ++- aegilib/src/libathenasub.cpp | 2 +- aegilib/test/test_2008.vcproj | 1 + 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/aegilib/aegilib_2008.vcproj b/aegilib/aegilib_2008.vcproj index 0aa3c6210..792da64b0 100644 --- a/aegilib/aegilib_2008.vcproj +++ b/aegilib/aegilib_2008.vcproj @@ -116,7 +116,7 @@ FavorSizeOrSpeed="1" OmitFramePointers="false" AdditionalIncludeDirectories="include/athenasub;src" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_WINDOWS" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_WINDOWS;ATHENA_EXPORTS" RuntimeLibrary="2" EnableEnhancedInstructionSet="0" UsePrecompiledHeader="2" diff --git a/aegilib/include/athenasub/api.h b/aegilib/include/athenasub/api.h index d195e57c1..542c8e5a0 100644 --- a/aegilib/include/athenasub/api.h +++ b/aegilib/include/athenasub/api.h @@ -33,6 +33,7 @@ // Contact: mailto:amz@aegisub.net // +#define ATHENA_DLL #ifdef ATHENA_DLL #ifdef ATHENA_EXPORTS #define ATHENA_API __declspec(dllexport) diff --git a/aegilib/include/athenasub/athenasub.h b/aegilib/include/athenasub/athenasub.h index 8aa0b506b..361a40cf8 100644 --- a/aegilib/include/athenasub/athenasub.h +++ b/aegilib/include/athenasub/athenasub.h @@ -42,4 +42,4 @@ #include "range.h" -extern "C" Athenasub::ILibAthenaSub* CreateLibAthenasub(const char* hostName); +extern "C" ATHENA_API Athenasub::ILibAthenaSub* CreateLibAthenasub(const char* hostName); diff --git a/aegilib/include/athenasub/athenawin.h b/aegilib/include/athenasub/athenawin.h index bad77a0c0..e0584d2d4 100644 --- a/aegilib/include/athenasub/athenawin.h +++ b/aegilib/include/athenasub/athenawin.h @@ -44,7 +44,8 @@ typedef Athenasub::ILibAthenaSub* (__stdcall *CreateLibAthenasubPtr)(const char* namespace Athenasub { inline LibAthenaSub Create(HMODULE module,const char* hostName) { CreateLibAthenasubPtr CreateLib = (CreateLibAthenasubPtr)GetProcAddress(module,"CreateLibAthenasub"); - printf("Pointer at %x.\n",CreateLib); + printf("Pointer is %x. Last error is %i.\n",CreateLib,GetLastError()); return LibAthenaSub(CreateLib(hostName)); + //return LibAthenaSub(CreateLibAthenasub(hostName)); } } diff --git a/aegilib/src/libathenasub.cpp b/aegilib/src/libathenasub.cpp index 01811f0ad..fd14b6f45 100644 --- a/aegilib/src/libathenasub.cpp +++ b/aegilib/src/libathenasub.cpp @@ -39,7 +39,7 @@ using namespace Athenasub; -extern "C" ILibAthenaSub* CreateLibAthenasub(const char* hostName) { +extern "C" ATHENA_API ILibAthenaSub* CreateLibAthenasub(const char* hostName) { return new CLibAthenaSub(hostName); } diff --git a/aegilib/test/test_2008.vcproj b/aegilib/test/test_2008.vcproj index 4d836164d..c16649d96 100644 --- a/aegilib/test/test_2008.vcproj +++ b/aegilib/test/test_2008.vcproj @@ -63,6 +63,7 @@ />