diff --git a/dlls/url/Makefile.in b/dlls/url/Makefile.in index b43aa86daf9..8ca543bee54 100644 --- a/dlls/url/Makefile.in +++ b/dlls/url/Makefile.in @@ -4,7 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = url.dll IMPORTLIB = liburl.$(IMPLIBEXT) -IMPORTS = kernel32 +IMPORTS = shell32 shlwapi kernel32 C_SRCS = url_main.c diff --git a/dlls/url/url.spec b/dlls/url/url.spec index 75dddcb016c..76981d87ee9 100644 --- a/dlls/url/url.spec +++ b/dlls/url/url.spec @@ -4,9 +4,9 @@ @ stub DllGetClassObject @ stub DummyEntryPoint @ stub DummyEntryPointA -@ stub FileProtocolHandler -@ stub FileProtocolHandlerA -@ stub InetIsOffline +@ stdcall FileProtocolHandler(long str long) FileProtocolHandlerA +@ stdcall FileProtocolHandlerA(long str long) +@ stdcall InetIsOffline() @ stub MIMEAssociationDialogA @ stub MIMEAssociationDialogW @ stub MailToProtocolHandler @@ -15,8 +15,8 @@ @ stub NewsProtocolHandlerA @ stub OpenURL @ stub OpenURLA -@ stub TelnetProtocolHandler -@ stub TelnetProtocolHandlerA +@ stdcall TelnetProtocolHandler(long str) TelnetProtocolHandlerA +@ stdcall TelnetProtocolHandlerA(long str) @ stub TranslateURLA @ stub TranslateURLW @ stub URLAssociationDialogA diff --git a/dlls/url/url_main.c b/dlls/url/url_main.c index b85e204c12f..1eaa0ace750 100644 --- a/dlls/url/url_main.c +++ b/dlls/url/url_main.c @@ -19,6 +19,13 @@ #include #include "windef.h" #include "winbase.h" +#include "winreg.h" +#include "winerror.h" +#include "shellapi.h" +#include "shlwapi.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(url); /*********************************************************************** * DllMain (URL.@) @@ -35,3 +42,52 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) } return TRUE; } + +/*********************************************************************** + * InetIsOffline (URL.@) + * + */ +BOOL WINAPI InetIsOffline(void) +{ + FIXME("stub!\n"); + + return FALSE; +} + +/*********************************************************************** + * FileProtocolHandlerA (URL.@) + * + * Handles a URL given to it and executes it. + * + * HWND hWnd - Parent Window + * LPCSTR pszUrl - The URL that needs to be handled + * int nShowCmd - How to display the operation. + */ + +HRESULT WINAPI FileProtocolHandlerA(HWND hWnd, LPCSTR pszUrl,int nShowCmd) +{ + LPSTR pszPath = NULL; + DWORD size = MAX_PATH; + HRESULT createpath = PathCreateFromUrlA(pszUrl,pszPath,&size,0); + + TRACE("(%p, %p, %d)\n",hWnd,pszUrl,nShowCmd); + + if(createpath != S_OK) + return E_FAIL; + + ShellExecuteA(hWnd,NULL,pszPath,NULL,NULL,nShowCmd); + + return S_OK; +} + +/*********************************************************************** + * TelnetProtocolHandlerA (URL.@) + * + */ + +HRESULT WINAPI TelnetProtocolHandlerA(HWND hWnd, LPSTR lpStr) +{ + FIXME("(%p, %p): stub!\n",hWnd,lpStr); + + return E_NOTIMPL; +}