summaryrefslogtreecommitdiffstats
path: root/src/H5PL.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5PL.c')
-rw-r--r--src/H5PL.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/src/H5PL.c b/src/H5PL.c
index 8042651..1806ea6 100644
--- a/src/H5PL.c
+++ b/src/H5PL.c
@@ -40,7 +40,19 @@
/* Macros for supporting
* both Windows and Unix */
/****************************/
-/* Windows support */
+/* Windows support
+ *
+ * SPECIAL WINDOWS NOTE
+ *
+ * Some of the Win32 API functions expand to fooA or fooW depending on
+ * whether UNICODE or _UNICODE are defined. You MUST explicitly use
+ * the A version of the functions to force char * behavior until we
+ * work out a scheme for proper Windows Unicode support.
+ *
+ * If you do not do this, people will be unable to incorporate our
+ * source code into their own CMake builds if they define UNICODE.
+ */
+
#ifdef H5_HAVE_WIN32_API
#define H5PL_PATH_SEPARATOR ";"
@@ -49,7 +61,7 @@
#define H5PL_HANDLE HINSTANCE
/* Get a handle to a plugin library. Windows: TEXT macro handles Unicode strings */
-#define H5PL_OPEN_DLIB(S) LoadLibraryEx(TEXT(S), NULL, LOAD_WITH_ALTERED_SEARCH_PATH)
+#define H5PL_OPEN_DLIB(S) LoadLibraryExA(S, NULL, LOAD_WITH_ALTERED_SEARCH_PATH)
/* Get the address of a symbol in dynamic library */
#define H5PL_GET_LIB_FUNC(H,N) GetProcAddress(H,N)
@@ -457,17 +469,17 @@ done:
static htri_t
H5PL__find(H5PL_type_t plugin_type, int type_id, char *dir, const void **info)
{
- WIN32_FIND_DATA fdFile;
- HANDLE hFind;
- char *pathname = NULL;
- char service[2048];
- htri_t ret_value = FALSE;
+ WIN32_FIND_DATAA fdFile;
+ HANDLE hFind;
+ char *pathname = NULL;
+ char service[2048];
+ htri_t ret_value = FALSE;
FUNC_ENTER_STATIC
/* Specify a file mask. *.* = We want everything! */
sprintf(service, "%s\\*.dll", dir);
- if((hFind = FindFirstFile(service, &fdFile)) == INVALID_HANDLE_VALUE)
+ if((hFind = FindFirstFileA(service, &fdFile)) == INVALID_HANDLE_VALUE)
HGOTO_ERROR(H5E_PLUGIN, H5E_OPENERROR, FAIL, "can't open directory")
do {
@@ -498,7 +510,7 @@ H5PL__find(H5PL_type_t plugin_type, int type_id, char *dir, const void **info)
HDassert(pathname);
pathname = (char *)H5MM_xfree(pathname);
} /* end if */
- } while(FindNextFile(hFind, &fdFile)); /* Find the next file. */
+ } while(FindNextFileA(hFind, &fdFile)); /* Find the next file. */
done:
if(hFind)