[xml] LoadLibrary needs to be LoadLibraryA
- From: "Jungshik Shin" <jshin1987 gmail com>
- To: xml gnome org
- Subject: [xml] LoadLibrary needs to be LoadLibraryA
- Date: Tue, 19 Feb 2008 16:15:47 -0800
Hi,
When I tried to compile libxml on Windows along with my application that is built with 'UNICODE' defined (i.e. as a Unicode application rather than as an "ANSI" application), I came across a problem in xmlmodule.c.
With UNICODE defined, LoadLibrary is resolved to LoadLibraryW which expects to get 'const wchar_t*' rather than 'const char*'. To avoid the problem, we have to use LoadLibraryA explicitly.
Below is my trivial patch:
-----------------Cut---------Here------------------------
--- xmlmodule.c.old
+++ xmlmodule.c
@@ -300,7 +300,7 @@
static void *
xmlModulePlatformOpen(const char *name)
{
- return LoadLibraryA(name);
+ return LoadLibrary(name);
}
------------------------------------------
Thank you,
Jungshik
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]