[RSHELL]
[reactos.git] / base / shell / rshell / misc.cpp
1 /*
2 * ReactOS Explorer
3 *
4 * Copyright 2014 Giannis Adamopoulos
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #include "precomp.h"
22
23 DWORD WINAPI WinList_Init(void)
24 {
25 /* do something here (perhaps we may want to add our own implementation fo win8) */
26 return 0;
27 }
28
29 void *operator new (size_t, void *buf)
30 {
31 return buf;
32 }
33
34 class CRShellModule : public CComModule
35 {
36 public:
37 };
38
39 CRShellModule gModule;
40 CAtlWinModule gWinModule;
41
42 STDAPI_(BOOL) DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID fImpLoad)
43 {
44 if (dwReason == DLL_PROCESS_ATTACH)
45 {
46 /* HACK - the global constructors don't run, so I placement new them here */
47 new (&gModule) CRShellModule;
48 new (&gWinModule) CAtlWinModule;
49 new (&_AtlBaseModule) CAtlBaseModule;
50 new (&_AtlComModule) CAtlComModule;
51
52 gModule.Init(NULL, hInstance, NULL);
53 DisableThreadLibraryCalls (hInstance);
54 }
55 else if (dwReason == DLL_PROCESS_DETACH)
56 {
57 gModule.Term();
58 }
59 return TRUE;
60 }