You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2008/04/05 12:49:06 UTC
svn commit: r645070 - in /webservices/axis2/trunk/c/util:
include/platforms/windows/axutil_windows.h src/class_loader.c
src/platforms/windows/axutil_windows.c
Author: samisa
Date: Sat Apr 5 03:49:02 2008
New Revision: 645070
URL: http://svn.apache.org/viewvc?rev=645070&view=rev
Log:
Added using dlerror in case DLL loading fails.
Modified:
webservices/axis2/trunk/c/util/include/platforms/windows/axutil_windows.h
webservices/axis2/trunk/c/util/src/class_loader.c
webservices/axis2/trunk/c/util/src/platforms/windows/axutil_windows.c
Modified: webservices/axis2/trunk/c/util/include/platforms/windows/axutil_windows.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/platforms/windows/axutil_windows.h?rev=645070&r1=645069&r2=645070&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/platforms/windows/axutil_windows.h (original)
+++ webservices/axis2/trunk/c/util/include/platforms/windows/axutil_windows.h Sat Apr 5 03:49:02 2008
@@ -63,6 +63,18 @@
/* get opt */
#include "axutil_getopt_windows.h"
+ AXIS2_EXTERN HMODULE AXIS2_CALL
+ callLoadLib(
+ char *lib);
+
+ AXIS2_EXTERN struct tm *AXIS2_CALL
+ axis2_win_gmtime(
+ const time_t * timep,
+ struct tm *result);
+
+ AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+ axutil_win32_get_last_error();
+
/***************************************************************
* Default paths to shared library/DLLs and files
***************************************************************
@@ -98,7 +110,7 @@
#define AXIS2_PLATFORM_UNLOADLIB FreeLibrary
#define AXIS2_PLATFORM_GETPROCADDR GetProcAddress
#define AXIS2_PLATFORM_LOADLIBEXIT()
-#define AXIS2_PLATFORM_LOADLIB_ERROR ""
+#define AXIS2_PLATFORM_LOADLIB_ERROR axutil_win32_get_last_error()
#define AXIS2_DLHANDLER void*
@@ -155,14 +167,6 @@
#define AXIS2_PRINTF_LONGLONG_FORMAT_SPECIFIER "%I64d"
#define AXIS2_PRINTF_LONGLONG_FORMAT_SPECIFIER_CHARS "I64d"
- AXIS2_EXTERN HMODULE AXIS2_CALL
- callLoadLib(
- char *lib);
-
- AXIS2_EXTERN struct tm *AXIS2_CALL
- axis2_win_gmtime(
- const time_t * timep,
- struct tm *result);
/**
* Platform specific path separator char
Modified: webservices/axis2/trunk/c/util/src/class_loader.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/class_loader.c?rev=645070&r1=645069&r2=645070&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/class_loader.c (original)
+++ webservices/axis2/trunk/c/util/src/class_loader.c Sat Apr 5 03:49:02 2008
@@ -158,6 +158,7 @@
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_DLL_LOADING_FAILED,
AXIS2_FAILURE);
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "dlerror reason: %s", AXIS2_PLATFORM_LOADLIB_ERROR);
return AXIS2_FAILURE;
}
status = axutil_dll_desc_set_dl_handler(dll_desc, env, dl_handler);
Modified: webservices/axis2/trunk/c/util/src/platforms/windows/axutil_windows.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/platforms/windows/axutil_windows.c?rev=645070&r1=645069&r2=645070&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/platforms/windows/axutil_windows.c (original)
+++ webservices/axis2/trunk/c/util/src/platforms/windows/axutil_windows.c Sat Apr 5 03:49:02 2008
@@ -44,15 +44,23 @@
*/
AXIS2_EXTERN HMODULE AXIS2_CALL
callLoadLib(char *lib)
{
-
SetErrorMode(SEM_FAILCRITICALERRORS); //Disable display of the critical-error-handler message box
+ SetErrorMode(SEM_FAILCRITICALERRORS); //Disable display of the critical-error-handler message box
return LoadLibrary(lib);
-
}
+}
AXIS2_EXTERN struct tm *AXIS2_CALL
axis2_win_gmtime(
const time_t * timep,
struct tm *result)
{
-
return gmtime(timep);
-
}
+ return gmtime(timep);
+}
+
+AXIS2_EXTERN axis2_char_t * AXIS2_CALL axutil_win32_get_last_error()
+{
+ return "Something went wrong loading the DLL. \
+If you happen to see this message, \
+please note that getting the exact error form Windows is a TODO. \
+And if possible please help fix it. :)";
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org