Alex Henrie alexhenrie24@gmail.com writes:
@@ -1044,8 +1044,17 @@ NTSTATUS WINAPI RtlIpv4StringToAddressA(const char *str, BOOLEAN strict, const c */ NTSTATUS WINAPI RtlIpv4StringToAddressExW(const WCHAR *str, BOOLEAN strict, IN_ADDR *address, USHORT *port) {
- FIXME("(%s, %u, %p, %p): stub\n", debugstr_w(str), strict, address, port);
- return STATUS_NOT_IMPLEMENTED;
- char cstr[32];
- ULONG clen;
- TRACE("(%s, %u, %p, %p)\n", debugstr_w(str), strict, address, port);
- if (!str || !address || !port)
return STATUS_INVALID_PARAMETER;
- RtlUnicodeToMultiByteN(cstr, sizeof(cstr) - 1, &clen, str, strlenW(str));
- cstr[clen] = 0;
- return ipv4_string_to_address(cstr, strict, NULL, address, port);
}
/*********************************************************************** @@ -1053,8 +1062,18 @@ NTSTATUS WINAPI RtlIpv4StringToAddressExW(const WCHAR *str, BOOLEAN strict, IN_A */ NTSTATUS WINAPI RtlIpv4StringToAddressW(const WCHAR *str, BOOLEAN strict, const WCHAR **terminator, IN_ADDR *address) {
- FIXME("(%s, %u, %p, %p): stub\n", debugstr_w(str), strict, terminator, address);
- return STATUS_NOT_IMPLEMENTED;
- char cstr[32];
- ULONG clen;
- const char *cterminator;
- NTSTATUS ret;
- TRACE("(%s, %u, %p, %p)\n", debugstr_w(str), strict, terminator, address);
- RtlUnicodeToMultiByteN(cstr, sizeof(cstr) - 1, &clen, str, strlenW(str));
- cstr[clen] = 0;
- ret = ipv4_string_to_address(cstr, strict, &cterminator, address, NULL);
- if (terminator) *terminator = str + (cterminator - cstr);
- return ret;
It doesn't seem right to have the W function call the A implementation, it should be the other way around.