Home | History | Annotate | Download | only in chrome_frame
      1 // Copyright (c) 2010 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 // chrome_frame_helper_dll.cc : Implementation of a helper DLL that initializes
      6 // a listener for WinEvent hooks on load.
      7 //
      8 // Calling the StartUserModeBrowserInjection will set an in-context WinEvent
      9 // hook that will cause this DLL to get loaded in any process that sends
     10 // EVENT_OBJECT_CREATE accessibility events. This is a poor substitute to
     11 // getting in via vetted means (i.e. real BHO registration).
     12 
     13 #include "chrome_frame/bho_loader.h"
     14 #include "chrome_frame/chrome_frame_helper_util.h"
     15 
     16 STDAPI StartUserModeBrowserInjection() {
     17   return BHOLoader::GetInstance()->StartHook() ? S_OK : E_FAIL;
     18 }
     19 
     20 STDAPI StopUserModeBrowserInjection() {
     21   BHOLoader::GetInstance()->StopHook();
     22   return S_OK;
     23 }
     24 
     25 BOOL APIENTRY DllMain(HMODULE module, DWORD reason_for_call, void* reserved) {
     26   return TRUE;
     27 }
     28 
     29