Merged PE_InitDLL into MODULE_InitDLL.
[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 "windef.h"
22 #include "winerror.h"
23 #include "wtypes.h"
24
25 #include "wine/debug.h"
26
27 #include "urlmon_main.h"
28
29 WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
30
31 HINSTANCE URLMON_hInstance = 0;
32
33 /***********************************************************************
34  *              DllMain (URLMON.init)
35  */
36 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
37 {
38     TRACE("%p 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
39
40     switch(fdwReason) {
41     case DLL_PROCESS_ATTACH:
42         URLMON_hInstance = hinstDLL;
43         break;
44
45     case DLL_PROCESS_DETACH:
46         URLMON_hInstance = 0;
47         break;
48     }
49     return TRUE;
50 }
51
52
53 /***********************************************************************
54  *              DllInstall (URLMON.@)
55  */
56 HRESULT WINAPI URLMON_DllInstall(BOOL bInstall, LPCWSTR cmdline)
57 {
58   FIXME("(%s, %s): stub\n", bInstall?"TRUE":"FALSE",
59         debugstr_w(cmdline));
60
61   return S_OK;
62 }
63
64 /***********************************************************************
65  *              DllCanUnloadNow (URLMON.@)
66  */
67 HRESULT WINAPI URLMON_DllCanUnloadNow(void)
68 {
69     FIXME("(void): stub\n");
70
71     return S_FALSE;
72 }
73
74 /***********************************************************************
75  *              DllGetClassObject (URLMON.@)
76  */
77 HRESULT WINAPI URLMON_DllGetClassObject(REFCLSID rclsid, REFIID riid,
78                                         LPVOID *ppv)
79 {
80     FIXME("(%p, %p, %p): stub\n", debugstr_guid(rclsid),
81           debugstr_guid(riid), ppv);
82
83     return CLASS_E_CLASSNOTAVAILABLE;
84 }
85
86 /***********************************************************************
87  *              DllRegisterServer (URLMON.@)
88  */
89 HRESULT WINAPI URLMON_DllRegisterServer(void)
90 {
91     FIXME("(void): stub\n");
92
93     return S_OK;
94 }
95
96 /***********************************************************************
97  *              DllRegisterServerEx (URLMON.@)
98  */
99 HRESULT WINAPI URLMON_DllRegisterServerEx(void)
100 {
101     FIXME("(void): stub\n");
102
103     return E_FAIL;
104 }
105
106 /***********************************************************************
107  *              DllUnregisterServer (URLMON.@)
108  */
109 HRESULT WINAPI URLMON_DllUnregisterServer(void)
110 {
111     FIXME("(void): stub\n");
112
113     return S_OK;
114 }
115
116 /**************************************************************************
117  *                 UrlMkSetSessionOption (URLMON.@)
118  */
119  HRESULT WINAPI UrlMkSetSessionOption(long lost, LPVOID *splat, long time,
120                                         long nosee)
121 {
122     FIXME("(%#lx, %p, %#lx, %#lx): stub\n", lost, splat, time, nosee);
123
124     return S_OK;
125 }
126
127 /**************************************************************************
128  *                 ObtainUserAgentString (URLMON.@)
129  */
130 HRESULT WINAPI ObtainUserAgentString(DWORD dwOption, LPCSTR pcszUAOut, DWORD *cbSize)
131 {
132     FIXME("(%ld, %p, %p): stub\n", dwOption, pcszUAOut, cbSize);
133
134     if(dwOption) {
135       ERR("dwOption: %ld, must be zero\n", dwOption);
136     }
137
138     return S_OK;
139 }