Implement A->W call for GetNamedSecurityInfo.
[wine] / dlls / urlmon / urlmon_main.c
1 /*
2  * UrlMon
3  *
4  * Copyright (c) 2000 Patrik Stridvall
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #include <stdarg.h>
22
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winerror.h"
26 #include "wtypes.h"
27 #define NO_SHLWAPI_REG
28 #include "shlwapi.h"
29
30 #include "wine/debug.h"
31
32 #include "urlmon_main.h"
33
34 WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
35
36 HINSTANCE URLMON_hInstance = 0;
37
38 /***********************************************************************
39  *              DllMain (URLMON.init)
40  */
41 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
42 {
43     TRACE("%p 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
44
45     switch(fdwReason) {
46     case DLL_PROCESS_ATTACH:
47         DisableThreadLibraryCalls(hinstDLL);
48         URLMON_hInstance = hinstDLL;
49         break;
50
51     case DLL_PROCESS_DETACH:
52         URLMON_hInstance = 0;
53         break;
54     }
55     return TRUE;
56 }
57
58
59 /***********************************************************************
60  *              DllInstall (URLMON.@)
61  */
62 HRESULT WINAPI URLMON_DllInstall(BOOL bInstall, LPCWSTR cmdline)
63 {
64   FIXME("(%s, %s): stub\n", bInstall?"TRUE":"FALSE",
65         debugstr_w(cmdline));
66
67   return S_OK;
68 }
69
70 /***********************************************************************
71  *              DllCanUnloadNow (URLMON.@)
72  */
73 HRESULT WINAPI URLMON_DllCanUnloadNow(void)
74 {
75     FIXME("(void): stub\n");
76
77     return S_FALSE;
78 }
79
80 /***********************************************************************
81  *              DllGetClassObject (URLMON.@)
82  */
83 HRESULT WINAPI URLMON_DllGetClassObject(REFCLSID rclsid, REFIID riid,
84                                         LPVOID *ppv)
85 {
86     FIXME("(%p, %p, %p): stub\n", debugstr_guid(rclsid),
87           debugstr_guid(riid), ppv);
88
89     return CLASS_E_CLASSNOTAVAILABLE;
90 }
91
92 /***********************************************************************
93  *              DllRegisterServerEx (URLMON.@)
94  */
95 HRESULT WINAPI URLMON_DllRegisterServerEx(void)
96 {
97     FIXME("(void): stub\n");
98
99     return E_FAIL;
100 }
101
102 /**************************************************************************
103  *                 UrlMkSetSessionOption (URLMON.@)
104  */
105  HRESULT WINAPI UrlMkSetSessionOption(long lost, LPVOID *splat, long time,
106                                         long nosee)
107 {
108     FIXME("(%#lx, %p, %#lx, %#lx): stub\n", lost, splat, time, nosee);
109
110     return S_OK;
111 }
112
113 /**************************************************************************
114  *                 ObtainUserAgentString (URLMON.@)
115  */
116 HRESULT WINAPI ObtainUserAgentString(DWORD dwOption, LPCSTR pcszUAOut, DWORD *cbSize)
117 {
118     FIXME("(%ld, %p, %p): stub\n", dwOption, pcszUAOut, cbSize);
119
120     if(dwOption) {
121       ERR("dwOption: %ld, must be zero\n", dwOption);
122     }
123
124     return S_OK;
125 }
126
127 HRESULT WINAPI CoInternetCombineUrl(LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags,
128                                     LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
129 {
130     HRESULT hres;
131     DWORD size = cchResult;
132     
133     TRACE("(%s,%s,0x%08lx,%p,%ld,%p,%ld)\n", debugstr_w(pwzBaseUrl), debugstr_w(pwzRelativeUrl), dwCombineFlags,
134           pwzResult, cchResult, pcchResult, dwReserved);
135     hres = UrlCombineW(pwzBaseUrl, pwzRelativeUrl, pwzResult, &size, dwCombineFlags);
136     if(pcchResult) *pcchResult = size;
137     return hres;
138 }
139
140 HRESULT WINAPI CoInternetCompareUrl(LPCWSTR pwzUrl1, LPCWSTR pwzUrl2, DWORD dwCompareFlags)
141 {
142     TRACE("(%s,%s,%08lx)\n", debugstr_w(pwzUrl1), debugstr_w(pwzUrl2), dwCompareFlags);
143     return UrlCompareW(pwzUrl1, pwzUrl2, dwCompareFlags)==0?S_OK:S_FALSE;
144 }