diff --git a/dlls/Makefile.in b/dlls/Makefile.in index 8d8b2f76f8b..381d8a79a89 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -445,7 +445,7 @@ win32s/libw32skrnl.@LIBEXT@: libkernel32.@LIBEXT@ libntdll.@LIBEXT@ winaspi/libwnaspi32.@LIBEXT@: libadvapi32.@LIBEXT@ libkernel32.@LIBEXT@ libntdll.@LIBEXT@ winedos/libwinedos.@LIBEXT@: libuser32.@LIBEXT@ libkernel32.@LIBEXT@ libntdll.@LIBEXT@ wineps/libwineps.@LIBEXT@: libuser32.@LIBEXT@ libgdi32.@LIBEXT@ libkernel32.@LIBEXT@ libntdll.@LIBEXT@ -wininet/libwininet.@LIBEXT@: libuser32.@LIBEXT@ libkernel32.@LIBEXT@ libntdll.@LIBEXT@ +wininet/libwininet.@LIBEXT@: libshlwapi.@LIBEXT@ libuser32.@LIBEXT@ libkernel32.@LIBEXT@ libntdll.@LIBEXT@ winmm/joystick/libjoystick.drv.@LIBEXT@: libwinmm.@LIBEXT@ libuser32.@LIBEXT@ libntdll.@LIBEXT@ winmm/libwinmm.@LIBEXT@: libuser32.@LIBEXT@ libadvapi32.@LIBEXT@ libkernel32.@LIBEXT@ libntdll.@LIBEXT@ winmm/mcianim/libmcianim.drv.@LIBEXT@: libwinmm.@LIBEXT@ libuser32.@LIBEXT@ libkernel32.@LIBEXT@ libntdll.@LIBEXT@ diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 9203821206e..94e367f393f 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -25,6 +25,7 @@ #include "debugtools.h" #include "winerror.h" #include "winsock.h" +#include "shlwapi.h" #include "internet.h" @@ -724,21 +725,20 @@ INTERNETAPI DWORD WINAPI InternetAttemptConnect(DWORD dwReserved) BOOL WINAPI InternetCanonicalizeUrlA(LPCSTR lpszUrl, LPSTR lpszBuffer, LPDWORD lpdwBufferLength, DWORD dwFlags) { - BOOL bSuccess = FALSE; + HRESULT hr; + TRACE("%s %p %p %08lx\n",debugstr_a(lpszUrl), lpszBuffer, + lpdwBufferLength, dwFlags); - FIXME("Stub!\n"); + /* Flip this bit to correspond to URL_ESCAPE_UNSAFE */ + dwFlags ^= ICU_NO_ENCODE; - if (lpszUrl) - { - strncpy(lpszBuffer, lpszUrl, *lpdwBufferLength); - *lpdwBufferLength = strlen(lpszBuffer); - bSuccess = TRUE; - } + dwFlags |= 0x80000000; /* Don't know what this means */ - return bSuccess; + hr = UrlCanonicalizeA(lpszUrl, lpszBuffer, lpdwBufferLength, dwFlags); + + return (hr == S_OK) ? TRUE : FALSE; } - /*********************************************************************** * InternetSetStatusCallback (WININET.133) * diff --git a/dlls/wininet/wininet.spec b/dlls/wininet/wininet.spec index 0525db170ad..7f6c066e92a 100644 --- a/dlls/wininet/wininet.spec +++ b/dlls/wininet/wininet.spec @@ -2,6 +2,7 @@ name wininet type win32 init WININET_LibMain +import shlwapi.dll import user32.dll import kernel32.dll import ntdll.dll