wininet: Rename WININET_strdup_WtoA to heap_strdupWtoA.
This commit is contained in:
parent
e09dfcfa99
commit
5d6f01b76b
|
@ -2609,7 +2609,7 @@ static BOOL FTP_SendCommand(INT nSocket, FTP_COMMAND ftpCmd, LPCWSTR lpszParam,
|
|||
INTERNET_STATUS_CALLBACK lpfnStatusCB, object_header_t *hdr, DWORD_PTR dwContext)
|
||||
{
|
||||
BOOL ret;
|
||||
LPSTR lpszParamA = lpszParam?WININET_strdup_WtoA(lpszParam):NULL;
|
||||
LPSTR lpszParamA = heap_strdupWtoA(lpszParam);
|
||||
ret = FTP_SendCommandA(nSocket, ftpCmd, lpszParamA, lpfnStatusCB, hdr, dwContext);
|
||||
HeapFree(GetProcessHeap(), 0, lpszParamA);
|
||||
return ret;
|
||||
|
|
|
@ -87,12 +87,17 @@ static inline WCHAR *heap_strdupAtoW(const char *str)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static inline LPSTR WININET_strdup_WtoA( LPCWSTR str )
|
||||
static inline char *heap_strdupWtoA(LPCWSTR str)
|
||||
{
|
||||
int len = WideCharToMultiByte( CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
|
||||
LPSTR ret = HeapAlloc( GetProcessHeap(), 0, len );
|
||||
if (ret)
|
||||
WideCharToMultiByte( CP_ACP, 0, str, -1, ret, len, NULL, NULL);
|
||||
char *ret = NULL;
|
||||
|
||||
if(str) {
|
||||
DWORD size = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
|
||||
ret = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
if(ret)
|
||||
WideCharToMultiByte(CP_ACP, 0, str, -1, ret, size, NULL, NULL);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -324,7 +324,7 @@ VOID INTERNET_SendCallback(object_header_t *hdr, DWORD_PTR dwContext,
|
|||
break;
|
||||
case INTERNET_STATUS_RESOLVING_NAME:
|
||||
case INTERNET_STATUS_REDIRECT:
|
||||
lpvNewInfo = WININET_strdup_WtoA(lpvStatusInfo);
|
||||
lpvNewInfo = heap_strdupWtoA(lpvStatusInfo);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue