Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: chrome/split_dll_fake_entry.cc

Issue 17619005: Create top-level separate targets for browser and child dlls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/installer/mini_installer_syzygy.gyp ('k') | components/autofill.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 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 <windows.h>
6
7 extern "C" {
8
9 // This entry point and file is used to work around circular dependencies
10 // between the split DLLs. The CRT initialization will fail if done at attach
11 // time. Instead, we defer initialization until after both DLLs are loaded and
12 // then manually call the CRT initialization function (via DoDeferredCrtInit).
13 //
14 // ChromeEmptyEntry is the DLL's entry point.
15
16 BOOL WINAPI _DllMainCRTStartup(HINSTANCE, DWORD, LPVOID);
17
18 BOOL WINAPI ChromeEmptyEntry(HINSTANCE hinstance,
19 DWORD reason,
20 LPVOID reserved) {
21 // We are going to do the 'process attach initialization manually via
22 // DoDeferredCrtInit but we need to let the DLL_THREAD_ATTACH calls work.
23 if (reason == DLL_PROCESS_ATTACH)
24 return 1;
25 return _DllMainCRTStartup(hinstance, reason, reserved);
26 }
27
28 __declspec(dllexport) BOOL __stdcall DoDeferredCrtInit(HINSTANCE hinstance) {
29 return _DllMainCRTStartup(hinstance, DLL_PROCESS_ATTACH, NULL);
30 }
31
32 // This function is needed for the linker to succeed. It seems to pick the
33 // CRT lib based on the existence of "DllMain", and since we're renaming that,
34 // it instead chooses the one that links against "main". This function should
35 // never be called.
36 int main() {
37 __debugbreak();
38 }
39
40 }
OLDNEW
« no previous file with comments | « chrome/installer/mini_installer_syzygy.gyp ('k') | components/autofill.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698