From 6d022f5064786b0edcc51c5ac0611819c76b4143 Mon Sep 17 00:00:00 2001 From: Alberto Massari <amassari@apache.org> Date: Tue, 2 Dec 2003 14:12:20 +0000 Subject: [PATCH] Make the code compilable on Windows when UNICODE is defined (bug#16055) git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@175511 13f79535-47bb-0310-9956-ffa450edef68 --- .../util/MsgLoaders/Win32/Win32MsgLoader.cpp | 2 +- .../WinSock/BinHTTPURLInputStream.cpp | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/xercesc/util/MsgLoaders/Win32/Win32MsgLoader.cpp b/src/xercesc/util/MsgLoaders/Win32/Win32MsgLoader.cpp index 3a6e10be6..9b1d972ba 100644 --- a/src/xercesc/util/MsgLoaders/Win32/Win32MsgLoader.cpp +++ b/src/xercesc/util/MsgLoaders/Win32/Win32MsgLoader.cpp @@ -181,7 +181,7 @@ bool Win32MsgLoader::loadMsg(const XMLMsgLoader::XMLMsgId msgToLoad const unsigned int theOfs = theMsgId & 0x000F; // Try to find this resource. If we fail to find it, return false - HRSRC hMsgRsc = ::FindResourceExA + HRSRC hMsgRsc = ::FindResourceEx ( fModHandle , RT_STRING diff --git a/src/xercesc/util/NetAccessors/WinSock/BinHTTPURLInputStream.cpp b/src/xercesc/util/NetAccessors/WinSock/BinHTTPURLInputStream.cpp index 04fb50868..258a37ff1 100644 --- a/src/xercesc/util/NetAccessors/WinSock/BinHTTPURLInputStream.cpp +++ b/src/xercesc/util/NetAccessors/WinSock/BinHTTPURLInputStream.cpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.5 2003/12/02 14:12:20 amassari + * Make the code compilable on Windows when UNICODE is defined (bug#16055) + * * Revision 1.4 2003/05/17 05:54:18 knoaman * Update NetAccessors to use the memory manager. * @@ -119,8 +122,6 @@ */ -#define _WINSOCKAPI_ - #define INCL_WINSOCK_API_TYPEDEFS 1 #include <winsock2.h> #include <windows.h> @@ -130,7 +131,6 @@ #include <string.h> #include <stdlib.h> - #include <xercesc/util/PlatformUtils.hpp> #include <xercesc/util/XMLNetAccessor.hpp> #include <xercesc/util/NetAccessors/WinSock/BinHTTPURLInputStream.hpp> @@ -171,18 +171,18 @@ void BinHTTPURLInputStream::Initialize() { ThrowXML(NetAccessorException, XMLExcepts::NetAcc_InitFailed); } else { - startup = (LPFN_WSASTARTUP) GetProcAddress(gWinsockLib,_T("WSAStartup")); - gWSACleanup = (LPFN_WSACLEANUP) GetProcAddress(gWinsockLib,_T("WSACleanup")); - gWSgethostbyname = (LPFN_GETHOSTBYNAME) GetProcAddress(gWinsockLib,_T("gethostbyname")); - gWSinet_addr = (LPFN_INET_ADDR) GetProcAddress(gWinsockLib,_T("inet_addr")); - gWSgethostbyaddr = (LPFN_GETHOSTBYADDR) GetProcAddress(gWinsockLib,_T("gethostbyaddr")); - gWShtons = (LPFN_HTONS) GetProcAddress(gWinsockLib,_T("htons")); - gWSsocket = (LPFN_SOCKET) GetProcAddress(gWinsockLib,_T("socket")); - gWSconnect = (LPFN_CONNECT) GetProcAddress(gWinsockLib,_T("connect")); - gWSsend = (LPFN_SEND) GetProcAddress(gWinsockLib,_T("send")); - gWSrecv = (LPFN_RECV) GetProcAddress(gWinsockLib,_T("recv")); - gWSshutdown = (LPFN_SHUTDOWN) GetProcAddress(gWinsockLib,_T("shutdown")); - gWSclosesocket = (LPFN_CLOSESOCKET) GetProcAddress(gWinsockLib,_T("closesocket")); + startup = (LPFN_WSASTARTUP) GetProcAddress(gWinsockLib,"WSAStartup"); + gWSACleanup = (LPFN_WSACLEANUP) GetProcAddress(gWinsockLib,"WSACleanup"); + gWSgethostbyname = (LPFN_GETHOSTBYNAME) GetProcAddress(gWinsockLib,"gethostbyname"); + gWSinet_addr = (LPFN_INET_ADDR) GetProcAddress(gWinsockLib,"inet_addr"); + gWSgethostbyaddr = (LPFN_GETHOSTBYADDR) GetProcAddress(gWinsockLib,"gethostbyaddr"); + gWShtons = (LPFN_HTONS) GetProcAddress(gWinsockLib,"htons"); + gWSsocket = (LPFN_SOCKET) GetProcAddress(gWinsockLib,"socket"); + gWSconnect = (LPFN_CONNECT) GetProcAddress(gWinsockLib,"connect"); + gWSsend = (LPFN_SEND) GetProcAddress(gWinsockLib,"send"); + gWSrecv = (LPFN_RECV) GetProcAddress(gWinsockLib,"recv"); + gWSshutdown = (LPFN_SHUTDOWN) GetProcAddress(gWinsockLib,"shutdown"); + gWSclosesocket = (LPFN_CLOSESOCKET) GetProcAddress(gWinsockLib,"closesocket"); if(startup == NULL || gWSACleanup == NULL || -- GitLab