2006-03-21 16:18:24 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2006 Alexandre Julliard
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2006-03-21 16:18:24 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
2006-04-02 00:01:23 +02:00
|
|
|
#include "winreg.h"
|
|
|
|
#include "winerror.h"
|
|
|
|
#include "shellapi.h"
|
|
|
|
#include "shlwapi.h"
|
2007-09-01 02:42:51 +02:00
|
|
|
#include "intshcut.h"
|
2008-02-05 23:18:16 +01:00
|
|
|
#include "winuser.h"
|
|
|
|
#include "commctrl.h"
|
|
|
|
#include "prsht.h"
|
2006-04-02 00:01:23 +02:00
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(url);
|
2006-03-21 16:18:24 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* DllMain (URL.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
|
|
|
|
{
|
|
|
|
switch(reason)
|
|
|
|
{
|
|
|
|
case DLL_WINE_PREATTACH:
|
|
|
|
return FALSE; /* prefer native version */
|
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
DisableThreadLibraryCalls( inst );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
2006-04-02 00:01:23 +02:00
|
|
|
|
2008-02-05 23:18:16 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* AddMIMEFileTypesPS (URL.@)
|
|
|
|
*
|
|
|
|
* Build and Manage a Filetype-Association Property Sheet
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* unknown1 [I] Pointer to an Read-Only Area
|
|
|
|
* lppsh [I] PTR to the target PropertySheetHeader (ANSI)
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: 0
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
DWORD WINAPI AddMIMEFileTypesPS(VOID * unknown1, LPPROPSHEETHEADERA lppsh)
|
|
|
|
{
|
|
|
|
FIXME("(%p, %p): stub!\n", unknown1, lppsh);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2006-04-02 00:01:23 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* InetIsOffline (URL.@)
|
|
|
|
*
|
|
|
|
*/
|
2007-09-01 02:42:51 +02:00
|
|
|
BOOL WINAPI InetIsOffline(DWORD flags)
|
2006-04-02 00:01:23 +02:00
|
|
|
{
|
2007-09-01 02:42:51 +02:00
|
|
|
FIXME("(%08x): stub!\n", flags);
|
2006-04-02 00:01:23 +02:00
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* FileProtocolHandlerA (URL.@)
|
|
|
|
*
|
|
|
|
* Handles a URL given to it and executes it.
|
|
|
|
*
|
|
|
|
* HWND hWnd - Parent Window
|
2007-11-02 17:03:32 +01:00
|
|
|
* HINSTANCE hInst - ignored
|
2006-04-02 00:01:23 +02:00
|
|
|
* LPCSTR pszUrl - The URL that needs to be handled
|
|
|
|
* int nShowCmd - How to display the operation.
|
|
|
|
*/
|
|
|
|
|
2007-11-02 17:03:32 +01:00
|
|
|
HRESULT WINAPI FileProtocolHandlerA(HWND hWnd, HINSTANCE hInst, LPCSTR pszUrl,
|
|
|
|
int nShowCmd)
|
2006-04-02 00:01:23 +02:00
|
|
|
{
|
2006-09-17 15:56:05 +02:00
|
|
|
CHAR pszPath[MAX_PATH];
|
2006-04-02 00:01:23 +02:00
|
|
|
DWORD size = MAX_PATH;
|
|
|
|
HRESULT createpath = PathCreateFromUrlA(pszUrl,pszPath,&size,0);
|
|
|
|
|
2007-11-02 17:03:32 +01:00
|
|
|
TRACE("(%p, %s, %d)\n",hWnd,debugstr_a(pszUrl),nShowCmd);
|
2006-04-02 00:01:23 +02:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|