SHDOCVW_118 (ShellDDEInit) is really a dynamic forward to SHELL32_188.
[wine/wine64.git] / dlls / shdocvw / shdocvw_main.c
blob12ed07a9dd2f7137b38b35a3df0134dece82e2d4
1 /*
2 * SHDOCVW - Internet Explorer Web Control
4 * Copyright 2001 John R. Sheets (for CodeWeavers)
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.
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.
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
21 #define COM_NO_WINDOWS_H
22 #include <stdarg.h>
23 #include <string.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "winreg.h"
27 #include "winuser.h"
28 #include "ole2.h"
29 #include "shlwapi.h"
31 #include "shdocvw.h"
32 #include "wine/debug.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
36 HINSTANCE shdocvw_hinstance = 0;
37 HMODULE SHDOCVW_hshell32 = 0;
39 /*************************************************************************
40 * SHDOCVW DllMain
42 BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID fImpLoad)
44 TRACE("%p 0x%lx %p\n", hinst, fdwReason, fImpLoad);
45 switch (fdwReason)
47 case DLL_PROCESS_ATTACH:
48 shdocvw_hinstance = hinst;
49 break;
50 case DLL_PROCESS_DETACH:
51 if (SHDOCVW_hshell32) FreeLibrary(SHDOCVW_hshell32);
52 break;
54 return TRUE;
57 /*************************************************************************
58 * DllCanUnloadNow (SHDOCVW.@)
60 HRESULT WINAPI SHDOCVW_DllCanUnloadNow(void)
62 FIXME("(void): stub\n");
64 return S_FALSE;
67 /*************************************************************************
68 * DllGetClassObject (SHDOCVW.@)
70 HRESULT WINAPI SHDOCVW_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
72 TRACE("\n");
74 if (IsEqualGUID(&IID_IClassFactory, riid))
76 /* Pass back our shdocvw class factory */
77 *ppv = (LPVOID)&SHDOCVW_ClassFactory;
78 IClassFactory_AddRef((IClassFactory*)&SHDOCVW_ClassFactory);
80 return S_OK;
83 return CLASS_E_CLASSNOTAVAILABLE;
86 /***********************************************************************
87 * DllGetVersion (SHDOCVW.@)
89 HRESULT WINAPI SHDOCVW_DllGetVersion (DLLVERSIONINFO *pdvi)
91 FIXME("(void): stub\n");
92 return S_FALSE;
95 /*************************************************************************
96 * DllInstall (SHDOCVW.@)
98 HRESULT WINAPI SHDOCVW_DllInstall(BOOL bInstall, LPCWSTR cmdline)
100 FIXME("(%s, %s): stub!\n", bInstall ? "TRUE":"FALSE", debugstr_w(cmdline));
102 return S_OK;
105 /*************************************************************************
106 * SHDOCVW_LoadShell32
108 * makes sure the handle to shell32 is valid
110 BOOL SHDOCVW_LoadShell32(void)
112 if (SHDOCVW_hshell32)
113 return TRUE;
114 return ((SHDOCVW_hshell32 = LoadLibraryA("shell32.dll")) != NULL);
117 /***********************************************************************
118 * @ (SHDOCVW.110)
120 * Called by Win98 explorer.exe main binary, definitely has 0
121 * parameters.
123 DWORD WINAPI WinList_Init(void)
125 FIXME("(), stub!\n");
126 return 0x0deadfeed;
129 /***********************************************************************
130 * @ (SHDOCVW.118)
132 * Called by Win98 explorer.exe main binary, definitely has only one
133 * parameter.
135 static BOOL (WINAPI *pShellDDEInit)(BOOL start) = NULL;
137 BOOL WINAPI ShellDDEInit(BOOL start)
139 TRACE("(%d)\n", start);
141 if (!pShellDDEInit)
143 if (!SHDOCVW_LoadShell32())
144 return FALSE;
145 pShellDDEInit = GetProcAddress(SHDOCVW_hshell32, (LPCSTR)188);
148 if (pShellDDEInit)
149 return pShellDDEInit(start);
150 else
151 return FALSE;
154 /***********************************************************************
155 * @ (SHDOCVW.125)
157 * Called by Win98 explorer.exe main binary, definitely has 0
158 * parameters.
160 DWORD WINAPI RunInstallUninstallStubs(void)
162 FIXME("(), stub!\n");
163 return 0x0deadbee;