2000-04-24 18:03:54 +00:00
|
|
|
/*
|
|
|
|
* UrlMon
|
|
|
|
*
|
|
|
|
* Copyright (c) 2000 Patrik Stridvall
|
|
|
|
*
|
2002-03-09 23:29:33 +00:00
|
|
|
* 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
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2000-04-24 18:03:54 +00:00
|
|
|
*/
|
|
|
|
|
2003-09-05 23:08:26 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
#include "windef.h"
|
2003-06-30 20:53:48 +00:00
|
|
|
#include "winbase.h"
|
2000-04-24 18:03:54 +00:00
|
|
|
#include "winerror.h"
|
|
|
|
#include "wtypes.h"
|
2004-05-05 01:32:00 +00:00
|
|
|
#define NO_SHLWAPI_REG
|
|
|
|
#include "shlwapi.h"
|
2000-04-24 18:03:54 +00:00
|
|
|
|
2002-03-09 23:29:33 +00:00
|
|
|
#include "wine/debug.h"
|
2000-04-24 18:03:54 +00:00
|
|
|
|
2002-08-13 18:20:24 +00:00
|
|
|
#include "urlmon_main.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
|
|
|
|
|
|
|
|
HINSTANCE URLMON_hInstance = 0;
|
|
|
|
|
|
|
|
/***********************************************************************
|
2002-11-04 23:53:41 +00:00
|
|
|
* DllMain (URLMON.init)
|
2002-08-13 18:20:24 +00:00
|
|
|
*/
|
2002-11-04 23:53:41 +00:00
|
|
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
2002-08-13 18:20:24 +00:00
|
|
|
{
|
2002-10-18 23:48:57 +00:00
|
|
|
TRACE("%p 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
|
2002-08-13 18:20:24 +00:00
|
|
|
|
|
|
|
switch(fdwReason) {
|
|
|
|
case DLL_PROCESS_ATTACH:
|
2003-06-30 20:53:48 +00:00
|
|
|
DisableThreadLibraryCalls(hinstDLL);
|
2002-08-13 18:20:24 +00:00
|
|
|
URLMON_hInstance = hinstDLL;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DLL_PROCESS_DETACH:
|
|
|
|
URLMON_hInstance = 0;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2000-04-24 18:03:54 +00:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-02 19:59:40 +00:00
|
|
|
* DllInstall (URLMON.@)
|
2000-04-24 18:03:54 +00:00
|
|
|
*/
|
|
|
|
HRESULT WINAPI URLMON_DllInstall(BOOL bInstall, LPCWSTR cmdline)
|
|
|
|
{
|
2002-05-31 23:06:46 +00:00
|
|
|
FIXME("(%s, %s): stub\n", bInstall?"TRUE":"FALSE",
|
2000-04-24 18:03:54 +00:00
|
|
|
debugstr_w(cmdline));
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2002-05-05 19:40:57 +00:00
|
|
|
/***********************************************************************
|
|
|
|
* DllCanUnloadNow (URLMON.@)
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI URLMON_DllCanUnloadNow(void)
|
|
|
|
{
|
|
|
|
FIXME("(void): stub\n");
|
|
|
|
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* DllGetClassObject (URLMON.@)
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI URLMON_DllGetClassObject(REFCLSID rclsid, REFIID riid,
|
|
|
|
LPVOID *ppv)
|
|
|
|
{
|
2002-05-31 23:06:46 +00:00
|
|
|
FIXME("(%p, %p, %p): stub\n", debugstr_guid(rclsid),
|
2002-05-05 19:40:57 +00:00
|
|
|
debugstr_guid(riid), ppv);
|
|
|
|
|
|
|
|
return CLASS_E_CLASSNOTAVAILABLE;
|
|
|
|
}
|
|
|
|
|
2000-04-29 14:26:13 +00:00
|
|
|
/***********************************************************************
|
|
|
|
* DllRegisterServerEx (URLMON.@)
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI URLMON_DllRegisterServerEx(void)
|
|
|
|
{
|
|
|
|
FIXME("(void): stub\n");
|
|
|
|
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
2000-11-01 01:46:24 +00:00
|
|
|
/**************************************************************************
|
|
|
|
* UrlMkSetSessionOption (URLMON.@)
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI UrlMkSetSessionOption(long lost, LPVOID *splat, long time,
|
|
|
|
long nosee)
|
|
|
|
{
|
|
|
|
FIXME("(%#lx, %p, %#lx, %#lx): stub\n", lost, splat, time, nosee);
|
2002-05-31 23:06:46 +00:00
|
|
|
|
2000-11-01 01:46:24 +00:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2002-03-21 01:25:42 +00:00
|
|
|
/**************************************************************************
|
|
|
|
* ObtainUserAgentString (URLMON.@)
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI ObtainUserAgentString(DWORD dwOption, LPCSTR pcszUAOut, DWORD *cbSize)
|
|
|
|
{
|
|
|
|
FIXME("(%ld, %p, %p): stub\n", dwOption, pcszUAOut, cbSize);
|
|
|
|
|
|
|
|
if(dwOption) {
|
|
|
|
ERR("dwOption: %ld, must be zero\n", dwOption);
|
|
|
|
}
|
|
|
|
|
2002-05-05 19:40:57 +00:00
|
|
|
return S_OK;
|
2002-04-08 22:45:34 +00:00
|
|
|
}
|
2004-05-05 01:32:00 +00:00
|
|
|
|
|
|
|
HRESULT WINAPI CoInternetCombineUrl(LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags,
|
|
|
|
LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
|
|
|
|
{
|
|
|
|
HRESULT hres;
|
|
|
|
DWORD size = cchResult;
|
|
|
|
|
|
|
|
TRACE("(%s,%s,0x%08lx,%p,%ld,%p,%ld)\n", debugstr_w(pwzBaseUrl), debugstr_w(pwzRelativeUrl), dwCombineFlags,
|
|
|
|
pwzResult, cchResult, pcchResult, dwReserved);
|
|
|
|
hres = UrlCombineW(pwzBaseUrl, pwzRelativeUrl, pwzResult, &size, dwCombineFlags);
|
|
|
|
if(pcchResult) *pcchResult = size;
|
|
|
|
return hres;
|
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT WINAPI CoInternetCompareUrl(LPCWSTR pwzUrl1, LPCWSTR pwzUrl2, DWORD dwCompareFlags)
|
|
|
|
{
|
|
|
|
TRACE("(%s,%s,%08lx)\n", debugstr_w(pwzUrl1), debugstr_w(pwzUrl2), dwCompareFlags);
|
|
|
|
return UrlCompareW(pwzUrl1, pwzUrl2, dwCompareFlags)==0?S_OK:S_FALSE;
|
|
|
|
}
|
2004-09-09 19:17:57 +00:00
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* IsValidURL (URLMON.@)
|
|
|
|
*
|
|
|
|
* Determines if a specified string is a valid URL.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* pBC [I] ignored, must be NULL.
|
|
|
|
* szURL [I] string that represents the URL in question.
|
|
|
|
* dwReserved [I] reserved and must be zero.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: S_OK.
|
|
|
|
* Failure: S_FALSE.
|
|
|
|
* returns E_INVALIDARG if one or more of the args is invalid.
|
|
|
|
*
|
|
|
|
* TODO:
|
|
|
|
* test functionality against windows to see what a valid URL is.
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI IsValidURL(LPBC pBC, LPCWSTR szURL, DWORD dwReserved)
|
|
|
|
{
|
|
|
|
FIXME("(%p, %s, %ld): stub\n", pBC, debugstr_w(szURL), dwReserved);
|
|
|
|
|
|
|
|
if (pBC != NULL || dwReserved != 0)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|