2 * Copyright 2007 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
28 #include "wine/debug.h"
30 #include "winhttp_private.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(winhttp);
34 /******************************************************************
37 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
41 case DLL_WINE_PREATTACH:
42 return FALSE; /* prefer native version */
43 case DLL_PROCESS_ATTACH:
44 DisableThreadLibraryCalls(hInstDLL);
46 case DLL_PROCESS_DETACH:
52 /******************************************************************
53 * DllGetClassObject (winhttp.@)
55 HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
57 FIXME("(%s %s %p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
58 return CLASS_E_CLASSNOTAVAILABLE;
61 /******************************************************************
62 * DllCanUnloadNow (winhttp.@)
64 HRESULT WINAPI DllCanUnloadNow(void)
70 /***********************************************************************
71 * DllRegisterServer (winhttp.@)
73 HRESULT WINAPI DllRegisterServer(void)
79 /***********************************************************************
80 * DllUnregisterServer (winhttp.@)
82 HRESULT WINAPI DllUnregisterServer(void)
89 #define SCHEME_HTTPS 4
91 BOOL WINAPI InternetCrackUrlW( LPCWSTR, DWORD, DWORD, LPURL_COMPONENTSW );
92 BOOL WINAPI InternetCreateUrlW( LPURL_COMPONENTS, DWORD, LPWSTR, LPDWORD );
94 /***********************************************************************
95 * WinHttpCrackUrl (winhttp.@)
97 BOOL WINAPI WinHttpCrackUrl( LPCWSTR url, DWORD len, DWORD flags, LPURL_COMPONENTSW components )
101 TRACE("%s, %d, %x, %p\n", debugstr_w(url), len, flags, components);
103 if ((ret = InternetCrackUrlW( url, len, flags, components )))
105 /* fix up an incompatibility between wininet and winhttp */
106 if (components->nScheme == SCHEME_HTTP) components->nScheme = INTERNET_SCHEME_HTTP;
107 else if (components->nScheme == SCHEME_HTTPS) components->nScheme = INTERNET_SCHEME_HTTPS;
110 set_last_error( ERROR_WINHTTP_UNRECOGNIZED_SCHEME );
117 /***********************************************************************
118 * WinHttpCreateUrl (winhttp.@)
120 BOOL WINAPI WinHttpCreateUrl( LPURL_COMPONENTS comps, DWORD flags, LPWSTR url, LPDWORD len )
122 TRACE("%p, 0x%08x, %p, %p\n", comps, flags, url, len);
123 return InternetCreateUrlW( comps, flags, url, len );