OLD | NEW |
| (Empty) |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include <atlbase.h> | |
6 #include <atlcom.h> | |
7 | |
8 #include "activex_test_control.h" | |
9 #include "activex_test_control_i.c" | |
10 #include "chrome/test/activex_test_control/resource.h" | |
11 | |
12 class ActiveXTestControllModule | |
13 : public CAtlDllModuleT<ActiveXTestControllModule> { | |
14 public: | |
15 DECLARE_LIBID(LIBID_activex_test_controlLib) | |
16 DECLARE_REGISTRY_APPID_RESOURCEID(IDR_ACTIVEX_TEST_CONTROL, | |
17 "{CDBC0D94-AFF6-4918-90A9-7967179A77D8}") | |
18 }; | |
19 | |
20 ActiveXTestControllModule g_atlmodule; | |
21 | |
22 // DLL Entry Point | |
23 extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, | |
24 LPVOID reserved) { | |
25 return g_atlmodule.DllMain(reason, reserved); | |
26 } | |
27 | |
28 // Used to determine whether the DLL can be unloaded by OLE | |
29 STDAPI DllCanUnloadNow(void) { | |
30 return g_atlmodule.DllCanUnloadNow(); | |
31 } | |
32 | |
33 // Returns a class factory to create an object of the requested type | |
34 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) { | |
35 return g_atlmodule.DllGetClassObject(rclsid, riid, ppv); | |
36 } | |
37 | |
38 // DllRegisterServer - Adds entries to the system registry | |
39 STDAPI DllRegisterServer(void) { | |
40 // registers object, typelib and all interfaces in typelib | |
41 HRESULT hr = g_atlmodule.DllRegisterServer(); | |
42 return hr; | |
43 } | |
44 | |
45 // DllUnregisterServer - Removes entries from the system registry | |
46 STDAPI DllUnregisterServer(void) { | |
47 HRESULT hr = g_atlmodule.DllUnregisterServer(); | |
48 return hr; | |
49 } | |
OLD | NEW |