Re: InternetGetConnectedStateExA
Aric Stewart <aric(a)codeweavers.com> writes:
+BOOL WINAPI InternetGetConnectedStateExA(LPDWORD lpdwStatus, + LPSTR lpszConnectionName, DWORD dwNameLen, DWORD dwReserved) +{ + INT len; + LPWSTR lpwszConnectionName = NULL; + BOOL rc; + + TRACE("(%p, %s, %ld, 0x%08lx)\n", lpdwStatus, debugstr_a(lpszConnectionName), dwNameLen, dwReserved); + + if (lpszConnectionName) + { + len = MultiByteToWideChar(CP_ACP, 0, lpszConnectionName, -1, NULL, 0); + lpwszConnectionName= HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, lpszConnectionName, -1, + lpwszConnectionName, len); + } + + rc = InternetGetConnectedStateExW(lpdwStatus,lpwszConnectionName, dwNameLen,
lpszConnectionName is an output parameter, it should be converted on return from the W call. -- Alexandre Julliard julliard(a)winehq.org
ah, thanks for catching that i will redo my patch. -aric Alexandre Julliard wrote:
Aric Stewart <aric(a)codeweavers.com> writes:
+BOOL WINAPI InternetGetConnectedStateExA(LPDWORD lpdwStatus, + LPSTR lpszConnectionName, DWORD dwNameLen, DWORD dwReserved) +{ + INT len; + LPWSTR lpwszConnectionName = NULL; + BOOL rc; + + TRACE("(%p, %s, %ld, 0x%08lx)\n", lpdwStatus, debugstr_a(lpszConnectionName), dwNameLen, dwReserved); + + if (lpszConnectionName) + { + len = MultiByteToWideChar(CP_ACP, 0, lpszConnectionName, -1, NULL, 0); + lpwszConnectionName= HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, lpszConnectionName, -1, + lpwszConnectionName, len); + } + + rc = InternetGetConnectedStateExW(lpdwStatus,lpwszConnectionName, dwNameLen,
lpszConnectionName is an output parameter, it should be converted on return from the W call.
participants (2)
-
Alexandre Julliard -
Aric Stewart