summaryrefslogtreecommitdiff
path: root/dso
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2000-10-06 22:02:04 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2000-10-06 22:02:04 +0000
commita00ae0dbc51facd86079b606e4d4b4e51cd15699 (patch)
tree36f86ad0ec0d086bbc7944831d3670b2357a255a /dso
parent0c62120b2aecee16db7db2cb1f9a026fbee8c39b (diff)
downloadlibapr-a00ae0dbc51facd86079b606e4d4b4e51cd15699.tar.gz
Knock off some XXX's prior to a7.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60556 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dso')
-rw-r--r--dso/win32/dso.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/dso/win32/dso.c b/dso/win32/dso.c
index 98277815f..e4dbad23e 100644
--- a/dso/win32/dso.c
+++ b/dso/win32/dso.c
@@ -53,15 +53,28 @@
*/
#include "dso.h"
+#include "apr_strings.h"
#if APR_HAS_DSO
apr_status_t apr_dso_load(struct apr_dso_handle_t **res_handle, const char *path,
apr_pool_t *ctx)
{
- /* XXX: Must convert path from / to \ notation
+ HINSTANCE os_handle;
+ char fspec[MAX_PATH], *p;
+
+ /* Must convert path from / to \ notation.
+ * Per PR2555, the LoadLibraryEx function is very picky about slashes.
+ * Debugging on NT 4 SP 6a reveals First Chance Exception within NTDLL.
+ * LoadLibrary in the MS PSDK also reveals that it -explicitly- states
+ * that backslashes must be used for the LoadLibrary family of calls.
*/
- HINSTANCE os_handle = LoadLibraryEx(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
+ apr_cpystrn(fspec, path, MAX_PATH);
+ for (p = fspec; *p; ++p)
+ if (*p == '/')
+ *p = '\\';
+
+ os_handle = LoadLibraryEx(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
*res_handle = apr_pcalloc(ctx, sizeof(*res_handle));
if(os_handle == NULL) {