1 // Copyright (c) 2012 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.
5 // MeasurePageLoadTime.cpp : Implementation of DLL Exports.
9 #include "MeasurePageLoadTime.h"
12 class CMeasurePageLoadTimeModule
: public CAtlDllModuleT
< CMeasurePageLoadTimeModule
>
15 DECLARE_LIBID(LIBID_MeasurePageLoadTimeLib
)
16 DECLARE_REGISTRY_APPID_RESOURCEID(IDR_MEASUREPAGELOADTIME
, "{56C6D9F9-643C-4F6E-906C-5F7CECB23C24}")
19 CMeasurePageLoadTimeModule _AtlModule
;
23 #pragma managed(push, off)
27 extern "C" BOOL WINAPI
DllMain(HINSTANCE hInstance
, DWORD dwReason
, LPVOID lpReserved
)
29 if (dwReason
== DLL_PROCESS_ATTACH
)
31 DisableThreadLibraryCalls(hInstance
);
33 return _AtlModule
.DllMain(dwReason
, lpReserved
);
43 // Used to determine whether the DLL can be unloaded by OLE
44 STDAPI
DllCanUnloadNow(void)
46 return _AtlModule
.DllCanUnloadNow();
50 // Returns a class factory to create an object of the requested type
51 STDAPI
DllGetClassObject(REFCLSID rclsid
, REFIID riid
, LPVOID
* ppv
)
53 return _AtlModule
.DllGetClassObject(rclsid
, riid
, ppv
);
57 // DllRegisterServer - Adds entries to the system registry
58 STDAPI
DllRegisterServer(void)
60 // registers object, typelib and all interfaces in typelib
61 HRESULT hr
= _AtlModule
.DllRegisterServer();
66 // DllUnregisterServer - Removes entries from the system registry
67 STDAPI
DllUnregisterServer(void)
69 HRESULT hr
= _AtlModule
.DllUnregisterServer();