|
reSIProcate/rutil
9694
|
#include <Winsock2.h>#include <Iphlpapi.h>#include "rutil/GenericIPAddress.hxx"#include "rutil/WinCompat.hxx"#include "rutil/DnsUtil.hxx"#include "rutil/Log.hxx"#include "rutil/Logger.hxx"#include "rutil/WinLeakCheck.hxx"
Go to the source code of this file.
Classes | |
| class | WinCompatInstanceCleaner |
Defines | |
| #define | RESIPROCATE_SUBSYSTEM Subsystem::TRANSPORT |
Functions | |
| static char * | ConvertLPWSTRToLPSTR (LPWSTR lpwszStrIn) |
Variables | |
| class WinCompatInstanceCleaner | winCompatInstanceCleaner |
| #define RESIPROCATE_SUBSYSTEM Subsystem::TRANSPORT |
Definition at line 15 of file WinCompat.cxx.
| static char* ConvertLPWSTRToLPSTR | ( | LPWSTR | lpwszStrIn | ) | [static] |
Definition at line 18 of file WinCompat.cxx.
{
LPSTR pszOut = NULL;
if (lpwszStrIn != NULL)
{
int nInputStrLen = (int)wcslen(lpwszStrIn);
// Double NULL Termination
int nOutputStrLen = WideCharToMultiByte (CP_ACP, 0, lpwszStrIn, nInputStrLen, NULL, 0, 0, 0) + 2;
pszOut = new char [nOutputStrLen];
if (pszOut)
{
memset (pszOut, 0x00, nOutputStrLen);
WideCharToMultiByte(CP_ACP, 0, lpwszStrIn, nInputStrLen, pszOut, nOutputStrLen, 0, 0);
}
}
return pszOut;
}
1.7.5.1